diff options
author | Ed Tanous <ed.tanous@intel.com> | 2017-10-06 13:53:06 -0700 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2017-11-06 16:25:49 -0800 |
commit | bbcf670a1c8c7463556eb006bc8f6bbfe29af3e4 (patch) | |
tree | 484eb0804112a112f3a49af78c5112eb68ef0e4e /app/server-control | |
parent | 2a4895547294a5c32eeb2302739f5ce80626520a (diff) | |
download | phosphor-webui-bbcf670a1c8c7463556eb006bc8f6bbfe29af3e4.tar.gz phosphor-webui-bbcf670a1c8c7463556eb006bc8f6bbfe29af3e4.zip |
Modernize web GUI and make it installable on BMC
1. Move from gulp server to webpack. This allows the proper
compression to allow the webui to be embedded in the BMC.
2. Update js paths to use requires, not hardcoded paths. This was
required to make the packaging work correctly.
3. Add babel config to do translation.
4. Update angularjs directive calls to use the angular 1.6 syntax for
promises intead of success and fail.
https://docs.angularjs.org/guide/migration#migrate1.5to1.6-ng-services-$http
5. As a consequence of using NPM/webpack, the versions of angular and
associated modules that were checked in have been updated.
Change-Id: Icb71e2eedb0d9a8943fc914f9dc4be11d0983c00
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'app/server-control')
-rw-r--r-- | app/server-control/controllers/power-operations-controller.html | 8 | ||||
-rw-r--r-- | app/server-control/controllers/remote-console-controller.js | 2 | ||||
-rw-r--r-- | app/server-control/index.js | 12 |
3 files changed, 12 insertions, 10 deletions
diff --git a/app/server-control/controllers/power-operations-controller.html b/app/server-control/controllers/power-operations-controller.html index c49e4c3..8c23d9c 100644 --- a/app/server-control/controllers/power-operations-controller.html +++ b/app/server-control/controllers/power-operations-controller.html @@ -21,7 +21,7 @@ <!-- Power on displays only when server is shutdown --> <div class="row column power-option" ng-hide="dataService.server_state == 'Running' || dataService.server_state == 'Quiesced' || dataService.server_state == 'Unreachable'" ng-class="{disabled: dataService.server_unreachable || (confirm && !power_confirm) || dataService.loading, transitionAll: confirm && power_confirm}"> - <button id="power__power-on" class="btn-secondary inline" ng-click="togglePower()" role="button" ng-disabled="dataService.server_unreachable"><img src="assets/images/icon-power.svg" alt="power on" aria-hidden="true">Power on</button> + <button id="power__power-on" class="btn-secondary inline" ng-click="togglePower()" role="button" ng-disabled="dataService.server_unreachable"><img src="../../assets/images/icon-power.svg" alt="power on" aria-hidden="true">Power on</button> <p class="inline">Attempts to power on the server</p> </div> @@ -37,14 +37,14 @@ <confirm title="cold reboot" confirm="coldboot_confirm" ng-show="coldboot_confirm" cancel="coldbootCancel" callback="coldReboot"></confirm> </div> <div class="row column power-option" ng-hide="dataService.server_state == 'Off' || dataService.server_state == 'Unreachable'" ng-class="{disabled: dataService.server_unreachable || (confirm && !orderly_confirm) || dataService.loading, transitionAll: confirm && orderly_confirm}"> - <button id="power__soft-shutdown" class="btn-secondary inline" ng-click="orderlyShutdownConfirm()" role="button" ng-disabled="dataService.server_unreachable"><img aria-hidden="true" src="assets/images/icon-power.svg" />Orderly shutdown</button> + <button id="power__soft-shutdown" class="btn-secondary inline" ng-click="orderlyShutdownConfirm()" role="button" ng-disabled="dataService.server_unreachable"><img aria-hidden="true" src="../../assets/images/icon-power.svg" />Orderly shutdown</button> <p class="inline">Attempts to stop all software on the server before removing power</p> <confirm title="orderly shutdown" confirm="orderly_confirm" ng-show="orderly_confirm" cancel="orderlyShutdownCancel" callback="orderlyShutdown"></confirm> </div> <div class="row column power-option" ng-hide="dataService.server_state == 'Off' || dataService.server_state == 'Unreachable'" ng-class="{disabled: dataService.server_unreachable || (confirm && !immediately_confirm) || dataService.loading, transitionAll: confirm && immediately_confirm}"> - <button id="power__hard-shutdown" class="btn-secondary inline" ng-click="immediateShutdownConfirm()" role="button" ng-disabled="dataService.server_unreachable"><img aria-hidden="true" src="assets/images/icon-power.svg" />Immediate shutdown</button> + <button id="power__hard-shutdown" class="btn-secondary inline" ng-click="immediateShutdownConfirm()" role="button" ng-disabled="dataService.server_unreachable"><img aria-hidden="true" src="../../assets/images/icon-power.svg" />Immediate shutdown</button> <p class="inline">Removes power from the server without waiting for software to stop</p> <confirm title="immediate shutdown" confirm="immediately_confirm" ng-show="immediately_confirm" cancel="immediatelyShutdownCancel" callback="immediateShutdown"></confirm> </div> </div> -</div>
\ No newline at end of file +</div> diff --git a/app/server-control/controllers/remote-console-controller.js b/app/server-control/controllers/remote-console-controller.js index fffb139..2b69561 100644 --- a/app/server-control/controllers/remote-console-controller.js +++ b/app/server-control/controllers/remote-console-controller.js @@ -7,6 +7,8 @@ * @version 0.1.0 */ +import {hterm, lib} from 'hterm-umdjs'; + window.angular && (function (angular) { 'use strict'; diff --git a/app/server-control/index.js b/app/server-control/index.js index f3ca75c..acc7f2c 100644 --- a/app/server-control/index.js +++ b/app/server-control/index.js @@ -19,32 +19,32 @@ window.angular && (function (angular) { .config(['$routeProvider', function ($routeProvider) { $routeProvider .when('/server-control/bmc-reboot', { - 'templateUrl': 'server-control/controllers/bmc-reboot-controller.html', + 'template': require('./controllers/bmc-reboot-controller.html'), 'controller': 'bmcRebootController', authenticated: true }) .when('/server-control/server-led', { - 'templateUrl': 'server-health/controllers/unit-id-controller.html', + 'template': require('../server-health/controllers/unit-id-controller.html'), 'controller': 'unitIdController', authenticated: true }) .when('/server-control/power-operations', { - 'templateUrl': 'server-control/controllers/power-operations-controller.html', + 'template': require('./controllers/power-operations-controller.html'), 'controller': 'powerOperationsController', authenticated: true }) .when('/server-control/remote-console', { - 'templateUrl': 'server-control/controllers/remote-console-controller.html', + 'template': require('./controllers/remote-console-controller.html'), 'controller': 'remoteConsoleController', authenticated: true }) .when('/server-control/remote-console-window', { - 'templateUrl': 'server-control/controllers/remote-console-window-controller.html', + 'template': require('./controllers/remote-console-window-controller.html'), 'controller': 'remoteConsoleWindowController', authenticated: true }) .when('/server-control', { - 'templateUrl': 'server-control/controllers/power-operations-controller.html', + 'template': require('./controllers/power-operations-controller.html'), 'controller': 'powerOperationsController', authenticated: true }); |