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>
diff --git a/app/index.js b/app/index.js
index fc781b3..3f277a9 100644
--- a/app/index.js
+++ b/app/index.js
@@ -9,6 +9,90 @@
* @since 0.0.1
*/
+import 'bootstrap/dist/css/bootstrap.css';
+import 'bootstrap/dist/css/bootstrap-theme.css';
+import "font-awesome/css/font-awesome.css"
+import angular from 'angular';
+import angular_cookies from 'angular-cookies';
+import angular_sanitize from 'angular-sanitize';
+import angular_ui_router from 'angular-ui-router';
+import angular_animate from 'angular-animate';
+import angular_clipboard from 'angular-clipboard';
+import angular_ui_bootstrap from 'angular-ui-bootstrap';
+import angular_route from 'angular-route';
+import angular_utils from 'angularUtils/src/angularUtils.js';
+import angular_utils_pagination from 'angularUtils/src/directives/pagination/dirPagination.js';
+require('./styles/index.scss')
+
+// TODO(Ed) clean this up, add the appropriate imports to phosphor-webui
+
+import constants_index from './constants/index.js'
+import environment_constants from './constants/environment-constants.js'
+
+import services_index from './common/services/index.js'
+import constants from './common/services/constants.js'
+import dataService from './common/services/dataService.js'
+import api_utils from './common/services/api-utils.js'
+import userModel from './common/services/userModel.js'
+import apiInterceptor from './common/services/apiInterceptor.js'
+
+import filters_index from './common/filters/index.js'
+
+import directives_index from './common/directives/index.js'
+import app_header from './common/directives/app-header.js'
+import app_navigation from './common/directives/app-navigation.js'
+import confirm from './common/directives/confirm.js'
+import log_event from './common/directives/log-event.js'
+import log_filter from './common/directives/log-filter.js'
+import log_search_control from './common/directives/log-search-control.js'
+import toggle_flag from './common/directives/toggle-flag.js'
+import firmware_list from './common/directives/firmware-list.js'
+import file from './common/directives/file.js'
+import loader from './common/directives/loader.js'
+import paginate from './common/directives/paginate.js'
+
+import login_index from './login/index.js'
+import login_controller from './login/controllers/login-controller.js'
+
+import overview_index from './overview/index.js'
+import system_overview_controller from './overview/controllers/system-overview-controller.js'
+
+import server_control_index from './server-control/index.js'
+import bmc_reboot_controller from './server-control/controllers/bmc-reboot-controller.js'
+import power_operations_controller from './server-control/controllers/power-operations-controller.js'
+import remote_console_controller from './server-control/controllers/remote-console-controller.js'
+import remote_console_window_controller from './server-control/controllers/remote-console-window-controller.js'
+
+import server_health_index from './server-health/index.js'
+import diagnostics_controller from './server-health/controllers/diagnostics-controller.js'
+import inventory_controller from './server-health/controllers/inventory-controller.js'
+import inventory_overview_controller from './server-health/controllers/inventory-overview-controller.js'
+import log_controller from './server-health/controllers/log-controller.js'
+import power_consumption_controller from './server-health/controllers/power-consumption-controller.js'
+import sensors_controller from './server-health/controllers/sensors-controller.js'
+import sensors_overview_controller from './server-health/controllers/sensors-overview-controller.js'
+import unit_id_controller from './server-health/controllers/unit-id-controller.js'
+
+import configuration_index from './configuration/index.js'
+import date_time_controller from './configuration/controllers/date-time-controller.js'
+import file_controller from './configuration/controllers/file-controller.js'
+import network_controller from './configuration/controllers/network-controller.js'
+import security_controller from './configuration/controllers/security-controller.js'
+import firmware_controller from './configuration/controllers/firmware-controller.js'
+
+import firmware_index from './firmware/index.js'
+import bmc_controller from './firmware/controllers/bmc-controller.js'
+import server_controller from './firmware/controllers/server-controller.js'
+
+import multi_server_index from './multi-server/index.js'
+import multi_server_controller from './multi-server/controllers/multi-server-controller.js'
+
+import users_index from './users/index.js'
+import user_accounts_controller from './users/controllers/user-accounts-controller.js'
+
+import phosphor_templates from './templates.js';
+import phosphor_vendors from './vendors.js';
+
window.angular && (function (angular) {
'use strict';
@@ -54,7 +138,6 @@
$rootScope.dataService = dataService;
dataService.path = $location.path();
$rootScope.$on('$routeChangeStart', function(event, next, current){
-
if(next.$$route == null || next.$$route == undefined) return;
if(next.$$route.authenticated){
if(!userModel.isLoggedIn()){