Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b584fc33f5 | |||
| 15c9d8682e | |||
| 361be8c26b | |||
| 4db9a5edd6 | |||
| bcc878da43 | |||
| 79f179fed4 | |||
| a924a9a627 | |||
| 45d444df0e | |||
| 92461a3366 | |||
| 032a430c51 | |||
| a6a3855e79 | |||
| 2386545814 | |||
| 2059152dd3 | |||
| 32d2c260ab | |||
| 384c7873aa |
+1
-1
@@ -7,7 +7,7 @@ INFRA_VERSION=8
|
|||||||
|
|
||||||
# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
# WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
|
||||||
# These constants are used in the installer script as well
|
# These constants are used in the installer script as well
|
||||||
BASE_IMAGE=cloudron/base:0.3.1
|
BASE_IMAGE=cloudron/base:0.3.3
|
||||||
MYSQL_IMAGE=cloudron/mysql:0.3.2
|
MYSQL_IMAGE=cloudron/mysql:0.3.2
|
||||||
POSTGRESQL_IMAGE=cloudron/postgresql:0.3.1
|
POSTGRESQL_IMAGE=cloudron/postgresql:0.3.1
|
||||||
MONGODB_IMAGE=cloudron/mongodb:0.3.1
|
MONGODB_IMAGE=cloudron/mongodb:0.3.1
|
||||||
|
|||||||
+1
-2
@@ -38,8 +38,7 @@ var appdb = require('./appdb.js'),
|
|||||||
tokendb = require('./tokendb.js'),
|
tokendb = require('./tokendb.js'),
|
||||||
util = require('util'),
|
util = require('util'),
|
||||||
uuid = require('node-uuid'),
|
uuid = require('node-uuid'),
|
||||||
vbox = require('./vbox.js'),
|
vbox = require('./vbox.js');
|
||||||
_ = require('underscore');
|
|
||||||
|
|
||||||
var NOOP = function (app, callback) { return callback(); };
|
var NOOP = function (app, callback) { return callback(); };
|
||||||
|
|
||||||
|
|||||||
@@ -335,6 +335,7 @@ function setInstallationCommand(appId, installationState, values, callback) {
|
|||||||
|
|
||||||
// Rules are:
|
// Rules are:
|
||||||
// uninstall is allowed in any state
|
// uninstall is allowed in any state
|
||||||
|
// force update is allowed in any state including pending_uninstall! (for better or worse)
|
||||||
// restore is allowed from installed or error state
|
// restore is allowed from installed or error state
|
||||||
// update and configure are allowed only in installed state
|
// update and configure are allowed only in installed state
|
||||||
|
|
||||||
|
|||||||
+8
-2
@@ -355,6 +355,11 @@ function startContainer(app, callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function stopContainer(app, callback) {
|
function stopContainer(app, callback) {
|
||||||
|
if (!app.containerId) {
|
||||||
|
debugApp(app, 'No previous container to stop');
|
||||||
|
return callback();
|
||||||
|
}
|
||||||
|
|
||||||
var container = docker.getContainer(app.containerId);
|
var container = docker.getContainer(app.containerId);
|
||||||
debugApp(app, 'Stopping container %s', container.id);
|
debugApp(app, 'Stopping container %s', container.id);
|
||||||
|
|
||||||
@@ -532,7 +537,7 @@ function install(app, callback) {
|
|||||||
deleteVolume.bind(null, app),
|
deleteVolume.bind(null, app),
|
||||||
unregisterSubdomain.bind(null, app),
|
unregisterSubdomain.bind(null, app),
|
||||||
removeOAuthProxyCredentials.bind(null, app),
|
removeOAuthProxyCredentials.bind(null, app),
|
||||||
removeIcon.bind(null, app),
|
// removeIcon.bind(null, app), // do not remove icon for non-appstore installs
|
||||||
unconfigureNginx.bind(null, app),
|
unconfigureNginx.bind(null, app),
|
||||||
|
|
||||||
updateApp.bind(null, app, { installationProgress: '15, Configure nginx' }),
|
updateApp.bind(null, app, { installationProgress: '15, Configure nginx' }),
|
||||||
@@ -671,6 +676,7 @@ function restore(app, callback) {
|
|||||||
|
|
||||||
// note that configure is called after an infra update as well
|
// note that configure is called after an infra update as well
|
||||||
function configure(app, callback) {
|
function configure(app, callback) {
|
||||||
|
// oldConfig can be null during an infra update
|
||||||
var locationChanged = app.oldConfig ? app.oldConfig.location !== app.location : true;
|
var locationChanged = app.oldConfig ? app.oldConfig.location !== app.location : true;
|
||||||
|
|
||||||
async.series([
|
async.series([
|
||||||
@@ -753,7 +759,7 @@ function update(app, callback) {
|
|||||||
stopApp.bind(null, app),
|
stopApp.bind(null, app),
|
||||||
deleteContainer.bind(null, app),
|
deleteContainer.bind(null, app),
|
||||||
addons.teardownAddons.bind(null, app, unusedAddons),
|
addons.teardownAddons.bind(null, app, unusedAddons),
|
||||||
deleteImage.bind(null, app, app.manifest), // delete image even if did not change (see df158b111f)
|
deleteImage.bind(null, app, app.oldConfig.manifest), // delete old image even if did not change (see df158b111f)
|
||||||
// removeIcon.bind(null, app), // do not remove icon, otherwise the UI breaks for a short time...
|
// removeIcon.bind(null, app), // do not remove icon, otherwise the UI breaks for a short time...
|
||||||
|
|
||||||
function (next) {
|
function (next) {
|
||||||
|
|||||||
+1
-1
@@ -609,7 +609,7 @@ function backupBoxAndApps(callback) {
|
|||||||
++processed;
|
++processed;
|
||||||
|
|
||||||
apps.backupApp(app, app.manifest.addons, function (error, backupId) {
|
apps.backupApp(app, app.manifest.addons, function (error, backupId) {
|
||||||
progress.set(progress.BACKUP, step * processed, 'Backing up app at ' + app.location);
|
progress.set(progress.BACKUP, step * processed, 'Backed up app at ' + app.location);
|
||||||
|
|
||||||
if (error && error.reason === AppsError.BAD_STATE) {
|
if (error && error.reason === AppsError.BAD_STATE) {
|
||||||
debugApp(app, 'Skipping backup (istate:%s health:%s). using lastBackupId:%s', app.installationState, app.health, app.lastBackupId);
|
debugApp(app, 'Skipping backup (istate:%s health:%s). using lastBackupId:%s', app.installationState, app.health, app.lastBackupId);
|
||||||
|
|||||||
+1
-1
@@ -25,7 +25,7 @@ var gLogger = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var GROUP_USERS_DN = 'cn=users,ou=groups,dc=cloudron';
|
var GROUP_USERS_DN = 'cn=users,ou=groups,dc=cloudron';
|
||||||
var GROUP_ADMINS_DN = 'cn=admin,ou=groups,dc=cloudron';
|
var GROUP_ADMINS_DN = 'cn=admins,ou=groups,dc=cloudron';
|
||||||
|
|
||||||
function start(callback) {
|
function start(callback) {
|
||||||
assert(typeof callback === 'function');
|
assert(typeof callback === 'function');
|
||||||
|
|||||||
@@ -171,6 +171,8 @@ function sendErrorPageOrRedirect(req, res, message) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// use this instead of sendErrorPageOrRedirect(), in case we have a returnTo provided in the query, to avoid login loops
|
||||||
|
// This usually happens when the OAuth client ID is wrong
|
||||||
function sendError(req, res, message) {
|
function sendError(req, res, message) {
|
||||||
assert.strictEqual(typeof req, 'object');
|
assert.strictEqual(typeof req, 'object');
|
||||||
assert.strictEqual(typeof res, 'object');
|
assert.strictEqual(typeof res, 'object');
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
<li ng-repeat="change in config.update.box.changelog">{{change}}</li>
|
<li ng-repeat="change in config.update.box.changelog">{{change}}</li>
|
||||||
</ul>
|
</ul>
|
||||||
<br/>
|
<br/>
|
||||||
<fieldset>
|
<fieldset ng-show="installedApps | readyToUpdate">
|
||||||
<form name="update_form" role="form" ng-submit="doUpdate()" autocomplete="off">
|
<form name="update_form" role="form" ng-submit="doUpdate()" autocomplete="off">
|
||||||
<div class="form-group" ng-class="{ 'has-error': update_form.password.$dirty && update_form.password.$invalid }">
|
<div class="form-group" ng-class="{ 'has-error': update_form.password.$dirty && update_form.password.$invalid }">
|
||||||
<label class="control-label" for="inputUpdatePassword">Give your password to verify that you are performing that action</label>
|
<label class="control-label" for="inputUpdatePassword">Give your password to verify that you are performing that action</label>
|
||||||
@@ -93,13 +93,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<input type="password" class="form-control" ng-model="update.password" id="inputUpdatePassword" name="password" placeholder="Password" ng-maxlength="512" ng-minlength="5" required autofocus>
|
<input type="password" class="form-control" ng-model="update.password" id="inputUpdatePassword" name="password" placeholder="Password" ng-maxlength="512" ng-minlength="5" required autofocus>
|
||||||
</div>
|
</div>
|
||||||
<input class="ng-hide" type="submit" ng-disabled="update_form.$invalid || update.busy"/>
|
<input class="ng-hide" type="submit" ng-disabled="update_form.$invalid || (installedApps | readyToUpdate) || update.busy"/>
|
||||||
</form>
|
</form>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
||||||
<button type="button" class="btn btn-danger" ng-click="doUpdate()" ng-disabled="update_form.$invalid || update.busy"><i class="fa fa-spinner fa-pulse" ng-show="update.busy"></i> Update</button>
|
<button type="button" class="btn btn-danger" ng-click="doUpdate()" ng-disabled="update_form.$invalid || update.busy" ng-show="installedApps | readyToUpdate"><i class="fa fa-spinner fa-pulse" ng-show="update.busy"></i> Update</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -195,8 +195,8 @@ html {
|
|||||||
|
|
||||||
.appstore-item-badge-testing {
|
.appstore-item-badge-testing {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 15px;
|
right: 0;
|
||||||
top: 15px;
|
top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.appstore-item-content-testing {
|
.appstore-item-content-testing {
|
||||||
@@ -330,6 +330,10 @@ html {
|
|||||||
background-color: #5CB85C;
|
background-color: #5CB85C;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.badge-warning {
|
||||||
|
background-color: #EFBD48;
|
||||||
|
}
|
||||||
|
|
||||||
.badge-danger {
|
.badge-danger {
|
||||||
background-color: $brand-danger;
|
background-color: $brand-danger;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,8 +147,9 @@
|
|||||||
<div class="col-md-10" ng-show="ready && apps.length">
|
<div class="col-md-10" ng-show="ready && apps.length">
|
||||||
<div class="row-no-margin">
|
<div class="row-no-margin">
|
||||||
<div class="col-sm-1 appstore-item" ng-repeat="app in apps">
|
<div class="col-sm-1 appstore-item" ng-repeat="app in apps">
|
||||||
<div class="appstore-item-content highlight" ng-click="showInstall(app)" ng-class="{ 'appstore-item-content-testing': app.publishState === 'testing' }">
|
<div class="appstore-item-content highlight" ng-click="showInstall(app)" ng-class="{ 'appstore-item-content-testing': (app.publishState === 'testing' || app.publishState === 'pending_approval') }">
|
||||||
<span class="badge badge-danger appstore-item-badge-testing" ng-show="app.publishState === 'testing'">Testing</span>
|
<span class="badge badge-danger appstore-item-badge-testing" ng-show="app.publishState === 'testing'">Testing</span>
|
||||||
|
<span class="badge badge-warning appstore-item-badge-testing" ng-show="app.publishState === 'pending_approval'">Pending Approval</span>
|
||||||
<div class="appstore-item-content-icon col-same-height">
|
<div class="appstore-item-content-icon col-same-height">
|
||||||
<img ng-src="{{app.iconUrl}}" onerror="this.onerror=null;this.src='img/appicon_fallback.png'" class="app-icon"/>
|
<img ng-src="{{app.iconUrl}}" onerror="this.onerror=null;this.src='img/appicon_fallback.png'" class="app-icon"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user