/* * Copyright 2007-2017 Charles du Jeu - Abstrium SAS * This file is part of Pydio. * * Pydio is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Pydio is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with Pydio. If not, see . * * The latest code can be found at . */ import React from 'react' import {FlatButton} from 'material-ui' import ActionDialogMixin from '../modal/ActionDialogMixin' import Loader from '../Loader' const CompatMigrationDialog = React.createClass({ mixins:[ ActionDialogMixin ], getInitialState: function(){ return {loading: false}; }, getDefaultProps: function(){ return { dialogTitle: 'Migration Required', dialogIsModal: true, dialogScrollBody: true }; }, performUpgrade: function(){ this.setState({loading: true}); PydioApi.getClient().request({ get_action:'packages_upgrade_script' }, (transport) => { if(transport.responseJSON){ this.setState({response: transport.responseJSON, loading:false}); if(transport.responseJSON.success){ this._buttonUpdater([{document.location.reload()}}/>]); }else{ this._buttonUpdater(null); } }else{ this.setState({response: {error: 'Empty Response'}, loading:false}); this._buttonUpdater(null); } }); }, getButtons: function(updater=null){ if(updater !== null){ this._buttonUpdater = updater; } return []; }, render: function(){ const {response, loading} = this.state; return (
{!loading && !response &&

Oops, it seems that your database version does not fit the current expected version, or that your are using a theme that is now deprecated! Don't worry, a couple of additional steps are required to upgrade your installation.

Pydio will try to apply all necessary changes to have you up and running quickly.

} {loading && } {response && response.success &&
Successfully applied upgrade
{response.result.map((r)=>{return
{r}
})}
You can now reload the page
} {response && response.error &&
{response.error}:
{response.exception}
{response.db_mismatch &&
Expected version of the database is {response.db_mismatch.target}, but current is set to {response.db_mismatch.current}. If you are confident that your installation is already up-to-date, simply manually upgrade the database version by running the following query:
UPDATE ajxp_version SET db_build={response.db_mismatch.target};
}
}
); } }); export {CompatMigrationDialog as default}