diff --git a/src/js/client.js b/src/js/client.js index 0d0797035..1db80ac8d 100644 --- a/src/js/client.js +++ b/src/js/client.js @@ -500,6 +500,29 @@ angular.module('Application').service('Client', ['$http', '$interval', '$timeout }); }; + Client.prototype.restartApp = function (id, callback) { + var that = this; + + function waitUntilStopped(callback) { + that.getApp(id, function (error, result) { + if (error) return callback(error); + + if (result.runState === 'stopped') return callback(); + setTimeout(waitUntilStopped.bind(null, callback), 2000); + }); + } + + that.stopApp(id, function (error) { + if (error) return callback(error); + + waitUntilStopped(function (error) { + if (error) return callback(error); + + that.startApp(id, callback); + }); + }); + }; + Client.prototype.debugApp = function (id, state, callback) { var data = { appId: id, diff --git a/src/theme.scss b/src/theme.scss index 9555d341a..24c39d5d8 100644 --- a/src/theme.scss +++ b/src/theme.scss @@ -30,9 +30,9 @@ $btn-info-bg: $btn-default-bg; $btn-info-color: $brand-info !default; $btn-info-border: $brand-info !default; -$btn-warning-bg: #333 !default; -$btn-warning-color: $brand-warning !default; -$btn-warning-border: $brand-warning !default; +// $btn-warning-bg: #333 !default; +// $btn-warning-color: $brand-warning !default; +// $btn-warning-border: $brand-warning !default; $btn-danger-bg: $btn-default-bg; $btn-danger-color: $brand-danger !default; @@ -130,6 +130,10 @@ input[type="checkbox"] { text-overflow: ellipsis; } +.btn.pull-right { + margin-left: 5px; +} + // ---------------------------- // Main classes // ---------------------------- diff --git a/src/views/app.html b/src/views/app.html index 76e44f882..0d346f7a7 100644 --- a/src/views/app.html +++ b/src/views/app.html @@ -30,38 +30,44 @@
+ {{ app.manifest.title }}
+
+
+ App ID
+
+ Last updated
+
| Status | -{{ app | installationStateLabel:user }} | -
| App ID | -{{ app.id }} | -
| Upstream Version | -{{ app.upstreamVersion }} | -
| App Package | -{{ app.manifest.title }} | -
| App Package Version | -{{ app.manifest.version }} | -
+ Usage Information
+
+ SFTP
+ Server: {{ config.adminFqdn }}
+ Port: 222
+ Username: {{ user.username }}@{{ app.fqdn }}
+