Change navigation structure
Change-Id: I12c819293ce1eda188dc9f257ae9370f1b73cb18
Signed-off-by: Iftekharul Islam <iislam@us.ibm.com>
diff --git a/app/common/directives/app-header.html b/app/common/directives/app-header.html
index 5b2de3d..e9e3f2c 100644
--- a/app/common/directives/app-header.html
+++ b/app/common/directives/app-header.html
@@ -1,17 +1,16 @@
<div id="header__wrapper">
<!-- HEADER -->
<!-- Class of status-light__good has 3 states: status-light__good, status-light__error, status-light__disabled -->
-<!-- Server Power buttton links to 'server power operations' page; Server Status may link to event log page. TBD.-->
<header id="header">
<span class="app__version float-left">{{dataService.app_version}}</span>
<a href="" class="header__logout" ng-click="logout()">Log out</a>
</header>
<div class="header__functions-wrapper" role="heading">
<div class="logo__wrapper"><img src="assets/images/logo.svg" id="header__logo" alt="company logo"/></div>
- <button id="header__server-name">{{dataService.server_id}}</button>
+ <button id="header__server-name">Server {{dataService.server_id}}</button>
<div class="header__functions">
- <a href="" id="header__server-health">Server health<span class="status-light__error">{{dataService.server_health}}</span></a>
- <a href="#/overview/power-operations" class="header__server-power" role="button">Server power<span ng-class="{'status-light__error': dataService.server_state == 'Off', 'status-light__disabled': dataService.server_state == 'Unreachable', 'status-light__good': dataService.server_state == 'Running', 'status-light__warn': dataService.server_state == 'Quiesced'}">{{dataService.server_state}}</span></a>
+ <a href="#/server-health/event-log" id="header__server-health">Server health<span class="status-light__error">{{dataService.server_health}}</span></a>
+ <a href="#/server-control/power-operations" class="header__server-power" role="button">Server power<span ng-class="{'status-light__error': dataService.server_state == 'Off', 'status-light__disabled': dataService.server_state == 'Unreachable', 'status-light__good': dataService.server_state == 'Running', 'status-light__warn': dataService.server_state == 'Quiesced'}">{{dataService.server_state}}</span></a>
<p class="header__refresh">Page last refreshed <span>{{dataService.last_updated |date:'h:mm:ss MMM dd yyyy'}}</span></p>
<button class="header__page-refresh" ng-click="refresh()"><img src="assets/images/icon-refresh-white.svg" alt="refresh page" role="button"/></button>
</div>
diff --git a/app/common/directives/app-navigation.html b/app/common/directives/app-navigation.html
index 6a0fb14..ce7e5c6 100644
--- a/app/common/directives/app-navigation.html
+++ b/app/common/directives/app-navigation.html
@@ -1,65 +1,64 @@
<nav>
<ul id="nav__top-level" ng-style="navStyle">
<li>
- <button class="btn-overview" ng-class="{opened: firstLevel == 'overview'}" ng-click="firstLevel = 'overview';" tabindex="1">
+ <button class="btn-overview" ng-class="{opened: firstLevel == 'overview'}" ng-click="change('overview')" tabindex="1">
- <span class="">Server overview</span></button>
+ <span class="">Server Overview</span></button>
</li>
<li>
- <button class="btn-health" ng-class="{opened: firstLevel == 'health'}" ng-click="firstLevel = 'health';" tabindex="9">
+ <button class="btn-health" ng-class="{opened: firstLevel == 'server-health'}" ng-click="change('server-health')" tabindex="9">
- <span>Server health</span></button>
+ <span>Server Health</span></button>
</li>
<li>
- <button class="btn-control" ng-class="{opened: firstLevel == 'control'}" ng-click="firstLevel = 'control';">
+ <button class="btn-control" ng-class="{opened: firstLevel == 'server-control'}" ng-click="change('server-control')">
- <span>Server control</span></button>
+ <span>Server Control</span></button>
</li>
<li>
- <button class="btn-config" ng-class="{opened: firstLevel == 'config'}" ng-click="firstLevel = 'config';">
+ <button class="btn-config" ng-class="{opened: firstLevel == 'configuration'}" ng-click="change('configuration')">
<span>Configuration</span></button>
</li>
<li>
- <button class="btn-firmware" ng-class="{opened: firstLevel == 'firmware'}" ng-click="firstLevel = 'firmware';">
+ <button class="btn-firmware" ng-class="{opened: firstLevel == 'firmware'}" ng-click="change('firmware')">
<span>Firmware</span></button>
</li>
<li>
- <button class="btn-users" ng-class="{opened: firstLevel == 'users'}" ng-click="firstLevel = 'users';">
+ <button class="btn-users" ng-class="{opened: firstLevel == 'users'}" ng-click="change('users')">
<span>Users</span></button>
</li>
</ul>
<ul class="nav__second-level btn-overview" ng-style="navStyle" ng-class="{opened: firstLevel == 'overview'}">
- <li ng-class="{'active': (path == '/overview/system')}" tabindex="2"><a href="#/system-overview">System overview</a></li>
-
+ <li ng-class="{'active': (path == '/overview' || path == '/overview/system')}" tabindex="2"><a href="#/overview/system">System Overview</a></li>
</ul>
- <ul class="nav__second-level btn-health" ng-style="navStyle" ng-class="{opened: firstLevel == 'health'}">
- <li ng-class="{'active': (path == '/overview/log')}"><a href="#/overview/log" tabindex="7">Event log</a></li>
- <li ng-class="{'active': (path == '/overview/inventory-overview')}"><a href="#/overview/inventory-overview">Hardware Inventory</a></li>
- <li ng-class="{'active': (path == '/overview/sensors-overview') || (path == '/overview/sensors')}"><a href="#/overview/sensors-overview">Sensor data</a></li>
- <li ng-class="{'active': (path == '/overview/power-consumption')}"><a href="" tabindex="4">Power consumption</a></li>
- <li ng-class="{'active': (path == '/overview/unit-id')}"><a href="#/overview/unit-id" tabindex="6">Unit id</a></li>
- <li><a href="">Diagnostics</a></li>
+ <ul class="nav__second-level btn-health" ng-style="navStyle" ng-class="{opened: firstLevel == 'server-health'}">
+ <li ng-class="{'active': (path == '/server-health' || path == '/server-health/event-log')}"><a href="#/server-health/event-log" tabindex="7">Event Log</a></li>
+ <li ng-class="{'active': (path == '/server-health/inventory-overview' || path == '/server-health/inventory')}"><a href="#/server-health/inventory-overview">Hardware Inventory</a></li>
+ <li ng-class="{'active': (path == '/server-health/sensors-overview' || path == '/server-health/sensors')}"><a href="#/server-health/sensors-overview">Sensor Data</a></li>
+ <li ng-class="{'active': (path == '/server-health/power-consumption')}"><a href="#/server-health/power-consumption" tabindex="4">Power consumption</a></li>
+ <li ng-class="{'active': (path == '/server-health/unit-id')}"><a href="#/server-health/unit-id" tabindex="6">Unit ID</a></li>
+ <li ng-class="{'active': (path == '/server-health/diagnostics')}"><a href="#/server-health/diagnostics">Diagnostics</a></li>
</ul>
- <ul class="nav__second-level btn-control" ng-style="navStyle" ng-class="{opened: firstLevel == 'control'}">
- <li ng-class="{'active': (path == '/overview/power-operations')}" tabindex="3"><a href="#/overview/power-operations">Server power operations</a></li>
- <li ng-class="{'active': (path == '/overview/bmc-reboot')}"><a href="#/overview/bmc-reboot" tabindex="8">Reboot BMC</a></li>
- <li ng-class="{'active': (path == '/overview/remote-console')}"><a href="" tabindex="5">Remote console</a></li>
+ <ul class="nav__second-level btn-control" ng-style="navStyle" ng-class="{opened: firstLevel == 'server-control'}">
+ <li ng-class="{'active': (path == '/server-control' || path == '/server-control/power-operations')}" tabindex="3"><a href="#/server-control/power-operations">Server power operations</a></li>
+ <li ng-class="{'active': (path == '/server-control/bmc-reboot')}"><a href="#/server-control/bmc-reboot" tabindex="8">Reboot BMC</a></li>
+ <li ng-class="{'active': (path == '/server-control/remote-console')}"><a href="#/server-control/remote-console" tabindex="5">Remote console</a></li>
</ul>
- <ul class="nav__second-level btn-firmware" ng-style="navStyle" ng-class="{opened: firstLevel == 'config'}">
- <li><a href="">Network Configuration</a></li>
- <li><a href="">Date & Time</a></li>
- <li><a href="">Security</a></li>
- <li><a href="">Configuration File</a></li>
+ <ul class="nav__second-level btn-firmware" ng-style="navStyle" ng-class="{opened: firstLevel == 'configuration'}">
+ <li ng-class="{'active': (path == '/configuration' || path == '/configuration/network')}"><a href="#/configuration/network">Network Configuration</a></li>
+ <li ng-class="{'active': (path == '/configuration/date-time')}"><a href="#/configuration/date-time">Date & Time</a></li>
+ <li ng-class="{'active': (path == '/configuration/security')}"><a href="#/configuration/security">Security</a></li>
+ <li ng-class="{'active': (path == '/configuration/file')}"><a href="#/configuration/file">Configuration File</a></li>
</ul>
<ul class="nav__second-level btn-firmware" ng-style="navStyle" ng-class="{opened: firstLevel == 'firmware'}">
- <li><a href="">BMC Firmawre</a></li>
- <li><a href="">Server Firmware</a></li>
+ <li ng-class="{'active': (path == '/firmware' || path == '/firmware/bmc')}"><a href="#/firmware/bmc">BMC Firmawre</a></li>
+ <li ng-class="{'active': (path == '/firmware/server')}"><a href="#/firmware/server">Server Firmware</a></li>
</ul>
<ul class="nav__second-level btn-users" ng-style="navStyle" ng-class="{opened: firstLevel == 'users'}">
- <li><a href="">Manage User Account</a></li>
+ <li ng-class="{'active': (path == '/users' || path == '/users/manage-accounts')}"><a href="#/users/manage-accounts">Manage User Account</a></li>
</ul>
</nav>
diff --git a/app/common/directives/app-navigation.js b/app/common/directives/app-navigation.js
index d09588a..6939a3c 100644
--- a/app/common/directives/app-navigation.js
+++ b/app/common/directives/app-navigation.js
@@ -11,11 +11,20 @@
'path': '=',
'showNavigation': '='
},
- 'controller': ['$scope', 'dataService', function($scope, dataService){
+ 'controller': ['$scope', '$location', 'dataService', function($scope, $location, dataService){
+ $scope.change = function(firstLevel){
+ $scope.firstLevel = firstLevel;
+ $location.path('/'+firstLevel);
+ }
$scope.$watch('showNavigation', function(){
var paddingTop = 0;
- $scope.firstLevel = 'overview';
- $scope.secondLevel = 'system_overview';
+ var urlRoot = $location.path().split("/")[1];
+ if(urlRoot != ""){
+ $scope.firstLevel = urlRoot;
+ }else{
+ $scope.firstLevel = 'overview';
+ }
+
if($scope.showNavigation){
paddingTop = document.getElementById('header__wrapper').offsetHeight;
}
diff --git a/app/common/directives/dirPagination.tpl.html b/app/common/directives/dirPagination.tpl.html
new file mode 100644
index 0000000..d3c0e41
--- /dev/null
+++ b/app/common/directives/dirPagination.tpl.html
@@ -0,0 +1,18 @@
+<ul class="pagination" ng-if="1 < pages.length || !autoHide">
+ <li ng-if="boundaryLinks" ng-class="{ disabled : pagination.current == 1 }">
+ <a href="" ng-click="setCurrent(1)">First</a>
+ </li>
+ <li ng-if="directionLinks" ng-class="{ disabled : pagination.current == 1 }">
+ <a href="" ng-click="setCurrent(pagination.current - 1)">Previous</a>
+ </li>
+ <li ng-repeat="pageNumber in pages track by tracker(pageNumber, $index)" ng-class="{ active : pagination.current == pageNumber, disabled : pageNumber == '...' }">
+ <a href="" ng-click="setCurrent(pageNumber)">{{ pageNumber }}</a>
+ </li>
+
+ <li ng-if="directionLinks" ng-class="{ disabled : pagination.current == pagination.last }">
+ <a href="" ng-click="setCurrent(pagination.current + 1)">Next</a>
+ </li>
+ <li ng-if="boundaryLinks" ng-class="{ disabled : pagination.current == pagination.last }">
+ <a href="" ng-click="setCurrent(pagination.last)">Last</a>
+ </li>
+</ul>
\ No newline at end of file
diff --git a/app/common/directives/toggle-flag.js b/app/common/directives/toggle-flag.js
new file mode 100644
index 0000000..aca09ca
--- /dev/null
+++ b/app/common/directives/toggle-flag.js
@@ -0,0 +1,31 @@
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.common.directives')
+ .directive('toggleFlag', function ($document) {
+ return {
+ restrict: 'A',
+ link: function (scope, element, attrs) {
+
+ function elementClick(e) {
+ e.stopPropagation();
+ }
+
+ function documentClick(e) {
+ scope[attrs.toggleFlag] = false;
+ scope.$apply();
+ }
+
+ element.on('click', elementClick);
+ $document.on('click', documentClick);
+
+ // remove event handlers when directive is destroyed
+ scope.$on('$destroy', function () {
+ element.off('click', elementClick);
+ $document.off('click', documentClick);
+ });
+ }
+ };
+ });
+})(window.angular);
\ No newline at end of file
diff --git a/app/common/services/api-utils.js b/app/common/services/api-utils.js
index 65ae86b..0a96f62 100644
--- a/app/common/services/api-utils.js
+++ b/app/common/services/api-utils.js
@@ -19,6 +19,8 @@
CHASSIS_POWER_STATE: Constants.CHASSIS_POWER_STATE,
HOST_STATE_TEXT: Constants.HOST_STATE,
HOST_STATE: Constants.HOST_STATE,
+ LED_STATE: Constants.LED_STATE,
+ LED_STATE_TEXT: Constants.LED_STATE_TEXT,
getChassisState: function(callback){
$http({
method: 'GET',
@@ -53,6 +55,23 @@
console.log(error);
});
},
+ getLEDState: function(callback){
+ $http({
+ method: 'GET',
+ url: SERVICE.API_CREDENTIALS.host + "/xyz/openbmc_project/led/groups/enclosure_identify",
+ headers: {
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json'
+ },
+ withCredentials: true
+ }).success(function(response){
+ var json = JSON.stringify(response);
+ var content = JSON.parse(json);
+ callback(content.data.Asserted);
+ }).error(function(error){
+ console.log(error);
+ });
+ },
login: function(username, password, callback){
$http({
method: 'POST',
@@ -69,7 +88,11 @@
}
}).error(function(error){
if(callback){
- callback(null, true);
+ if(error && error.status && error.status == 'error'){
+ callback(error);
+ }else{
+ callback(error, true);
+ }
}
console.log(error);
});
@@ -143,6 +166,30 @@
}
});
},
+ setLEDState: function(state, callback){
+ $http({
+ method: 'PUT',
+ url: SERVICE.API_CREDENTIALS.host + "/xyz/openbmc_project/led/groups/enclosure_identify/attr/Asserted",
+ headers: {
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json'
+ },
+ withCredentials: true,
+ data: JSON.stringify({"data": state})
+ }).success(function(response){
+ var json = JSON.stringify(response);
+ var content = JSON.parse(json);
+ if(callback){
+ return callback(content.status);
+ }
+ }).error(function(error){
+ if(callback){
+ callback(error);
+ }else{
+ console.log(error);
+ }
+ });
+ },
bmcReboot: function(callback){
$http({
method: 'PUT',
@@ -262,6 +309,57 @@
console.log(error);
}
});
+ },
+ getLogs: function(callback){
+ $http({
+ method: 'GET',
+ url: SERVICE.API_CREDENTIALS.host + "/xyz/openbmc_project/logging/enumerate",
+ headers: {
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json'
+ },
+ withCredentials: true
+ }).success(function(response){
+ var json = JSON.stringify(response);
+ var content = JSON.parse(json);
+ var dataClone = JSON.parse(JSON.stringify(content.data));
+ var data = [];
+ var severityCode = '';
+ var priority = '';
+ var resolved = false;
+ var relatedItems = [];
+
+ for(var key in content.data){
+ if(content.data.hasOwnProperty(key) && content.data[key].hasOwnProperty('Id')){
+ var severityFlags = {low: false, medium: false, high: false};
+ severityCode = content.data[key].Severity.split(".").pop();
+ priority = Constants.SEVERITY_TO_PRIORITY_MAP[severityCode];
+ severityFlags[priority.toLowerCase()] = true;
+ relatedItems = [];
+ content.data[key].associations.forEach(function(item){
+ relatedItems.push(item[2]); //@TODO: better way to find the third item?
+ });
+
+ data.push(Object.assign({
+ path: key,
+ copied: false,
+ priority: priority,
+ severity_code: severityCode,
+ severity_flags: severityFlags,
+ additional_data: content.data[key].AdditionalData.join("\n"),
+ selected: false,
+ search_text: (severityCode + " " + content.data[key].Severity + " " + content.data[key].AdditionalData.join(" ")).toLowerCase(),
+ meta: false,
+ confirm: false,
+ related_items: relatedItems,
+ data: {key: key, value: content.data[key]}
+ }, content.data[key]));
+ }
+ }
+ callback(data, dataClone);
+ }).error(function(error){
+ console.log(error);
+ });
}
};
return SERVICE;
diff --git a/app/common/services/apiInterceptor.js b/app/common/services/apiInterceptor.js
index 0c75caa..bd4743a 100644
--- a/app/common/services/apiInterceptor.js
+++ b/app/common/services/apiInterceptor.js
@@ -16,16 +16,23 @@
.service('apiInterceptor', ['$q', '$rootScope', 'dataService', function($q, $rootScope, dataService){
return {
'request': function(config){
- dataService.server_unreachable = false;
dataService.loading = true;
+ config.timeout = 10000;
return config;
},
'response': function(response){
dataService.loading = false;
- dataService.last_updated = new Date();
+ //not interested in template requests
+ if(!/^https?\:/i.test(response.config.url)){
+ return response;
+ }
+
+ dataService.last_updated = new Date();
if(response == null){
dataService.server_unreachable = true;
+ }else{
+ dataService.server_unreachable = false;
}
if(response && response.status == 'error' &&
diff --git a/app/common/services/constants.js b/app/common/services/constants.js
index b98d5d6..86ba54e 100644
--- a/app/common/services/constants.js
+++ b/app/common/services/constants.js
@@ -20,7 +20,7 @@
password: "testpass",
},
API_CREDENTIALS: {
- host: 'https://9.3.164.147'
+ host: 'https://9.41.165.233/'
},
API_RESPONSE: {
ERROR_STATUS: 'error',
@@ -43,8 +43,24 @@
off: -1,
booting: 0,
unreachable: -2
+ },
+ LED_STATE: {
+ on: true,
+ off: false
+ },
+ LED_STATE_TEXT: {
+ on: 'on',
+ off: 'off'
+ },
+ SEVERITY_TO_PRIORITY_MAP:{
+ Informational: 'Low',
+ Error: 'High',
+ Warning: 'Medium'
+ },
+ PAGINATION: {
+ LOG_ITEMS_PER_PAGE: 4
}
};
});
-})(window.angular);
\ No newline at end of file
+})(window.angular);
diff --git a/app/common/services/dataService.js b/app/common/services/dataService.js
index 704df75..2affcc4 100644
--- a/app/common/services/dataService.js
+++ b/app/common/services/dataService.js
@@ -19,7 +19,8 @@
this.server_state = 'Unreachable';
this.server_status = -2;
this.chassis_state = 'On';
- this.server_id = "Server 9.3.164.147";
+ this.LED_state = Constants.LED_STATE_TEXT.off;
+ this.server_id = Constants.API_CREDENTIALS.host.replace(/[^\d]+/m,"");
this.last_updated = new Date();
this.loading = false;
diff --git a/app/common/services/userModel.js b/app/common/services/userModel.js
index dba607d..747b288 100644
--- a/app/common/services/userModel.js
+++ b/app/common/services/userModel.js
@@ -41,6 +41,8 @@
response.status == APIUtils.API_RESPONSE.SUCCESS_STATUS){
sessionStorage.removeItem('LOGIN_ID');
callback(true);
+ }else if(response.status == APIUtils.API_RESPONSE.ERROR_STATUS){
+ callback(false);
}else{
callback(false, error);
}
diff --git a/app/common/styles/base/core.scss b/app/common/styles/base/core.scss
index 18f78aa..13ba9e6 100644
--- a/app/common/styles/base/core.scss
+++ b/app/common/styles/base/core.scss
@@ -17,7 +17,6 @@
}
&:hover {
color: $links__hover;
- text-decoration: underline;
}
:focus {
color: $links;
diff --git a/app/common/styles/base/mixins.scss b/app/common/styles/base/mixins.scss
index 3313a88..acc8fd4 100644
--- a/app/common/styles/base/mixins.scss
+++ b/app/common/styles/base/mixins.scss
@@ -57,18 +57,18 @@
background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' width='32' height='24' viewBox='0 0 32 24'><polygon points='0,0 32,0 16,24' style='fill: #b8c1c1'></polygon></svg>");
}
-//Offset allows to subtract a custom padding/margin offset
+
@mixin calcColumn-4 ($offset: 0) {
min-width: calc(100% * (1/4) - #{$offset});
}
-@mixin calcColumn-3 ($offset: 0){
- min-width: calc(100% * (1/3) - #{$offset});
+@mixin calcColumn-3 {
+ min-width: calc(100% * (1/3) - 5px);
}
-@mixin calcSplitColumn ($offset: 0) {
- min-width: calc(100% * (1/2) - #{$offset});
+@mixin calcSplitColumn {
+ min-width: calc(100% * (1/2) - 5px);
}
diff --git a/app/common/styles/directives/app-navigation.scss b/app/common/styles/directives/app-navigation.scss
index 29932e4..99fef2b 100644
--- a/app/common/styles/directives/app-navigation.scss
+++ b/app/common/styles/directives/app-navigation.scss
@@ -1,4 +1,4 @@
-$nav__toplvlWidth: 120px;
+$nav__toplvlWidth: 125px;
$nav__seclvlWidth: 240px;
// Top level navigation
diff --git a/app/common/styles/elements/accordion.scss b/app/common/styles/elements/accordion.scss
index 9cf310f..c3d9e0f 100644
--- a/app/common/styles/elements/accordion.scss
+++ b/app/common/styles/elements/accordion.scss
@@ -7,18 +7,16 @@
background: $darkpurple;
color: $white;
margin-left: 0;
-
.event__actions {
margin-top: 1em;
margin-right: 10px;
@include mediaQuery(medium) {
- margin-top: 0;
+ margin-top: -6px;
}
@include mediaQuery(large) {
margin-right: -20px;
}
}
-
}
.accord-trigger {
diff --git a/app/common/styles/elements/content-search.scss b/app/common/styles/elements/content-search.scss
index fe67af2..3bb3ffa 100644
--- a/app/common/styles/elements/content-search.scss
+++ b/app/common/styles/elements/content-search.scss
@@ -9,7 +9,6 @@
position: relative;
margin-right: 1em;
margin-top: .5em;
- margin-bottom: 1em;
#content__search-input {
margin: 0;
border: 1px solid $lightgrey;
diff --git a/app/common/styles/elements/index.scss b/app/common/styles/elements/index.scss
index d0208ac..d35b79a 100644
--- a/app/common/styles/elements/index.scss
+++ b/app/common/styles/elements/index.scss
@@ -2,10 +2,11 @@
@import "toggle-switch";
@import "toggle-filter";
@import "status";
+@import "tags";
@import "alerts";
@import "inline-confirm";
@import "accordion";
@import "content-search";
@import "paginate";
-@import "export";
-@import "thresholds";
\ No newline at end of file
+@import "thresholds";
+@import "export";
\ No newline at end of file
diff --git a/app/common/styles/elements/paginate.scss b/app/common/styles/elements/paginate.scss
index 2df88cc..461b854 100644
--- a/app/common/styles/elements/paginate.scss
+++ b/app/common/styles/elements/paginate.scss
@@ -11,6 +11,7 @@
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
+ padding: 0 10px;
}
.pagination li { background-color: transparent; list-style-type: none; }
@@ -65,15 +66,15 @@
}
.pagination li:first-child a::before,
-.pagination li:last-child a::after { content: "\027A0"; }
+
.pagination li:nth-of-type(2) a::before,
-.pagination li:nth-last-of-type(2) a::after { content: "\0279E"; }
+
.pagination li:first-child a::before,
.pagination li:nth-of-type(2) a::before { -webkit-transform: rotate(180deg); transform: rotate(180deg); }
-.pagination li.current a {
+.pagination li.current a, .pagination li.active a {
padding-top:.25em;
color: $white;
background-color: $lightbg__primary;
diff --git a/app/common/styles/elements/thresholds.scss b/app/common/styles/elements/thresholds.scss
index e8192b3..06e872f 100644
--- a/app/common/styles/elements/thresholds.scss
+++ b/app/common/styles/elements/thresholds.scss
@@ -3,10 +3,9 @@
$threshColorLighten: 5%;
.threshold-chart__wrapper {
position: relative;
- padding-bottom: 2em;
.threshold__label {
position: absolute;
- top: 25%;
+ top: 38%;
transform: translateY(-50%);
font-weight: 700;
&.low {
@@ -24,7 +23,7 @@
.threshold-chart {
position: relative;
line-height: 0;
- padding: .8em 0 2em 3px;
+ padding: .8em 0 2em 0;
margin: 0 2.5em;
//margin: 0 auto;
.threshold__marker {
@@ -46,12 +45,7 @@
white-space: nowrap;
}
}
- .threshold__marker {
- &.thresh__low-critical .threshold__value {
- left: 0;
- @include slowTransition-all;
- }
- }
+
.threshold {
display: inline-block;
background-color: $thresh-normal;
diff --git a/app/common/styles/layout/content.scss b/app/common/styles/layout/content.scss
index 18c34b9..e36fa66 100644
--- a/app/common/styles/layout/content.scss
+++ b/app/common/styles/layout/content.scss
@@ -11,6 +11,6 @@
}
section.row {
- //padding-left: 0;
- //padding-right: 0;
+ padding-left: 0;
+ padding-right: 0;
}
\ No newline at end of file
diff --git a/app/configuration/controllers/date-time-controller.html b/app/configuration/controllers/date-time-controller.html
new file mode 100644
index 0000000..cd760b4
--- /dev/null
+++ b/app/configuration/controllers/date-time-controller.html
@@ -0,0 +1,5 @@
+<div id="configuration-date-time">
+ <div class="row column">
+ <h1>Date time</h1>
+ </div>
+</div>
\ No newline at end of file
diff --git a/app/configuration/controllers/date-time-controller.js b/app/configuration/controllers/date-time-controller.js
new file mode 100644
index 0000000..75662cc
--- /dev/null
+++ b/app/configuration/controllers/date-time-controller.js
@@ -0,0 +1,26 @@
+/**
+ * Controller for date-time
+ *
+ * @module app/configuration
+ * @exports dateTimeController
+ * @name dateTimeController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.configuration')
+ .controller('dateTimeController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/configuration/controllers/file-controller.html b/app/configuration/controllers/file-controller.html
new file mode 100644
index 0000000..0840b81
--- /dev/null
+++ b/app/configuration/controllers/file-controller.html
@@ -0,0 +1,5 @@
+<div id="configuration-file">
+ <div class="row column">
+ <h1>File</h1>
+ </div>
+</div>
\ No newline at end of file
diff --git a/app/configuration/controllers/file-controller.js b/app/configuration/controllers/file-controller.js
new file mode 100644
index 0000000..3870f11
--- /dev/null
+++ b/app/configuration/controllers/file-controller.js
@@ -0,0 +1,26 @@
+/**
+ * Controller for file
+ *
+ * @module app/configuration
+ * @exports fileController
+ * @name fileController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.configuration')
+ .controller('fileController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/configuration/controllers/network-controller.html b/app/configuration/controllers/network-controller.html
new file mode 100644
index 0000000..cea74d9
--- /dev/null
+++ b/app/configuration/controllers/network-controller.html
@@ -0,0 +1,5 @@
+<div id="configuration-network">
+ <div class="row column">
+ <h1>Network</h1>
+ </div>
+</div>
\ No newline at end of file
diff --git a/app/configuration/controllers/network-controller.js b/app/configuration/controllers/network-controller.js
new file mode 100644
index 0000000..31b5030
--- /dev/null
+++ b/app/configuration/controllers/network-controller.js
@@ -0,0 +1,26 @@
+/**
+ * Controller for network
+ *
+ * @module app/configuration
+ * @exports networkController
+ * @name networkController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.configuration')
+ .controller('networkController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/configuration/controllers/security-controller.html b/app/configuration/controllers/security-controller.html
new file mode 100644
index 0000000..bcbfa28
--- /dev/null
+++ b/app/configuration/controllers/security-controller.html
@@ -0,0 +1,5 @@
+<div id="configuration-security">
+ <div class="row column">
+ <h1>Security</h1>
+ </div>
+</div>
\ No newline at end of file
diff --git a/app/configuration/controllers/security-controller.js b/app/configuration/controllers/security-controller.js
new file mode 100644
index 0000000..e3a7778
--- /dev/null
+++ b/app/configuration/controllers/security-controller.js
@@ -0,0 +1,26 @@
+/**
+ * Controller for security
+ *
+ * @module app/configuration
+ * @exports securityController
+ * @name securityController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.configuration')
+ .controller('securityController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/configuration/index.js b/app/configuration/index.js
new file mode 100644
index 0000000..a68d5a0
--- /dev/null
+++ b/app/configuration/index.js
@@ -0,0 +1,46 @@
+/**
+ * A module for the configuration
+ *
+ * @module app/configuration/index
+ * @exports app/configuration/index
+ * @version 0.0.1
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.configuration', [
+ 'ngRoute',
+ 'app.constants',
+ 'app.common.services'
+ ])
+ // Route configuration
+ .config(['$routeProvider', function ($routeProvider) {
+ $routeProvider
+ .when('/configuration/network', {
+ 'templateUrl': 'configuration/controllers/network-controller.html',
+ 'controller': 'networkController',
+ authenticated: true
+ })
+ .when('/configuration/security', {
+ 'templateUrl': 'configuration/controllers/security-controller.html',
+ 'controller': 'securityController',
+ authenticated: true
+ }).when('/configuration/date-time', {
+ 'templateUrl': 'configuration/controllers/date-time-controller.html',
+ 'controller': 'dateTimeController',
+ authenticated: true
+ })
+ .when('/configuration/file', {
+ 'templateUrl': 'configuration/controllers/file-controller.html',
+ 'controller': 'fileController',
+ authenticated: true
+ }).when('/configuration', {
+ 'templateUrl': 'configuration/controllers/network-controller.html',
+ 'controller': 'networkController',
+ authenticated: true
+ });
+ }]);
+
+})(window.angular);
diff --git a/app/configuration/styles/date-time.scss b/app/configuration/styles/date-time.scss
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/configuration/styles/date-time.scss
diff --git a/app/configuration/styles/file.scss b/app/configuration/styles/file.scss
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/configuration/styles/file.scss
diff --git a/app/configuration/styles/index.scss b/app/configuration/styles/index.scss
new file mode 100644
index 0000000..7c8006a
--- /dev/null
+++ b/app/configuration/styles/index.scss
@@ -0,0 +1,4 @@
+@import "./network.scss";
+@import "./security.scss";
+@import "./date-time.scss";
+@import "./file.scss";
\ No newline at end of file
diff --git a/app/configuration/styles/network.scss b/app/configuration/styles/network.scss
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/configuration/styles/network.scss
diff --git a/app/configuration/styles/security.scss b/app/configuration/styles/security.scss
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/configuration/styles/security.scss
diff --git a/app/firmware/controllers/bmc-controller.html b/app/firmware/controllers/bmc-controller.html
new file mode 100644
index 0000000..61f7493
--- /dev/null
+++ b/app/firmware/controllers/bmc-controller.html
@@ -0,0 +1,5 @@
+<div id="firmware-bmc">
+ <div class="row column">
+ <h1>Firmware BMC</h1>
+ </div>
+</div>
\ No newline at end of file
diff --git a/app/firmware/controllers/bmc-controller.js b/app/firmware/controllers/bmc-controller.js
new file mode 100644
index 0000000..0b3a622
--- /dev/null
+++ b/app/firmware/controllers/bmc-controller.js
@@ -0,0 +1,26 @@
+/**
+ * Controller for bmc
+ *
+ * @module app/firmware
+ * @exports bmcController
+ * @name bmcController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.firmware')
+ .controller('bmcController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/firmware/controllers/server-controller.html b/app/firmware/controllers/server-controller.html
new file mode 100644
index 0000000..a99d17e
--- /dev/null
+++ b/app/firmware/controllers/server-controller.html
@@ -0,0 +1,5 @@
+<div id=firmware-server">
+ <div class="row column">
+ <h1>Firmware Server</h1>
+ </div>
+</div>
\ No newline at end of file
diff --git a/app/firmware/controllers/server-controller.js b/app/firmware/controllers/server-controller.js
new file mode 100644
index 0000000..daf97b4
--- /dev/null
+++ b/app/firmware/controllers/server-controller.js
@@ -0,0 +1,26 @@
+/**
+ * Controller for server
+ *
+ * @module app/firmware
+ * @exports serverController
+ * @name serverController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.firmware')
+ .controller('serverController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/firmware/index.js b/app/firmware/index.js
new file mode 100644
index 0000000..8094a40
--- /dev/null
+++ b/app/firmware/index.js
@@ -0,0 +1,38 @@
+/**
+ * A module for the firmware
+ *
+ * @module app/firmware/index
+ * @exports app/firmware/index
+ * @version 0.0.1
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.firmware', [
+ 'ngRoute',
+ 'app.constants',
+ 'app.common.services'
+ ])
+ // Route configuration
+ .config(['$routeProvider', function ($routeProvider) {
+ $routeProvider
+ .when('/firmware/bmc', {
+ 'templateUrl': 'firmware/controllers/bmc-controller.html',
+ 'controller': 'bmcController',
+ authenticated: true
+ })
+ .when('/firmware/server', {
+ 'templateUrl': 'firmware/controllers/server-controller.html',
+ 'controller': 'serverController',
+ authenticated: true
+ })
+ .when('/firmware', {
+ 'templateUrl': 'firmware/controllers/bmc-controller.html',
+ 'controller': 'bmcController',
+ authenticated: true
+ });
+ }]);
+
+})(window.angular);
diff --git a/app/firmware/styles/bmc.scss b/app/firmware/styles/bmc.scss
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/firmware/styles/bmc.scss
diff --git a/app/firmware/styles/index.scss b/app/firmware/styles/index.scss
new file mode 100644
index 0000000..9595341
--- /dev/null
+++ b/app/firmware/styles/index.scss
@@ -0,0 +1,2 @@
+@import "./bmc.scss";
+@import "./server.scss";
\ No newline at end of file
diff --git a/app/firmware/styles/server.scss b/app/firmware/styles/server.scss
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/firmware/styles/server.scss
diff --git a/app/index.html b/app/index.html
index 0ed4d3a..f2065a6 100644
--- a/app/index.html
+++ b/app/index.html
@@ -21,6 +21,8 @@
<!-- build:js scripts/vendor.min.js -->
<script src="../bower_components/angular/angular.min.js"></script>
<script src="../bower_components/angular-route/angular-route.min.js"></script>
+ <script src="../bower_components/angular-clipboard/angular-clipboard.min.js"></script>
+ <script src="../bower_components/angularUtils-pagination/dirPagination.min.js"></script>
<!-- endbuild -->
<!-- build:js scripts/app.min.js -->
@@ -44,19 +46,35 @@
<script src="common/directives/app-header.js"></script>
<script src="common/directives/app-navigation.js"></script>
<script src="common/directives/confirm.js"></script>
+ <script src="common/directives/toggle-flag.js"></script>
- <script src="login/index.js"></script>
- <script src="login/controllers/login-controller.js"></script>
- <script src="overview/index.js"></script>
- <script src="overview/controllers/bmc-reboot-controller.js"></script>
- <script src="overview/controllers/power-operations-controller.js"></script>
- <script src="overview/controllers/system-overview-controller.js"></script>
- <script src="overview/controllers/unit-id-controller.js"></script>
- <script src="overview/controllers/log-controller.js"></script>
- <script src="overview/controllers/sensors-controller.js"></script>
- <script src="overview/controllers/sensors-overview-controller.js"></script>
- <script src="overview/controllers/inventory-controller.js"></script>
- <script src="overview/controllers/inventory-overview-controller.js"></script>
+ <script src="login/index.js"></script>
+ <script src="login/controllers/login-controller.js"></script>
+ <script src="overview/index.js"></script>
+ <script src="overview/controllers/system-overview-controller.js"></script>
+ <script src="server-control/index.js"></script>
+ <script src="server-control/controllers/bmc-reboot-controller.js"></script>
+ <script src="server-control/controllers/power-operations-controller.js"></script>
+ <script src="server-control/controllers/remote-console-controller.js"></script>
+ <script src="server-health/index.js"></script>
+ <script src="server-health/controllers/diagnostics-controller.js"></script>
+ <script src="server-health/controllers/inventory-controller.js"></script>
+ <script src="server-health/controllers/inventory-overview-controller.js"></script>
+ <script src="server-health/controllers/log-controller.js"></script>
+ <script src="server-health/controllers/power-consumption-controller.js"></script>
+ <script src="server-health/controllers/sensors-controller.js"></script>
+ <script src="server-health/controllers/sensors-overview-controller.js"></script>
+ <script src="server-health/controllers/unit-id-controller.js"></script>
+ <script src="configuration/index.js"></script>
+ <script src="configuration/controllers/date-time-controller.js"></script>
+ <script src="configuration/controllers/file-controller.js"></script>
+ <script src="configuration/controllers/network-controller.js"></script>
+ <script src="configuration/controllers/security-controller.js"></script>
+ <script src="firmware/index.js"></script>
+ <script src="firmware/controllers/bmc-controller.js"></script>
+ <script src="firmware/controllers/server-controller.js"></script>
+ <script src="users/index.js"></script>
+ <script src="users/controllers/user-accounts-controller.js"></script>
<!-- endbuild -->
</body>
diff --git a/app/index.js b/app/index.js
index f799e29..11c3576 100644
--- a/app/index.js
+++ b/app/index.js
@@ -16,6 +16,8 @@
.module('app', [
// Dependencies
'ngRoute',
+ 'angular-clipboard',
+ 'angularUtils.directives.dirPagination',
// Basic resources
'app.constants',
'app.templates',
@@ -25,7 +27,12 @@
'app.common.filters',
// Model resources
'app.login',
- 'app.overview'
+ 'app.overview',
+ 'app.serverControl',
+ 'app.serverHealth',
+ 'app.configuration',
+ 'app.firmware',
+ 'app.users'
])
// Route configuration
.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
@@ -35,6 +42,9 @@
'redirectTo': '/login'
});
}])
+ .config(['$compileProvider', function ($compileProvider) {
+ $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|file|data|blob):/);
+ }])
.config(['$httpProvider', function($httpProvider){
$httpProvider.defaults.timeout = 10000;
$httpProvider.interceptors.push('apiInterceptor');
diff --git a/app/login/controllers/login-controller.html b/app/login/controllers/login-controller.html
index a249726..0fcbc97 100644
--- a/app/login/controllers/login-controller.html
+++ b/app/login/controllers/login-controller.html
@@ -29,7 +29,7 @@
<input id="login__submit" class="btn-primary submit" type="button" value="Log in" role="button" ng-click="login(username, password)" ng-class="{error: error}" ng-disabled="dataService.loading">
<p class="login__error-msg" role="alert" ng-if="error">Incorrect username or password</p>
- <p class="login__error-msg" role="alert" ng-if="dataService.server_unreachable">Server Unreachable</p>
+ <p class="login__error-msg" role="alert" ng-if="server_unreachable">Server Unreachable</p>
</form>
</div>
</div>
diff --git a/app/login/controllers/login-controller.js b/app/login/controllers/login-controller.js
index 900063a..f4ca375 100644
--- a/app/login/controllers/login-controller.js
+++ b/app/login/controllers/login-controller.js
@@ -25,7 +25,7 @@
if($routeParams.fake_login &&
$routeParams.fake_login === 'fake_login'){
userModel.fakeLogin();
- $window.location.hash = '#/system-overview';
+ $window.location.hash = '#/overview/system';
}
$scope.tryLogin = function(username, password, event){
@@ -35,6 +35,7 @@
};
$scope.login = function(username, password){
$scope.error = false;
+ $scope.server_unreachable = false;
if(!username || username == "" ||
!password || password == ""){
@@ -43,11 +44,13 @@
userModel.login(username, password, function(status, unreachable){
if(status){
$scope.$emit('user-logged-in',{});
- $window.location.hash = '#/system-overview';
+ $window.location.hash = '#/overview/system';
}else{
- if(!unreachable){
- $scope.error = true;
- }
+ if(unreachable){
+ $scope.server_unreachable = true;
+ }else{
+ $scope.error = true;
+ }
};
});
}
diff --git a/app/overview/controllers/inventory-controller.html b/app/overview/controllers/inventory-controller.html
deleted file mode 100644
index 7da39f9..0000000
--- a/app/overview/controllers/inventory-controller.html
+++ /dev/null
@@ -1,485 +0,0 @@
-<div id="inventory">
- <div class="row column">
- <h1>CPU cores inventory</h1>
- </div>
- <section class="row column">
- <div class="page-header">
- <h2 class="inline h4">CPU cores present in the system</h2>
- <button class="inline btn-export float-right">Export</button>
- </div>
- </section>
- <!-- Filters -->
- <section class="row column">
- <!-- search -->
- <div class="content__search">
- <label for="content__search-input">Search</label>
- <input id="content__search-input" type="text" placeholder="Filter hardware components"/>
- <input id="content__search-submit" type="submit" class="btn btn-secondary" value="Submit"/>
- </div>
- <div class="toggle-filter">
- <button class="inline first" ng-click="toggleall = !toggleall"
- ng-class="toggleall ? 'btn-primary' : 'btn-secondary'">All
- </button>
- <button class="inline " ng-click="togglehigh = !togglehigh"
- ng-class="togglehigh ? 'btn-primary' : 'btn-secondary'">High
- </button>
- <button class="inline" ng-click="togglemed = !togglemed"
- ng-class="togglemed ? 'btn-primary' : 'btn-secondary'">Medium
- </button>
- <button class="inline last" ng-click="togglelow = !togglelow"
- ng-class="togglelow ? 'btn-primary' : 'btn-secondary'">Low
- </button>
- </div>
- </section> <!-- end filter -->
- <section class="row column">
- <div id="back-link">
- <a href="#/overview/inventory-overview">Back to Inventory overview</a>
- </div>
- </section>
- <section id="inventory__details" class="row">
- <div class="row column header-row header__actions-bar">
- <div class="column small-12 large-3 ">
- <p class="inline inventory__heading inventory__device-col"><span
- class="inline priority-tag-circ high-priority" aria-label="High Priority"></span>CPU cores (6)
- </p>
- </div>
- <div class="column hide-for-medium-only large-3 ">
- <p class="inline inventory__heading inventory__function-col inv-active">Active</p>
- </div>
- <div class="column hide-for-medium-only large-3 ">
- <p class="inline inventory__heading inventory__present-col inv-present">Present</p>
- </div>
- <div class="column hide-for-medium-only large-2 ">
- <p class="inline inventory__heading inventory__state-col inventory__critical-label" aria-label="High - Emergency">High - Emergency</p>
- </div>
- <div class="column small-4 large-1 "></div>
- </div>
-
- <!-- Inventory Item -->
- <div class="row column accord-row"
- ng-class="{'active': inventory__metadatarow, 'selected': inventory__selected}">
- <div class="row column" ng-click="inventory__metadatarow = ! inventory__metadatarow">
- <div class="column small-12 large-3 inventory__info">
- <p class="priority-tag-circ high-priority" aria-label="High Priority"></p>
- <p class="inventory__title">CPU core 5</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Part Number</p>
- <p class="courier-bold">1230123ab</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Serial Number</p>
- <p class="courier-bold">1230123ab</p>
- </div>
- <div class="column small-12 small-4 large-2">
- <p class="content-label">Model Number</p>
- <p class="courier-bold">86399-2201</p>
- </div>
- <button class="accord-trigger" ng-class="{'active': inventory__metadatarow}"></button>
- </div>
- <div class="row column inventory__metadata-row" ng-class="{'active': inventory__metadatarow}">
- <div class="row column">
- <div class="column large-3 hide-for-medium-only">
-
- </div>
- <div class="column large-3 small-12">
- <p class="content-label">Manufacturer</p>
- <p class="courier-bold">IBM</p>
- </div>
- <div class="column large-3 small-12">
- <p class="content-label">CCIN</p>
- <p class="courier-bold">2BE3</p>
- </div>
- <div class="column small-12 large-2">
- <p class="content-label">Version</p>
- <p class="courier-bold">EE86399-2201</p>
- </div>
- <div class="column large-1 hide-for-medium-only"> </div>
- </div>
- <div class="row column">
- <div class="column small-12 large-3 hide-for-medium-only">
-
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Field Replacable</p>
- <p class="courier-bold">Not Replaceable</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Build Date</p>
- <p class="courier-bold">04/01/2004</p>
- </div>
- <div class="column small-12 large-2">
- <p class="content-label">Cooling Type</p>
- <p class="courier-bold">Air cooled</p>
- </div>
- <div class="column large-1 hide-for-medium-only"> </div>
- </div>
- <div class="row inv-event-log-row">
- <p class="column small-12 large-3 inventory__critical-label" aria-label="High - Emergency">High - Emergency</p>
- <p class="column small-12 large-7 ">
- org.open_power.Error.Host.Event.Event.Cras.amet...
- </p>
- <p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
- </p>
- </div>
- </div>
- </div>
-
- <!-- Inventory Item -->
- <div class="row column accord-row"
- ng-class="{'active': inventory__metadatarow2, 'selected': inventory__selected}">
- <div class="row column" ng-click="inventory__metadatarow2 = ! inventory__metadatarow2">
- <div class="column small-12 large-3 inventory__info">
- <p class="priority-tag-circ high-priority" aria-label="High Priority"></p>
- <p class="inventory__title">CPU core 6</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Part Number</p>
- <p class="courier-bold">12355123ab</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Serial Number</p>
- <p class="courier-bold">123014423ab</p>
- </div>
- <div class="column small-12 small-4 large-2">
- <p class="content-label">Model Number</p>
- <p class="courier-bold">86399-32201</p>
- </div>
- <button class="accord-trigger" ng-class="{'active': inventory__metadatarow2}"></button>
- </div>
- <div class="row column inventory__metadata-row" ng-class="{'active': inventory__metadatarow2}">
- <div class="row column">
- <div class="column large-3 hide-for-medium-only">
-
- </div>
- <div class="column large-3 small-12">
- <p class="content-label">Manufacturer</p>
- <p class="courier-bold">IBM</p>
- </div>
- <div class="column large-3 small-12">
- <p class="content-label">CCIN</p>
- <p class="courier-bold">2BE3</p>
- </div>
- <div class="column small-12 large-2">
- <p class="content-label">Version</p>
- <p class="courier-bold">EE86399-2201</p>
- </div>
- <div class="column large-1 hide-for-medium-only"> </div>
- </div>
- <div class="row column">
- <div class="column small-12 large-3 hide-for-medium-only">
-
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Field Replacable</p>
- <p class="courier-bold">Not Replaceable</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Build Date</p>
- <p class="courier-bold">04/01/2004</p>
- </div>
- <div class="column small-12 large-2">
- <p class="content-label">Cooling Type</p>
- <p class="courier-bold">Air cooled</p>
- </div>
- <div class="column large-1 hide-for-medium-only"> </div>
- </div>
- <div class="row inv-event-log-row">
- <p class="column small-12 large-3 inventory__critical-label" aria-label="Normal">High - emergency</p>
- <p class="column small-12 large-7 ">
- org.open_power.Error.Host.Event.Event.Cras.amet...
- </p>
- <p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
- </p>
- </div>
- </div>
- </div>
-
- <!-- Inventory Item -->
- <div class="row column accord-row"
- ng-class="{'active': inventory__metadatarow5, 'selected': inventory__selected}">
- <div class="row column" ng-click="inventory__metadatarow5 = ! inventory__metadatarow5">
- <div class="column small-12 large-3 inventory__info">
- <p class="priority-tag-circ warn-priority" aria-label="Warning Priority"></p>
- <p class="inventory__title">CPU core 4</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Part Number</p>
- <p class="courier-bold">14530123ab</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Serial Number</p>
- <p class="courier-bold">12350123ab</p>
- </div>
- <div class="column small-12 small-4 large-2">
- <p class="content-label">Model Number</p>
- <p class="courier-bold">86399-2201</p>
- </div>
- <button class="accord-trigger" ng-class="{'active': inventory__metadatarow5}"></button>
- </div>
- <div class="row column inventory__metadata-row" ng-class="{'active': inventory__metadatarow5}">
- <div class="row column">
- <div class="column large-3 hide-for-medium-only">
-
- </div>
- <div class="column large-3 small-12">
- <p class="content-label">Manufacturer</p>
- <p class="courier-bold">IBM</p>
- </div>
- <div class="column large-3 small-12">
- <p class="content-label">CCIN</p>
- <p class="courier-bold">2BE3</p>
- </div>
- <div class="column small-12 large-2">
- <p class="content-label">Version</p>
- <p class="courier-bold">EE86399-2201</p>
- </div>
- <div class="column large-1 hide-for-medium-only"> </div>
- </div>
- <div class="row column">
- <div class="column small-12 large-3 hide-for-medium-only">
-
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Field Replacable</p>
- <p class="courier-bold">Not Replaceable</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Build Date</p>
- <p class="courier-bold">04/01/2004</p>
- </div>
- <div class="column small-12 large-2">
- <p class="content-label">Cooling Type</p>
- <p class="courier-bold">Air cooled</p>
- </div>
- <div class="column large-1 hide-for-medium-only"> </div>
- </div>
- <div class="row inv-event-log-row">
- <p class="column small-12 large-3 inventory__warning-label" aria-label="Warning Priority">Medium - Warning</p>
- <p class="column small-12 large-7 ">
- org.open_power.Error.Host.Event.Event.Cras.amet...
- </p>
- <p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
- </p>
- </div>
- </div>
- </div>
-
- <!-- Inventory Item -->
- <div class="row column accord-row"
- ng-class="{'active': inventory__metadatarow3, 'selected': inventory__selected}">
- <div class="row column" ng-click="inventory__metadatarow3 = ! inventory__metadatarow3">
- <div class="column small-12 large-3 inventory__info">
- <p class="priority-tag-circ normal-priority" aria-label="Normal Priority"></p>
- <p class="inventory__title">CPU core 1</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Part Number</p>
- <p class="courier-bold">123024123ab</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Serial Number</p>
- <p class="courier-bold">123043123ab</p>
- </div>
- <div class="column small-12 small-4 large-2">
- <p class="content-label">Model Number</p>
- <p class="courier-bold">86399-2201</p>
- </div>
- <button class="accord-trigger" ng-class="{'active': inventory__metadatarow3}"></button>
- </div>
- <div class="row column inventory__metadata-row" ng-class="{'active': inventory__metadatarow3}">
- <div class="row column">
- <div class="column large-3 hide-for-medium-only">
-
- </div>
- <div class="column large-3 small-12">
- <p class="content-label">Manufacturer</p>
- <p class="courier-bold">IBM</p>
- </div>
- <div class="column large-3 small-12">
- <p class="content-label">CCIN</p>
- <p class="courier-bold">2BE3</p>
- </div>
- <div class="column small-12 large-2">
- <p class="content-label">Version</p>
- <p class="courier-bold">EE86399-2201</p>
- </div>
- <div class="column large-1 hide-for-medium-only"> </div>
- </div>
- <div class="row column">
- <div class="column small-12 large-3 hide-for-medium-only">
-
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Field Replacable</p>
- <p class="courier-bold">Not Replaceable</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Build Date</p>
- <p class="courier-bold">04/01/2004</p>
- </div>
- <div class="column small-12 large-2">
- <p class="content-label">Cooling Type</p>
- <p class="courier-bold">Air cooled</p>
- </div>
- <div class="column large-1 hide-for-medium-only"> </div>
- </div>
- <div class="row inv-event-log-row">
- <p class="column small-12 large-3 inventory__low-label" aria-label="Low Priority">Low - informational</p>
- <p class="column small-12 large-7 ">
- org.open_power.Error.Host.Event.Event.Cras.amet...
- </p>
- <p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
- </p>
- </div>
- </div>
- </div>
-
- <!-- Inventory Item -->
- <div class="row column accord-row"
- ng-class="{'active': inventory__metadatarow4, 'selected': inventory__selected}">
- <div class="row column" ng-click="inventory__metadatarow4 = ! inventory__metadatarow4">
- <div class="column small-12 large-3 inventory__info">
- <p class="priority-tag-circ normal-priority" aria-label="Normal Priority"></p>
- <p class="inventory__title">CPU core 2</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Part Number</p>
- <p class="courier-bold">123012443ab</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Serial Number</p>
- <p class="courier-bold">1230333123ab</p>
- </div>
- <div class="column small-12 small-4 large-2">
- <p class="content-label">Model Number</p>
- <p class="courier-bold">86399-2201</p>
- </div>
- <button class="accord-trigger" ng-class="{'active': inventory__metadatarow4}"></button>
- </div>
- <div class="row column inventory__metadata-row" ng-class="{'active': inventory__metadatarow4}">
- <div class="row column">
- <div class="column large-3 hide-for-medium-only">
-
- </div>
- <div class="column large-3 small-12">
- <p class="content-label">Manufacturer</p>
- <p class="courier-bold">IBM</p>
- </div>
- <div class="column large-3 small-12">
- <p class="content-label">CCIN</p>
- <p class="courier-bold">2BE3</p>
- </div>
- <div class="column small-12 large-2">
- <p class="content-label">Version</p>
- <p class="courier-bold">EE86399-2201</p>
- </div>
- <div class="column large-1 hide-for-medium-only"> </div>
- </div>
- <div class="row column">
- <div class="column small-12 large-3 hide-for-medium-only">
-
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Field Replacable</p>
- <p class="courier-bold">Not Replaceable</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Build Date</p>
- <p class="courier-bold">04/01/2004</p>
- </div>
- <div class="column small-12 large-2">
- <p class="content-label">Cooling Type</p>
- <p class="courier-bold">Air cooled</p>
- </div>
- <div class="column large-1 hide-for-medium-only"> </div>
- </div>
- <div class="row inv-event-log-row">
- <p class="column small-12 large-3 inventory__low-label" aria-label="Low Priority">Low - informational</p>
- <p class="column small-12 large-7 ">
- org.open_power.Error.Host.Event.Event.Cras.amet...
- </p>
- <p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
- </p>
- </div>
- </div>
- </div>
-
- <!-- Inventory Item -->
- <div class="row column accord-row"
- ng-class="{'active': inventory__metadatarow5, 'selected': inventory__selected}">
- <div class="row column" ng-click="inventory__metadatarow5 = ! inventory__metadatarow5">
- <div class="column small-12 large-3 inventory__info">
- <p class="priority-tag-circ normal-priority" aria-label="Normal Priority"></p>
- <p class="inventory__title">CPU core 3</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Part Number</p>
- <p class="courier-bold">14530123ab</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Serial Number</p>
- <p class="courier-bold">12350123ab</p>
- </div>
- <div class="column small-12 small-4 large-2">
- <p class="content-label">Model Number</p>
- <p class="courier-bold">86399-2201</p>
- </div>
- <button class="accord-trigger" ng-class="{'active': inventory__metadatarow5}"></button>
- </div>
- <div class="row column inventory__metadata-row" ng-class="{'active': inventory__metadatarow5}">
- <div class="row column">
- <div class="column large-3 hide-for-medium-only">
-
- </div>
- <div class="column large-3 small-12">
- <p class="content-label">Manufacturer</p>
- <p class="courier-bold">IBM</p>
- </div>
- <div class="column large-3 small-12">
- <p class="content-label">CCIN</p>
- <p class="courier-bold">2BE3</p>
- </div>
- <div class="column small-12 large-2">
- <p class="content-label">Version</p>
- <p class="courier-bold">EE86399-2201</p>
- </div>
- <div class="column large-1 hide-for-medium-only"> </div>
- </div>
- <div class="row column">
- <div class="column small-12 large-3 hide-for-medium-only">
-
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Field Replacable</p>
- <p class="courier-bold">Not Replaceable</p>
- </div>
- <div class="column small-12 large-3">
- <p class="content-label">Build Date</p>
- <p class="courier-bold">04/01/2004</p>
- </div>
- <div class="column small-12 large-2">
- <p class="content-label">Cooling Type</p>
- <p class="courier-bold">Air cooled</p>
- </div>
- <div class="column large-1 hide-for-medium-only"> </div>
- </div>
- <div class="row inv-event-log-row">
- <p class="column small-12 large-3 inventory__low-label" aria-label="Low Priority">Low - informational</p>
- <p class="column small-12 large-7 ">
- org.open_power.Error.Host.Event.Event.Cras.amet...
- </p>
- <p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
- </p>
- </div>
- </div>
- </div>
- </section>
- <paginate ng-include="paginate"></paginate>
-</div> <!-- end event log -->
\ No newline at end of file
diff --git a/app/overview/controllers/inventory-overview-controller.html b/app/overview/controllers/inventory-overview-controller.html
deleted file mode 100644
index a81305f..0000000
--- a/app/overview/controllers/inventory-overview-controller.html
+++ /dev/null
@@ -1,102 +0,0 @@
-<div id="inventory-overview">
- <div class="row column">
- <h1>Hardware Inventory</h1>
- </div>
- <section class="row column">
- <div class="page-header">
- <h2 class="inline h4">Inventory items present in the system</h2>
- <button class="inline btn-export float-right">Export</button>
- </div>
- </section>
- <section class="row column">
- <!-- search -->
- <div class="content__search">
- <label for="content__search-input">Search</label> <input id="content__search-input" type="text"
- placeholder="Filter hardware components"/> <input
- id="content__search-submit" type="submit" class="btn btn-secondary"
- value="Submit"/>
- </div>
- <div class="toggle-filter">
- <button class="inline first" ng-click="toggleall = !toggleall"
- ng-class="toggleall ? 'btn-primary' : 'btn-secondary'">All
- </button>
- <button class="inline " ng-click="togglehigh = !togglehigh"
- ng-class="togglehigh ? 'btn-primary' : 'btn-secondary'">High
- </button>
- <button class="inline" ng-click="togglemed = !togglemed"
- ng-class="togglemed ? 'btn-primary' : 'btn-secondary'">Medium
- </button>
- <button class="inline last" ng-click="togglelow = !togglelow"
- ng-class="togglelow ? 'btn-primary' : 'btn-secondary'">Low
- </button>
- </div>
- </section>
- <!-- end search -->
- <section id="inventory-categories" class="row column">
- <div class="row column header-row">
- <div class="column large-12 header__actions-bar">
- <p class="inline inventory__heading inventory__device-col">Hardware</p>
- <p class="inline inventory__heading inventory__function-col">Function</p>
- <p class="inline inventory__heading inventory__present-col">Present</p>
- <p class="inline inventory__heading inventory__state-col">State</p>
- </div>
- </div>
- <a class="inventory__group" href="">
- <p class="inline inventory__device-col">All devices (30)</p>
- </a>
- <a class="inventory__group" href="">
- <p class="inline inventory__device-col"><span class="inline priority-tag-circ normal-priority" aria-label="Normal Priority"></span>Motherboard (1)</p>
- <p class="inline inventory__function-col inv-active">Active</p>
- <p class="inline inventory__present-col inv-present">Present</p>
- <p class="inline inventory__state-col"> </p>
- </a>
- <a class="inventory__group" href="">
- <p class="inline inventory__device-col"><span class="inline priority-tag-circ normal-priority" aria-label="Normal Priority"></span>CPU (1)</p>
- <p class="inline inventory__function-col inv-active">Active</p>
- <p class="inline inventory__present-col inv-present">Present</p>
- <p class="inline inventory__state-col"> </p>
- </a>
- <a class="inventory__group" href="#/overview/inventory">
- <p class="inline inventory__device-col"><span class="inline priority-tag-circ high-priority" aria-label="High Priority"></span>CPU cores (6)</p>
- <p class="inline inventory__function-col inv-active">Active</p>
- <p class="inline inventory__present-col inv-present">Present</p>
- <p class="inline inventory__state-col inventory__critical-label">High - Emergency</p>
- </a>
- <a class="inventory__group" href="">
- <p class="inline inventory__device-col"><span class="inline priority-tag-circ normal-priority" aria-label="Normal Priority"></span>DIMM (4)</p>
- <p class="inline inventory__function-col inv-active">Active</p>
- <p class="inline inventory__present-col inv-present">Present</p>
- <p class="inline inventory__state-col"> </p>
- </a>
- <a class="inventory__group" href="">
- <p class="inline inventory__device-col"><span class="inline priority-tag-circ warn-priority" aria-label="Warning Priority"></span>Fan (5)</p>
- <p class="inline inventory__function-col inv-active">Active</p>
- <p class="inline inventory__present-col inv-present">Present</p>
- <p class="inline inventory__state-col inventory__warning-label">Medium - Warning</p>
- </a>
- <a class="inventory__group" href="">
- <p class="inline inventory__device-col"><span class="inline priority-tag-circ normal-priority"></span>Chasis (3)</p>
- <p class="inline inventory__function-col inv-active">Active</p>
- <p class="inline inventory__present-col inv-present">Present</p>
- <p class="inline inventory__state-col"> </p>
- </a>
- <a class="inventory__group" href="">
- <p class="inline inventory__device-col"><span class="inline priority-tag-circ normal-priority" aria-label="Normal Priority"></span>BMC (5)</p>
- <p class="inline inventory__function-col inv-active">Active</p>
- <p class="inline inventory__present-col inv-present">Present</p>
- <p class="inline inventory__state-col"> </p>
- </a>
- <a class="inventory__group" href="">
- <p class="inline inventory__device-col"><span class="inline priority-tag-circ medium-priority " aria-label="MediumPriority"></span>MISC (5)</p>
- <p class="inline inventory__function-col inv-inactive">Inactive</p>
- <p class="inline inventory__present-col inv-present">Present</p>
- <p class="inline inventory__state-col inventory__medium-label">Medium - Error</p>
- </a>
- <a class="inventory__group inv-disabled" href="">
- <p class="inline inventory__device-col"><span class="inline priority-tag-circ disabled" aria-label="Low Priority"></span>PCIE card (0)</p>
- <p class="inline inventory__function-col inv-inactive">Inactive</p>
- <p class="inline inventory__present-col inv-not-present">Not Present</p>
- <p class="inline inventory__state-col inventory__low-label">Low - Informational</p>
- </a>
- </section>
-</div>
\ No newline at end of file
diff --git a/app/overview/controllers/sensors-overview-controller.js b/app/overview/controllers/sensors-overview-controller.js
deleted file mode 100644
index e3cfe6f..0000000
--- a/app/overview/controllers/sensors-overview-controller.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Controller for log
- *
- * @module app/overview
- * @exports logController
- * @name logController
- * @version 0.1.0
- */
-
-window.angular && (function (angular) {
- 'use strict';
-
- angular
- .module('app.overview')
- .controller('sensorsOverviewController', [
- '$scope',
- '$window',
- 'APIUtils',
- 'dataService',
- function($scope, $window, APIUtils, dataService, userModel){
- $scope.dataService = dataService;
- }
- ]
- );
-
-})(angular);
diff --git a/app/overview/controllers/system-overview-controller.js b/app/overview/controllers/system-overview-controller.js
index e3841cb..4992b1e 100644
--- a/app/overview/controllers/system-overview-controller.js
+++ b/app/overview/controllers/system-overview-controller.js
@@ -1,5 +1,5 @@
/**
- * Controller for system overview
+ * Controller for systemOverview
*
* @module app/overview
* @exports systemOverviewController
@@ -19,8 +19,10 @@
'dataService',
function($scope, $window, APIUtils, dataService, userModel){
$scope.dataService = dataService;
+
+ $scope.dropdown_selected = false;
}
]
);
-})(angular);
+})(angular);
\ No newline at end of file
diff --git a/app/overview/controllers/unit-id-controller.js b/app/overview/controllers/unit-id-controller.js
deleted file mode 100644
index c59f411..0000000
--- a/app/overview/controllers/unit-id-controller.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * Controller for unit Id
- *
- * @module app/overview
- * @exports unitIdController
- * @name unitIdController
- * @version 0.1.0
- */
-
-window.angular && (function (angular) {
- 'use strict';
-
- angular
- .module('app.overview')
- .controller('unitIdController', [
- '$scope',
- '$window',
- 'APIUtils',
- 'dataService',
- function($scope, $window, APIUtils, dataService, userModel){
- $scope.dataService = dataService;
- }
- ]
- );
-
-})(angular);
diff --git a/app/overview/index.js b/app/overview/index.js
index a31d86b..53c2c53 100644
--- a/app/overview/index.js
+++ b/app/overview/index.js
@@ -18,50 +18,15 @@
// Route configuration
.config(['$routeProvider', function ($routeProvider) {
$routeProvider
- .when('/overview/inventory-overview', {
- 'templateUrl': 'overview/controllers/inventory-overview-controller.html',
- 'controller': 'inventoryOverviewController',
- authenticated: true
- })
- .when('/overview/inventory', {
- 'templateUrl': 'overview/controllers/inventory-controller.html',
- 'controller': 'inventoryController',
- authenticated: true
- })
- .when('/overview/sensors-overview', {
- 'templateUrl': 'overview/controllers/sensors-overview-controller.html',
- 'controller': 'sensorsOverviewController',
- authenticated: true
- })
- .when('/overview/sensors', {
- 'templateUrl': 'overview/controllers/sensors-controller.html',
- 'controller': 'sensorsController',
- authenticated: true
- })
- .when('/overview/bmc-reboot', {
- 'templateUrl': 'overview/controllers/bmc-reboot-controller.html',
- 'controller': 'bmcRebootController',
- authenticated: true
- })
- .when('/overview/log', {
- 'templateUrl': 'overview/controllers/log-controller.html',
- 'controller': 'logController',
- authenticated: true
- })
- .when('/overview/power-operations', {
- 'templateUrl': 'overview/controllers/power-operations-controller.html',
- 'controller': 'powerOperationsController',
- authenticated: true
- })
- .when('/overview/unit-id', {
- 'templateUrl': 'overview/controllers/unit-id-controller.html',
- 'controller': 'unitIdController',
- authenticated: true
- })
.when('/overview/system', {
'templateUrl': 'overview/controllers/system-overview-controller.html',
'controller': 'systemOverviewController',
authenticated: true
+ })
+ .when('/overview', {
+ 'templateUrl': 'overview/controllers/system-overview-controller.html',
+ 'controller': 'systemOverviewController',
+ authenticated: true
});
}]);
diff --git a/app/overview/styles/index.scss b/app/overview/styles/index.scss
index ccd10bf..cbe07ca 100644
--- a/app/overview/styles/index.scss
+++ b/app/overview/styles/index.scss
@@ -1,7 +1 @@
-@import "./bmc-reboot.scss";
-@import "./log.scss";
-@import "./sensors.scss";
-@import "./inventory.scss";
-@import "./power-operations.scss";
-@import "./system-overview.scss";
-@import "./unit-id.scss";
\ No newline at end of file
+@import "./system-overview.scss";
\ No newline at end of file
diff --git a/app/overview/styles/inventory.scss b/app/overview/styles/inventory.scss
deleted file mode 100644
index 1aba405..0000000
--- a/app/overview/styles/inventory.scss
+++ /dev/null
@@ -1,338 +0,0 @@
-@mixin col-label {
- text-transform: uppercase;
- font-weight: 700;
- font-size: .8em;
-}
-
-$title-minWidth: 210px;
-
-.inventory__heading {
- font-weight: 700;
-}
-
-.inv-active {
- color: $active;
-}
-
-.inv-inactive {
- color: $inactive;
-}
-
-.inv-present {
- color: $present;
-}
-.inv-not-present {
- color: $not-present;
-}
-
-.inventory__critical-label {
- color: $thresh-critical;
-}
-
-.inventory__warning-label {
- color: $thresh-warning;
-}
-
-.inventory__medium-label {
- color: $medium-lightbg;
-}
-
-.inventory__low-label {
- color: $low-lightbg;
-}
-
-.col-3 {
- @include calcColumn-3;
-}
-.col-4 {
- min-width: 100%;
- @include mediaQuery(medium) {
- @include calcColumn-4(15px);
- }
-}
-// Inventory Overview
-
-#inventory-overview {
- .inventory__group {
- position: relative;
- display: block;
- margin: .5em 0;
- font-weight: 700;
- background: $white;
- padding: 1.8em 1em 1em 3.7em;
- text-decoration: none;
- border: 1px solid $lightgrey;
- vertical-align: middle;
- &:hover {
- background: $lightblue;
- color: $black;
- }
- @include mediaQuery(x-large) {
- //max-width: 60%;
- }
- .inv-active {
- color: darken($active, 20%);
- }
- .inv-present {
- color: darken($present, 20%);
- }
- &.inv-disabled {
- background: lighten($lightgrey, 5%);
- .inventory__device-col {
- color: lighten($darkgrey, 20%);
- }
- }
- }
- .priority-tag-circ {
- position: absolute;
- top: 50%;
- left: 1.2em;
- transform: translateY(-50%);
- }
-
- // Header row
- .header__actions-bar {
- padding-left: 3.5em;
- padding-right: 1em;
- }
-}
-
-// Inventory single items
-
-#inventory, #inventory-overview {
- .inventory__device-col {
- margin-right: 6px;
- width: 50%;
- @include mediaQuery(medium){
- width: auto;
- }
- }
- .inventory__function-col {
- @include col-label;
- display: none;
- }
- .inventory__present-col {
- @include col-label;
- display: none;
- }
- .inventory__state-col {
- @include col-label;
- }
- .inventory__device-col,
- .inventory__function-col,
- .inventory__present-col,
- .inventory__state-col {
- @media (min-width: 1025px){
- display: inline-block;
- @include calcColumn-4(5px);
- }
- }
-
- .content__search {
- max-width: 100%;
- @media(min-width: 1300px) {
- max-width: 50%;
- }
- }
- .toggle-filter {
- display: inline-block;
- margin-right: 0;
- }
-}
-
-#back-link {
- margin: 1em 0 0;
- a {
- text-decoration: none;
- position: relative;
- display: inline-block;
- padding-left: 1.2em;
- font-weight: 700;
- &:before {
- content: '\221F';
- position: absolute;
- top: 50%;
- left: 0;
- transform: translateY(-53%) rotate(45deg);
- display: inline-block;
- margin-right: 6px;
- font-size: 1.1em;
- font-weight: bold;
- text-shadow: 0 0 1px black;
- }
- &:hover {
- text-decoration: underline;
- }
- }
-}
-
-#inventory__details {
- display: block;
- margin-top: .6em;
- position: relative;
- overflow: hidden;
-
- .header__actions-bar {
- position: relative;
-
- .priority-tag-circ {
- position: absolute;
- left: 1.2em;
- top: 50%;
- transform: translateY(-50%);
- &.high-priority {
- background-color: rgba($critical-darkbg, .3);
- }
- }
- .inventory__category {
- margin: 0;
- color: $white;
- min-width: $title-minWidth;
- }
- }
- .accord-row {padding-left: 3.7em;}
- .header-row {
- background: $darkpurple;
- padding-left: 3.7em;
- .inv-active {
- color: $active;
- }
-
- .inv-inactive {
- color: $inactive;
- }
-
- .inv-present {
- color: $present;
- }
- .inv-not-present {
- color: $not-present;
- }
-
- .inventory__critical-label {
- color: lighten($thresh-critical, 15%);
- }
-
- .inventory__warning-label {
- color: $thresh-warning;
- }
-
- .inventory__medium-label {
- color: $medium-lightbg;
- }
-
- .inventory__low-label {
- color: lighten($low-lightbg, 20%);
- }
- }
-
- //Export log
- .btn-export {
- text-transform: capitalize;
- color: $black;
- font-size: .9em;
- font-weight: 700;
- position: relative;
- padding: 0 0 1em 2em;
- &:hover {
- text-decoration: underline;
- }
- }
- .btn-export {
- margin-top: 7px;
- }
- .btn-export:before {
- content: '\21E5';
- position: absolute;
- font-size: 1.7em;
- vertical-align: middle;
- transform: rotate(90deg);
- display: inline-block;
- left: 2px;
- top: -5px;
- }
-
- .accord-row {
- padding-top: 1.6em;
- .priority-tag-circ {
- position: absolute;
- top: 28px;
- left: 1.2em;
- }
- }
-
- .accord-trigger {
- position: absolute;
- top: 20px;
- right: 1em;
- }
- //Sensor info
- .inventory__title {
- font-weight: 700;
- font-size: 1.1em;
- min-width: $title-minWidth;
- max-width: 78%;
- vertical-align: top;
- }
- .inventory__description {
- font-weight: 400;
- }
-
- .inventory__reading {
- @include fontCourierBold;
- font-size: 1.2em;
- color: $black;
- //max-width: 18%;
- }
-
- // Sensor metadata row
- .inventory__metadata-row {
- max-height: 0;
- overflow: hidden;
- -webkit-transition: 0.5s linear max-height;
- transition: 0.5s linear max-height;
- padding: 0;
- &.active {
- max-height: 1000px; //max-height used to allow flexible height of content and still allow transition
- @include fastTransition-all;
- //@include mediaQuery(small) {
- // max-height: 1000px;
- //}
- //@include mediaQuery(medium) {
- // max-height: 1000px;
- //}
- }
- }
- .inv-event-log-row {
- position: relative;
- z-index: 100;
- border-top: 2px solid $lightgrey;
- margin-right: 3.7em;
- margin-left: 0;
- padding-top: .8em;
- word-break: break-word;
- :first-child,
- :last-child {
- font-size: .9em;
- font-weight: 600;
- text-transform: uppercase;
- text-decoration: none;
- padding-bottom: .7em;
- padding-top: .7em;
- @include mediaQuery(small) {
- padding-bottom: 0;
- padding-top: 0;
- }
- }
- a:hover {
- text-decoration: underline;
- }
- .column {
- margin-bottom: 0;
- }
- }
-}
-
-//end inventory details
-
-
diff --git a/app/overview/controllers/bmc-reboot-controller.html b/app/server-control/controllers/bmc-reboot-controller.html
similarity index 84%
rename from app/overview/controllers/bmc-reboot-controller.html
rename to app/server-control/controllers/bmc-reboot-controller.html
index b847624..50fca7f 100644
--- a/app/overview/controllers/bmc-reboot-controller.html
+++ b/app/server-control/controllers/bmc-reboot-controller.html
@@ -8,7 +8,7 @@
</div>
<div class="row column btm-border-grey bmc-reboot-option"
- ng-class="{disabled: confirm || dataService.loading, transitionAll: confirm}">
+ ng-class="{disabled: dataService.server_unreachable || dataService.loading, transitionAll: confirm}">
<ul>
<li>Rebooting the BMC causes your browser to lose contact with the BMC for several minutes.</li>
<li>When the BMC software has started, you can then log in again.</li>
@@ -16,7 +16,7 @@
BMC’s address and log in again.
</li>
</ul>
- <button id="bmc__reboot" class="btn-secondary" ng-click="rebootConfirm()"><i>↻</i> Reboot BMC
+ <button id="bmc__reboot" class="btn-secondary" ng-click="rebootConfirm()" ng-disabled="dataService.server_unreachable"><i>↻</i> Reboot BMC
</button>
<confirm title="Reboot the BMC"
message="Rebooting the BMC causes your browser to lose contact with the BMC for several minutes."
diff --git a/app/overview/controllers/bmc-reboot-controller.js b/app/server-control/controllers/bmc-reboot-controller.js
similarity index 94%
rename from app/overview/controllers/bmc-reboot-controller.js
rename to app/server-control/controllers/bmc-reboot-controller.js
index e01d66c..a28c6ad 100644
--- a/app/overview/controllers/bmc-reboot-controller.js
+++ b/app/server-control/controllers/bmc-reboot-controller.js
@@ -1,7 +1,7 @@
/**
* Controller for bmc-reboot
*
- * @module app/overview
+ * @module app/serverControl
* @exports bmcRebootController
* @name bmcRebootController
* @version 0.1.0
@@ -11,7 +11,7 @@
'use strict';
angular
- .module('app.overview')
+ .module('app.serverControl')
.controller('bmcRebootController', [
'$scope',
'$window',
diff --git a/app/overview/controllers/power-operations-controller.html b/app/server-control/controllers/power-operations-controller.html
similarity index 67%
rename from app/overview/controllers/power-operations-controller.html
rename to app/server-control/controllers/power-operations-controller.html
index edab627..79aa861 100644
--- a/app/overview/controllers/power-operations-controller.html
+++ b/app/server-control/controllers/power-operations-controller.html
@@ -23,31 +23,31 @@
</div>
<!-- Power on displays only when server is shutdown -->
- <div class="row column power-option" ng-hide="dataService.server_state == 'Running'" ng-class="{disabled: (confirm && !power_confirm) || dataService.loading, transitionAll: confirm && power_confirm}">
- <button id="power__power-on" class="btn-secondary" ng-click="togglePower()" role="button"><img src="assets/images/icon-power.svg">Power On</button>
+ <div class="row column power-option" ng-hide="dataService.server_state == 'Running' || dataService.server_state == 'Quiesced'" ng-class="{disabled: dataService.server_unreachable || (confirm && !power_confirm) || dataService.loading, transitionAll: confirm && power_confirm}">
+ <button id="power__power-on" class="btn-secondary" ng-click="togglePower()" role="button" ng-disabled="dataService.server_unreachable"><img src="assets/images/icon-power.svg">Power On</button>
<p>Attempts to power on the server</p>
<!---<confirm title="power off" message="Power off the server" confirm="power_confirm" ng-show="power_confirm" callback="togglePower"></confirm>-->
</div>
<!-- Power reboot/shutdown options : when server is off all of these are hidden. When one option is selected, the others are disabled. -->
- <div class="row column power-option" ng-hide="dataService.server_state == 'Off'" ng-class="{disabled: (confirm && !warmboot_confirm) || dataService.loading, transitionAll: confirm && warmboot_confirm}">
- <button id="power__warm-boot" class="btn-secondary" ng-click="warmRebootConfirm()" role="button"><i>↻</i> Warm reboot</button>
+ <div class="row column power-option" ng-hide="dataService.server_state == 'Off'" ng-class="{disabled: dataService.server_unreachable || (confirm && !warmboot_confirm) || dataService.loading, transitionAll: confirm && warmboot_confirm}">
+ <button id="power__warm-boot" class="btn-secondary" ng-click="warmRebootConfirm()" role="button" ng-disabled="dataService.server_unreachable"><i>↻</i> Warm reboot</button>
<p>Attempts to perform an orderly shutdown before restarting the server</p>
<confirm title="Warm Reboot" message="perform an orderly shutdown" confirm="warmboot_confirm" ng-show="warmboot_confirm" callback="warmReboot"></confirm>
</div>
- <div class="row column power-option" ng-hide="dataService.server_state == 'Off'" ng-class="{disabled: (confirm && !coldboot_confirm) || dataService.loading, transitionAll: confirm && coldboot_confirm}">
- <button id="power__cold-boot" class="btn-secondary" ng-click="coldRebootConfirm()" role="button"><i>↻</i> Cold reboot</button>
+ <div class="row column power-option" ng-hide="dataService.server_state == 'Off'" ng-class="{disabled: dataService.server_unreachable || (confirm && !coldboot_confirm) || dataService.loading, transitionAll: confirm && coldboot_confirm}">
+ <button id="power__cold-boot" class="btn-secondary" ng-click="coldRebootConfirm()" role="button" ng-disabled="dataService.server_unreachable"><i>↻</i> Cold reboot</button>
<p>Shuts down the server immediately, then restarts it</p>
<confirm title="Cold Reboot" message="Shutdown server immediately." 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'" ng-class="{disabled: (confirm && !orderly_confirm) || dataService.loading, transitionAll: confirm && orderly_confirm}">
- <button id="power__soft-shutdown" class="btn-secondary" ng-click="orderlyShutdownConfirm()" role="button"><img src="assets/images/icon-power.svg" />Orderly shutdown</button>
+ <div class="row column power-option" ng-hide="dataService.server_state == 'Off'" ng-class="{disabled: dataService.server_unreachable || (confirm && !orderly_confirm) || dataService.loading, transitionAll: confirm && orderly_confirm}">
+ <button id="power__soft-shutdown" class="btn-secondary" ng-click="orderlyShutdownConfirm()" role="button" ng-disabled="dataService.server_unreachable"><img src="assets/images/icon-power.svg" />Orderly shutdown</button>
<p>Attempts to stop all software on the server before removing power</p>
<confirm title="Orderly shutdown" message="Attempts to stop all software orderly." 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'" ng-class="{disabled: (confirm && !immediately_confirm) || dataService.loading, transitionAll: confirm && immediately_confirm}">
- <button id="power__hard-shutdown" class="btn-secondary" ng-click="immediateShutdownConfirm()" role="button"><img src="assets/images/icon-power.svg" />Immediate shutdown</button>
+ <div class="row column power-option" ng-hide="dataService.server_state == 'Off'" ng-class="{disabled: dataService.server_unreachable || (confirm && !immediately_confirm) || dataService.loading, transitionAll: confirm && immediately_confirm}">
+ <button id="power__hard-shutdown" class="btn-secondary" ng-click="immediateShutdownConfirm()" role="button" ng-disabled="dataService.server_unreachable"><img src="assets/images/icon-power.svg" />Immediate shutdown</button>
<p>Removes power from the server without waiting for software to stop</p>
<confirm title="Immediate shutdown" message="Removes power from the server immediately." confirm="immediately_confirm" ng-show="immediately_confirm" cancel="immediatelyShutdownCancel" callback="immediateShutdown"></confirm>
</div>
diff --git a/app/overview/controllers/power-operations-controller.js b/app/server-control/controllers/power-operations-controller.js
similarity index 98%
rename from app/overview/controllers/power-operations-controller.js
rename to app/server-control/controllers/power-operations-controller.js
index 1780da3..4e66f56 100644
--- a/app/overview/controllers/power-operations-controller.js
+++ b/app/server-control/controllers/power-operations-controller.js
@@ -1,7 +1,7 @@
/**
* Controller for power-operations
*
- * @module app/overview
+ * @module app/serverControl
* @exports powerOperationsController
* @name powerOperationsController
* @version 0.1.0
@@ -11,7 +11,7 @@
'use strict';
angular
- .module('app.overview')
+ .module('app.serverControl')
.controller('powerOperationsController', [
'$scope',
'APIUtils',
diff --git a/app/server-control/controllers/remote-console-controller.html b/app/server-control/controllers/remote-console-controller.html
new file mode 100644
index 0000000..5b456d4
--- /dev/null
+++ b/app/server-control/controllers/remote-console-controller.html
@@ -0,0 +1,5 @@
+<div id="server-control-remote-console">
+ <div class="row column">
+ <h1>Remote Console</h1>
+ </div>
+</div>
\ No newline at end of file
diff --git a/app/server-control/controllers/remote-console-controller.js b/app/server-control/controllers/remote-console-controller.js
new file mode 100644
index 0000000..2f3376e
--- /dev/null
+++ b/app/server-control/controllers/remote-console-controller.js
@@ -0,0 +1,26 @@
+/**
+ * Controller for server
+ *
+ * @module app/serverControl
+ * @exports remoteConsoleController
+ * @name remoteConsoleController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.serverControl')
+ .controller('remoteConsoleController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/server-control/index.js b/app/server-control/index.js
new file mode 100644
index 0000000..3df0666
--- /dev/null
+++ b/app/server-control/index.js
@@ -0,0 +1,43 @@
+/**
+ * A module for the serverControl
+ *
+ * @module app/server-control/index
+ * @exports app/server-control/index
+ * @version 0.0.1
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.serverControl', [
+ 'ngRoute',
+ 'app.constants',
+ 'app.common.services'
+ ])
+ // Route configuration
+ .config(['$routeProvider', function ($routeProvider) {
+ $routeProvider
+ .when('/server-control/bmc-reboot', {
+ 'templateUrl': 'server-control/controllers/bmc-reboot-controller.html',
+ 'controller': 'bmcRebootController',
+ authenticated: true
+ })
+ .when('/server-control/power-operations', {
+ 'templateUrl': 'server-control/controllers/power-operations-controller.html',
+ 'controller': 'powerOperationsController',
+ authenticated: true
+ })
+ .when('/server-control/remote-console', {
+ 'templateUrl': 'server-control/controllers/remote-console-controller.html',
+ 'controller': 'remoteConsoleController',
+ authenticated: true
+ })
+ .when('/server-control', {
+ 'templateUrl': 'server-control/controllers/power-operations-controller.html',
+ 'controller': 'powerOperationsController',
+ authenticated: true
+ });
+ }]);
+
+})(window.angular);
diff --git a/app/overview/styles/bmc-reboot.scss b/app/server-control/styles/bmc-reboot.scss
similarity index 100%
rename from app/overview/styles/bmc-reboot.scss
rename to app/server-control/styles/bmc-reboot.scss
diff --git a/app/server-control/styles/index.scss b/app/server-control/styles/index.scss
new file mode 100644
index 0000000..dfb6b6e
--- /dev/null
+++ b/app/server-control/styles/index.scss
@@ -0,0 +1,3 @@
+@import "./bmc-reboot.scss";
+@import "./power-operations.scss";
+@import "./remote-console.scss";
\ No newline at end of file
diff --git a/app/overview/styles/power-operations.scss b/app/server-control/styles/power-operations.scss
similarity index 92%
rename from app/overview/styles/power-operations.scss
rename to app/server-control/styles/power-operations.scss
index 1a517be..3594ab4 100644
--- a/app/overview/styles/power-operations.scss
+++ b/app/server-control/styles/power-operations.scss
@@ -44,8 +44,8 @@
padding: 1.4em 3em 0;
margin-bottom: 3.750em;
background-size: 200% 100%;
- background-image: linear-gradient(to right, $status-ok-light 50%, $lightgrey 50%);
- background-position: 100%;
+ background-image: linear-gradient(to right, $lightgrey 50%, $status-ok-light 50%);
+ background-position: 0;
transition: background-position 2s ease;
overflow: hidden;
p {
@@ -53,7 +53,7 @@
margin: 0;
}
&.power__state-on {
- background-position: -200%;
+ background-position: -100%;
.power__state {
span:before {
color: $status-ok;
@@ -61,7 +61,7 @@
}
}
&.power__state-off {
- background-position: -100%;
+ background-position: 0;
color: $darkgrey;
.power__state {
span:before {
diff --git a/app/server-control/styles/remote-console.scss b/app/server-control/styles/remote-console.scss
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/server-control/styles/remote-console.scss
diff --git a/app/server-health/controllers/diagnostics-controller.html b/app/server-health/controllers/diagnostics-controller.html
new file mode 100644
index 0000000..04469f2
--- /dev/null
+++ b/app/server-health/controllers/diagnostics-controller.html
@@ -0,0 +1,5 @@
+<div id=diagnostics">
+ <div class="row column">
+ <h1>Diagnostics</h1>
+ </div>
+</div>
\ No newline at end of file
diff --git a/app/server-health/controllers/diagnostics-controller.js b/app/server-health/controllers/diagnostics-controller.js
new file mode 100644
index 0000000..1613d8d
--- /dev/null
+++ b/app/server-health/controllers/diagnostics-controller.js
@@ -0,0 +1,26 @@
+/**
+ * Controller for server
+ *
+ * @module app/serverHealth
+ * @exports diagnosticsController
+ * @name diagnosticsController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.serverHealth')
+ .controller('diagnosticsController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/server-health/controllers/fru-information-controller.html b/app/server-health/controllers/fru-information-controller.html
new file mode 100644
index 0000000..ce43386
--- /dev/null
+++ b/app/server-health/controllers/fru-information-controller.html
@@ -0,0 +1,5 @@
+<div id="fru-information-server">
+ <div class="row column">
+ <h1>fru information</h1>
+ </div>
+</div>
\ No newline at end of file
diff --git a/app/server-health/controllers/inventory-controller.html b/app/server-health/controllers/inventory-controller.html
index 2d2856a..2941aaa 100644
--- a/app/server-health/controllers/inventory-controller.html
+++ b/app/server-health/controllers/inventory-controller.html
@@ -16,43 +16,41 @@
<input id="content__search-input" type="text" placeholder="Filter hardware components"/>
<input id="content__search-submit" type="submit" class="btn btn-primary" value="Submit"/>
</div>
- <div class="toggle-filter">
- <button class="inline first" ng-click="toggleall = !toggleall"
- ng-class="toggleall ? 'btn-primary' : 'btn-secondary'">All
- </button>
- <button class="inline " ng-click="togglehigh = !togglehigh"
- ng-class="togglehigh ? 'btn-primary' : 'btn-secondary'">High
- </button>
- <button class="inline" ng-click="togglemed = !togglemed"
- ng-class="togglemed ? 'btn-primary' : 'btn-secondary'">Medium
- </button>
- <button class="inline last" ng-click="togglelow = !togglelow"
- ng-class="togglelow ? 'btn-primary' : 'btn-secondary'">Low
- </button>
- </div>
+ <!--<div class="toggle-filter">-->
+ <!--<button class="inline first" ng-click="toggleall = !toggleall"-->
+ <!--ng-class="toggleall ? 'btn-primary' : 'btn-secondary'">All-->
+ <!--</button>-->
+ <!--<button class="inline " ng-click="togglehigh = !togglehigh"-->
+ <!--ng-class="togglehigh ? 'btn-primary' : 'btn-secondary'">High-->
+ <!--</button>-->
+ <!--<button class="inline" ng-click="togglemed = !togglemed"-->
+ <!--ng-class="togglemed ? 'btn-primary' : 'btn-secondary'">Medium-->
+ <!--</button>-->
+ <!--<button class="inline last" ng-click="togglelow = !togglelow"-->
+ <!--ng-class="togglelow ? 'btn-primary' : 'btn-secondary'">Low-->
+ <!--</button>-->
+ <!--</div>-->
</section> <!-- end filter -->
<section class="row column">
- <div id="back-link">
- <a href="#/overview/inventory-overview">Back to Inventory overview</a>
+ <div class="back-link">
+ <a href="#/server-health/inventory-overview">Back to Inventory overview</a>
</div>
</section>
<section id="inventory__details" class="row">
<div class="row column header-row header__actions-bar">
- <div class="column small-12 large-3 ">
- <p class="inline inventory__heading inventory__device-col"><span
- class="inline priority-tag-circ high-priority" aria-label="High Priority"></span>CPU cores (6)
- </p>
+ <div class="column small-12">
+ <p class="h2">CPU cores (6)</p>
</div>
- <div class="column hide-for-medium-only large-3 ">
- <p class="inline inventory__heading inventory__function-col inv-active">Active</p>
- </div>
- <div class="column hide-for-medium-only large-3 ">
- <p class="inline inventory__heading inventory__present-col inv-present">Present</p>
- </div>
- <div class="column hide-for-medium-only large-2 ">
- <p class="inline inventory__heading inventory__state-col inventory__critical-label" aria-label="High - Emergency">High - Emergency</p>
- </div>
- <div class="column small-4 large-1 "></div>
+ <!--<div class="column hide-for-medium-only large-3 ">-->
+ <!--<p class="inline inventory__heading inventory__function-col inv-active">Active</p>-->
+ <!--</div>-->
+ <!--<div class="column hide-for-medium-only large-3 ">-->
+ <!--<p class="inline inventory__heading inventory__present-col inv-present">Present</p>-->
+ <!--</div>-->
+ <!--<div class="column hide-for-medium-only large-2 ">-->
+ <!--<p class="inline inventory__heading inventory__state-col inventory__critical-label" aria-label="High - Emergency">High - Emergency</p>-->
+ <!--</div>-->
+ <!--<div class="column small-4 large-1 "></div>-->
</div>
<!-- Inventory Item -->
@@ -71,7 +69,7 @@
<p class="content-label">Serial Number</p>
<p class="courier-bold">1230123ab</p>
</div>
- <div class="column small-12 small-4 large-2">
+ <div class="column small-12 large-2">
<p class="content-label">Model Number</p>
<p class="courier-bold">86399-2201</p>
</div>
@@ -82,11 +80,11 @@
<div class="column large-3 hide-for-medium-only">
</div>
- <div class="column large-3 small-12">
+ <div class="column small-12 large-3">
<p class="content-label">Manufacturer</p>
<p class="courier-bold">IBM</p>
</div>
- <div class="column large-3 small-12">
+ <div class="column small-12 large-3">
<p class="content-label">CCIN</p>
<p class="courier-bold">2BE3</p>
</div>
@@ -138,7 +136,7 @@
org.open_power.Error.Host.Event.Event.Cras.amet
</p>
<p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
+ <a href="#/server-health/event-log"> View event log</a>
</p>
</div>
</div>
@@ -227,7 +225,7 @@
org.open_power.Error.Host.Event.Event.Cras.amet
</p>
<p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
+ <a href="#/server-health/event-log"> View event log</a>
</p>
</div>
</div>
@@ -316,7 +314,7 @@
org.open_power.Error.Host.Event.Event.Cras.amet
</p>
<p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
+ <a href="#/server-health/event-log"> View event log</a>
</p>
</div>
</div>
@@ -405,7 +403,7 @@
org.open_power.Error.Host.Event.Event.Cras.amet
</p>
<p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
+ <a href="#/server-health/event-log"> View event log</a>
</p>
</div>
</div>
@@ -477,7 +475,7 @@
<div class="column large-9">
<p class="content-label">Unit Indicator</p><br />
<div class="toggle inline">
- <input id="toggle__switch-round"
+ <input title="toggle-switch"
class="toggle-switch toggle-switch__round-flat"
type="checkbox"
tabindex="0"
@@ -494,7 +492,7 @@
org.open_power.Error.Host.Event.Event.Cras.amet
</p>
<p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
+ <a href="#/server-health/event-log"> View event log</a>
</p>
</div>
</div>
@@ -566,7 +564,7 @@
<div class="column large-9">
<p class="content-label">Unit Indicator</p><br />
<div class="toggle inline">
- <input id="toggle__switch-round"
+ <input title="toggle-switch"
class="toggle-switch toggle-switch__round-flat"
type="checkbox"
tabindex="0"
@@ -583,7 +581,7 @@
org.open_power.Error.Host.Event.Event.Cras.amet
</p>
<p class="column small-12 large-2">
- <a href="#/overviewlog"> View event log</a>
+ <a href="#/server-health/event-log"> View event log</a>
</p>
</div>
</div>
diff --git a/app/server-health/controllers/inventory-controller.js b/app/server-health/controllers/inventory-controller.js
new file mode 100644
index 0000000..7196f7b
--- /dev/null
+++ b/app/server-health/controllers/inventory-controller.js
@@ -0,0 +1,29 @@
+/**
+ * Controller for server
+ *
+ * @module app/serverHealth
+ * @exports inventoryController
+ * @name inventoryController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.serverHealth')
+ .controller('inventoryController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+
+ // Force to top of page when viewing single group
+ $window.scrollTo(0, 0);
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/server-health/controllers/inventory-overview-controller.html b/app/server-health/controllers/inventory-overview-controller.html
index 1ad0357..977be6b 100644
--- a/app/server-health/controllers/inventory-overview-controller.html
+++ b/app/server-health/controllers/inventory-overview-controller.html
@@ -16,20 +16,20 @@
id="content__search-submit" type="submit" class="btn btn-secondary"
value="Submit"/>
</div>
- <div class="toggle-filter">
- <button class="inline first" ng-click="toggleall = !toggleall"
- ng-class="toggleall ? 'btn-primary' : 'btn-secondary'">All
- </button>
- <button class="inline " ng-click="togglehigh = !togglehigh"
- ng-class="togglehigh ? 'btn-primary' : 'btn-secondary'">High
- </button>
- <button class="inline" ng-click="togglemed = !togglemed"
- ng-class="togglemed ? 'btn-primary' : 'btn-secondary'">Medium
- </button>
- <button class="inline last" ng-click="togglelow = !togglelow"
- ng-class="togglelow ? 'btn-primary' : 'btn-secondary'">Low
- </button>
- </div>
+ <!--<div class="toggle-filter">-->
+ <!--<button class="inline first" ng-click="toggleall = !toggleall"-->
+ <!--ng-class="toggleall ? 'btn-primary' : 'btn-secondary'">All-->
+ <!--</button>-->
+ <!--<button class="inline " ng-click="togglehigh = !togglehigh"-->
+ <!--ng-class="togglehigh ? 'btn-primary' : 'btn-secondary'">High-->
+ <!--</button>-->
+ <!--<button class="inline" ng-click="togglemed = !togglemed"-->
+ <!--ng-class="togglemed ? 'btn-primary' : 'btn-secondary'">Medium-->
+ <!--</button>-->
+ <!--<button class="inline last" ng-click="togglelow = !togglelow"-->
+ <!--ng-class="togglelow ? 'btn-primary' : 'btn-secondary'">Low-->
+ <!--</button>-->
+ <!--</div>-->
</section>
<!-- end search -->
<section id="inventory-categories" class="row column">
@@ -56,7 +56,7 @@
<p class="inline inventory__present-col inv-present">Present</p>
<p class="inline inventory__state-col"> </p>
</a>
- <a class="inventory__group" href="#/overview/inventory">
+ <a class="inventory__group" href="#/server-health/inventory">
<p class="inline inventory__device-col"><span class="inline priority-tag-circ high-priority" aria-label="High Priority"></span>CPU cores (6)</p>
<p class="inline inventory__function-col inv-active">Active</p>
<p class="inline inventory__present-col inv-present">Present</p>
diff --git a/app/overview/controllers/inventory-overview-controller.js b/app/server-health/controllers/inventory-overview-controller.js
similarity index 60%
rename from app/overview/controllers/inventory-overview-controller.js
rename to app/server-health/controllers/inventory-overview-controller.js
index 9177ae5..3eda37b 100644
--- a/app/overview/controllers/inventory-overview-controller.js
+++ b/app/server-health/controllers/inventory-overview-controller.js
@@ -1,9 +1,9 @@
/**
- * Controller for log
+ * Controller for server
*
- * @module app/overview
- * @exports logController
- * @name logController
+ * @module app/serverHealth
+ * @exports inventoryOverviewController
+ * @name inventoryOverviewController
* @version 0.1.0
*/
@@ -11,15 +11,14 @@
'use strict';
angular
- .module('app.overview')
+ .module('app.serverHealth')
.controller('inventoryOverviewController', [
'$scope',
'$window',
'APIUtils',
'dataService',
- function($scope, $window, APIUtils, dataService, userModel){
+ function($scope, $window, APIUtils, dataService){
$scope.dataService = dataService;
-
}
]
);
diff --git a/app/server-health/controllers/power-consumption-controller.html b/app/server-health/controllers/power-consumption-controller.html
new file mode 100644
index 0000000..7dfdf89
--- /dev/null
+++ b/app/server-health/controllers/power-consumption-controller.html
@@ -0,0 +1,5 @@
+<div id="power-consumption">
+ <div class="row column">
+ <h1>Power consumption</h1>
+ </div>
+</div>
\ No newline at end of file
diff --git a/app/server-health/controllers/power-consumption-controller.js b/app/server-health/controllers/power-consumption-controller.js
new file mode 100644
index 0000000..893ca31
--- /dev/null
+++ b/app/server-health/controllers/power-consumption-controller.js
@@ -0,0 +1,26 @@
+/**
+ * Controller for server
+ *
+ * @module app/serverHealth
+ * @exports powerConsumptionController
+ * @name powerConsumptionController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.serverHealth')
+ .controller('powerConsumptionController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/overview/controllers/sensors-controller.html b/app/server-health/controllers/sensors-controller.html
similarity index 84%
rename from app/overview/controllers/sensors-controller.html
rename to app/server-health/controllers/sensors-controller.html
index ff4ea56..79c9359 100644
--- a/app/overview/controllers/sensors-controller.html
+++ b/app/server-health/controllers/sensors-controller.html
@@ -34,13 +34,13 @@
<section class="row column">
<div id="back-link">
- <a href="#/overview/sensors-overview">Back to Sensor Overview</a>
+ <a href="#/server-health/sensors-overview">Back to Sensor Overview</a>
</div>
</section>
<section id="sensor__details" class="row column">
<div class="row column header-row">
- <div class="column small-10 large-11 end header__actions-bar">
+ <div class="column small-10 large-11 header__actions-bar">
<p class="inline priority-tag-circ high-priority" aria-label="High Priority"></p>
<p class="inline sensor__heading sensor__category">Fan speed (RPMs)</p>
<p class="inline sensor__heading middle">Reading</p>
@@ -77,6 +77,15 @@
<span class="threshold__label high">High</span>
</div>
</div>
+
+ <div class="column small-12 large-6">
+ <p class="h5 content-header">Associated Events</p>
+ <a href="#/overview/log">View 5 events related to Fan 1</a>
+ </div>
+ <div class="column small-12 large-6">
+ <p class="h5 content-header">Associated Hardware</p>
+ <a href="">Chassis0</a>
+ </div>
</div>
</div>
@@ -107,6 +116,15 @@
<span class="threshold__label high">High</span>
</div>
</div>
+
+ <div class="column small-12 large-6">
+ <p class="h5 content-header">Associated Events</p>
+ <a href="#/overview/log">View 5 events related to Fan 1</a>
+ </div>
+ <div class="column small-12 large-6">
+ <p class="h5 content-header">Associated Hardware</p>
+ <p>None</p>
+ </div>
</div>
</div>
@@ -139,6 +157,15 @@
<span class="threshold__label high">High</span>
</div>
</div>
+
+ <div class="column small-12 large-6">
+ <p class="h5 content-header">Associated Events</p>
+ <a href="#/overview/log">View 5 events related to Fan 1</a>
+ </div>
+ <div class="column small-12 large-6">
+ <p class="h5 content-header">Associated Hardware</p>
+ <a href="">Chassis0</a>
+ </div>
</div>
</div>
</section>
diff --git a/app/overview/controllers/sensors-controller.js b/app/server-health/controllers/sensors-controller.js
similarity index 72%
rename from app/overview/controllers/sensors-controller.js
rename to app/server-health/controllers/sensors-controller.js
index 97d5d3c..aaa5aa6 100644
--- a/app/overview/controllers/sensors-controller.js
+++ b/app/server-health/controllers/sensors-controller.js
@@ -1,9 +1,9 @@
/**
- * Controller for log
+ * Controller for sensors
*
- * @module app/overview
- * @exports logController
- * @name logController
+ * @module app/serverHealth
+ * @exports sensorsController
+ * @name sensorsController
* @version 0.1.0
*/
@@ -23,8 +23,10 @@
$scope.dropdown_selected = false;
+ $scope.$log = $log;
+ $scope.message = 'Hello World!';
}
]
);
-})(angular);
+})(angular);
\ No newline at end of file
diff --git a/app/overview/controllers/sensors-overview-controller.html b/app/server-health/controllers/sensors-overview-controller.html
similarity index 91%
rename from app/overview/controllers/sensors-overview-controller.html
rename to app/server-health/controllers/sensors-overview-controller.html
index 1b86478..10ee4fa 100644
--- a/app/overview/controllers/sensors-overview-controller.html
+++ b/app/server-health/controllers/sensors-overview-controller.html
@@ -41,7 +41,7 @@
</div>
<a class="sensor__group" href="">All Sensors (50)</a>
<a class="sensor__group" href=""><span class="inline priority-tag-circ normal-priority" aria-label="Normal Priority"></span>Temperature (20)</a>
- <a class="sensor__group" href="#/overview/sensors"> <span class="inline priority-tag-circ high-priority" aria-label="High Priority"></span>Fan Speed (15) <p class="inline float-right sensor__critical-label">Critical</p></a>
+ <a class="sensor__group" href="#/server-health/sensors"> <span class="inline priority-tag-circ high-priority" aria-label="High Priority"></span>Fan Speed (15) <p class="inline float-right sensor__critical-label">Critical</p></a>
<a class="sensor__group" href=""><span class="inline priority-tag-circ normal-priority" aria-label="Normal Priority"></span>Altitude (1)</a>
<a class="sensor__group" href=""><span class="inline priority-tag-circ normal-priority" aria-label="Normal Priority"></span>Voltage (6)</a>
<a class="sensor__group" href=""><span class="inline priority-tag-circ warn-priority" aria-label="Warning Priority"></span>Current (5) <p class="inline float-right sensor__warning-label">Warning</p></a>
diff --git a/app/overview/controllers/inventory-controller.js b/app/server-health/controllers/sensors-overview-controller.js
similarity index 63%
rename from app/overview/controllers/inventory-controller.js
rename to app/server-health/controllers/sensors-overview-controller.js
index 9dcc22c..1b7234d 100644
--- a/app/overview/controllers/inventory-controller.js
+++ b/app/server-health/controllers/sensors-overview-controller.js
@@ -1,9 +1,9 @@
/**
- * Controller for log
+ * Controller for sensors-overview
*
- * @module app/overview
- * @exports logController
- * @name logController
+ * @module app/serverHealth
+ * @exports sensorsOverviewController
+ * @name sensorsOverviewController
* @version 0.1.0
*/
@@ -12,7 +12,7 @@
angular
.module('app.overview')
- .controller('inventoryController', [
+ .controller('sensorsOverviewController', [
'$scope',
'$log',
'$window',
@@ -23,8 +23,10 @@
$scope.dropdown_selected = false;
+ $scope.$log = $log;
+ $scope.message = 'Hello World!';
}
]
);
-})(angular);
+})(angular);
\ No newline at end of file
diff --git a/app/overview/controllers/unit-id-controller.html b/app/server-health/controllers/unit-id-controller.html
similarity index 62%
rename from app/overview/controllers/unit-id-controller.html
rename to app/server-health/controllers/unit-id-controller.html
index 6e6ba72..53bd242 100644
--- a/app/overview/controllers/unit-id-controller.html
+++ b/app/server-health/controllers/unit-id-controller.html
@@ -7,19 +7,21 @@
<h2 class="h4">Unit ID control</h2>
</div>
- <div class="row column">
+ <div class="row column" ng-class="{disabled: dataService.server_unreachable || dataService.loading}">
<div class="btm-border-grey">
- <div class="toggle inline" ng-init="indicatorState = 'off'">
+ <div class="toggle inline">
<input id="toggle__switch-round"
class="toggle-switch toggle-switch__round-flat"
type="checkbox"
tabindex="0"
- ng-click="indicatorState = { 'on': 'off', 'off':'on'}[indicatorState]"
+ ng-click="toggleLED()"
+ ng-checked="dataService.LED_state == 'on'"
+ ng-disabled="dataService.server_unreachable"
>
- <label for="toggle__switch-round" tabindex="0">Unit ID indicator is <span class="uid-switch__status">{{indicatorState}}</span></label>
+ <label for="toggle__switch-round" tabindex="0">Unit ID indicator is <span class="uid-switch__status">{{dataService.LED_state}}</span></label>
</div>
<div class="uid-switch__label inline">
- <p>Unit ID indicator is <span class="uid-switch__status">{{indicatorState}}</span></p>
+ <p>Unit ID indicator is <span class="uid-switch__status">{{dataService.LED_state}}</span></p>
<p>Control unit indicator to identify server unit.</p>
</div>
</div>
diff --git a/app/server-health/controllers/unit-id-controller.js b/app/server-health/controllers/unit-id-controller.js
new file mode 100644
index 0000000..5494c61
--- /dev/null
+++ b/app/server-health/controllers/unit-id-controller.js
@@ -0,0 +1,46 @@
+/**
+ * Controller for unit Id
+ *
+ * @module app/serverHealth
+ * @exports unitIdController
+ * @name unitIdController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.serverHealth')
+ .controller('unitIdController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService, userModel){
+ $scope.dataService = dataService;
+
+ $scope.getLEDState = function(){
+ APIUtils.getLEDState(function(state){
+ if(state == APIUtils.LED_STATE.on){
+ dataService.LED_state = APIUtils.LED_STATE_TEXT.on;
+ }else{
+ dataService.LED_state = APIUtils.LED_STATE_TEXT.off;
+ }
+ });
+ }
+ $scope.toggleLED = function(){
+ var toggleState = (dataService.LED_state == APIUtils.LED_STATE_TEXT.on) ?
+ APIUtils.LED_STATE.off : APIUtils.LED_STATE.on;
+ dataService.LED_state = (dataService.LED_state == APIUtils.LED_STATE_TEXT.on) ?
+ APIUtils.LED_STATE_TEXT.off : APIUtils.LED_STATE_TEXT.on;
+ APIUtils.setLEDState(toggleState, function(status){
+ });
+ }
+
+ $scope.getLEDState();
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/server-health/index.js b/app/server-health/index.js
new file mode 100644
index 0000000..68a9a90
--- /dev/null
+++ b/app/server-health/index.js
@@ -0,0 +1,63 @@
+/**
+ * A module for the serverHealth
+ *
+ * @module app/server-health/index
+ * @exports app/server-health/index
+ * @version 0.0.1
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.serverHealth', [
+ 'ngRoute',
+ 'app.constants',
+ 'app.common.services'
+ ])
+ // Route configuration
+ .config(['$routeProvider', function ($routeProvider) {
+ $routeProvider
+ .when('/server-health/event-log', {
+ 'templateUrl': 'server-health/controllers/log-controller.html',
+ 'controller': 'logController',
+ authenticated: true
+ })
+ .when('/server-health/inventory-overview', {
+ 'templateUrl': 'server-health/controllers/inventory-overview-controller.html',
+ 'controller': 'inventoryOverviewController',
+ authenticated: true
+ })
+ .when('/server-health/inventory', {
+ 'templateUrl': 'server-health/controllers/inventory-controller.html',
+ 'controller': 'inventoryController',
+ authenticated: true
+ })
+ .when('/server-health/sensors-overview', {
+ 'templateUrl': 'server-health/controllers/sensors-overview-controller.html',
+ 'controller': 'sensorsOverviewController',
+ authenticated: true
+ })
+ .when('/server-health/sensors', {
+ 'templateUrl': 'server-health/controllers/sensors-controller.html',
+ 'controller': 'sensorsController',
+ authenticated: true
+ })
+ .when('/server-health/power-consumption', {
+ 'templateUrl': 'server-health/controllers/power-consumption-controller.html',
+ 'controller': 'powerConsumptionController',
+ authenticated: true
+ })
+ .when('/server-health/unit-id', {
+ 'templateUrl': 'server-health/controllers/unit-id-controller.html',
+ 'controller': 'unitIdController',
+ authenticated: true
+ })
+ .when('/server-health/diagnostics', {
+ 'templateUrl': 'server-health/controllers/diagnostics-controller.html',
+ 'controller': 'diagnosticsController',
+ authenticated: true
+ })
+ }]);
+
+})(window.angular);
diff --git a/app/server-health/styles/diagnostics.scss b/app/server-health/styles/diagnostics.scss
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/server-health/styles/diagnostics.scss
diff --git a/app/server-health/styles/index.scss b/app/server-health/styles/index.scss
new file mode 100644
index 0000000..dd2e5b6
--- /dev/null
+++ b/app/server-health/styles/index.scss
@@ -0,0 +1,5 @@
+@import "./sensors.scss";
+@import "./inventory.scss";
+@import "./unit-id.scss";
+@import "./power-consumption.scss";
+@import "./diagnostics.scss";
diff --git a/app/server-health/styles/inventory.scss b/app/server-health/styles/inventory.scss
index 587292e..78fa1ad 100644
--- a/app/server-health/styles/inventory.scss
+++ b/app/server-health/styles/inventory.scss
@@ -140,8 +140,8 @@
}
}
-#back-link {
- margin: 1em 0 0;
+.back-link {
+ margin: 1em 0 1em;
a {
text-decoration: none;
position: relative;
@@ -193,7 +193,8 @@
.accord-row {padding-left: 3.7em;}
.header-row {
background: $darkpurple;
- padding-left: 3.7em;
+ padding-top: 1.5em;
+ padding-bottom: 0;
.inv-active {
color: $active;
}
@@ -304,8 +305,6 @@
}
}
.inv-event-log-row {
- position: relative;
- z-index: 100;
border-top: 2px solid $lightgrey;
margin-right: 3.7em;
margin-left: 0;
diff --git a/app/server-health/styles/power-consumption.scss b/app/server-health/styles/power-consumption.scss
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/server-health/styles/power-consumption.scss
diff --git a/app/overview/styles/sensors.scss b/app/server-health/styles/sensors.scss
similarity index 100%
rename from app/overview/styles/sensors.scss
rename to app/server-health/styles/sensors.scss
diff --git a/app/overview/styles/unit-id.scss b/app/server-health/styles/unit-id.scss
similarity index 100%
rename from app/overview/styles/unit-id.scss
rename to app/server-health/styles/unit-id.scss
diff --git a/app/styles/index.scss b/app/styles/index.scss
index 32112de..ee57b61 100644
--- a/app/styles/index.scss
+++ b/app/styles/index.scss
@@ -2,4 +2,9 @@
@import "../common/styles/index.scss";
@import "../login/styles/index.scss";
-@import "../overview/styles/index.scss";
\ No newline at end of file
+@import "../overview/styles/index.scss";
+@import "../server-control/styles/index.scss";
+@import "../server-health/styles/index.scss";
+@import "../configuration/styles/index.scss";
+@import "../firmware/styles/index.scss";
+@import "../users/styles/index.scss";
\ No newline at end of file
diff --git a/app/users/controllers/user-accounts-controller.html b/app/users/controllers/user-accounts-controller.html
new file mode 100644
index 0000000..c62ec32
--- /dev/null
+++ b/app/users/controllers/user-accounts-controller.html
@@ -0,0 +1,5 @@
+<div id="user-accounts">
+ <div class="row column">
+ <h1>User accounts</h1>
+ </div>
+</div>
\ No newline at end of file
diff --git a/app/users/controllers/user-accounts-controller.js b/app/users/controllers/user-accounts-controller.js
new file mode 100644
index 0000000..2ac5ee0
--- /dev/null
+++ b/app/users/controllers/user-accounts-controller.js
@@ -0,0 +1,26 @@
+/**
+ * Controller for user Accounts
+ *
+ * @module app/users
+ * @exports userAccountsController
+ * @name userAccountsController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.users')
+ .controller('userAccountsController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ function($scope, $window, APIUtils, dataService){
+ $scope.dataService = dataService;
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/users/index.js b/app/users/index.js
new file mode 100644
index 0000000..6814d0d
--- /dev/null
+++ b/app/users/index.js
@@ -0,0 +1,33 @@
+/**
+ * A module for the users
+ *
+ * @module app/users/index
+ * @exports app/users/index
+ * @version 0.0.1
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.users', [
+ 'ngRoute',
+ 'app.constants',
+ 'app.common.services'
+ ])
+ // Route configuration
+ .config(['$routeProvider', function ($routeProvider) {
+ $routeProvider
+ .when('/users/manage-user-accounts', {
+ 'templateUrl': 'users/controllers/user-accounts-controller.html',
+ 'controller': 'userAccountsController',
+ authenticated: true
+ })
+ .when('/users', {
+ 'templateUrl': 'users/controllers/user-accounts-controller.html',
+ 'controller': 'userAccountsController',
+ authenticated: true
+ });
+ }]);
+
+})(window.angular);
diff --git a/app/users/styles/index.scss b/app/users/styles/index.scss
new file mode 100644
index 0000000..5162e09
--- /dev/null
+++ b/app/users/styles/index.scss
@@ -0,0 +1 @@
+@import "./user-accounts.scss";
\ No newline at end of file
diff --git a/app/users/styles/user-accounts.scss b/app/users/styles/user-accounts.scss
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/app/users/styles/user-accounts.scss
diff --git a/bower.json b/bower.json
index 86b31a7..88d0402 100644
--- a/bower.json
+++ b/bower.json
@@ -4,13 +4,14 @@
"version": "0.0.1",
"dependencies": {
"angular": "1.5.6",
- "angular-route": "1.5.6"
+ "angular-route": "1.5.6",
+ "angular-clipboard": "1.5.0",
+ "angularUtils-pagination": "angular-utils-pagination#^0.11.1"
},
"resolutions": {
"angular": "1.5.6"
},
- "devDependencies": {
- },
+ "devDependencies": {},
"authors": [
{
"name": "Iftekharul Islam",
@@ -32,4 +33,4 @@
"bower.json",
"package.json"
]
-}
\ No newline at end of file
+}
diff --git a/gulp-options.js b/gulp-options.js
index 68240d7..e10c5d4 100644
--- a/gulp-options.js
+++ b/gulp-options.js
@@ -8,7 +8,7 @@
'srcFolderPath': './app',
'tempFolderPath': __dirname + '/.temp',
'nodeModulesFolderPath': './node_modules',
- 'bowerFolderPath': './app/bower_components',
+ 'bowerFolderPath': __dirname + '/bower_components',
'dirname': __dirname,
'excludePath': '!./app/vendors/**/*'
};
diff --git a/gulp_tasks/webapp.js b/gulp_tasks/webapp.js
index e514543..6a8b99e 100644
--- a/gulp_tasks/webapp.js
+++ b/gulp_tasks/webapp.js
@@ -45,6 +45,18 @@
.pipe(gulp.dest(options.srcFolderPath + '/styles'))
});
+gulp.task('webapp:minifyvendorjs', function () {
+ return gulp
+ .src(options.bowerFolderPath + '/**/*.js')
+ .pipe(uglify({
+ preserveComments: 'false'
+ }))
+ .pipe(rename({suffix: '.min'}))
+ .pipe(gulp.dest(function(file) {
+ return file.base;
+ }))
+});
+
// ----- To .temp from app
gulp.task('webapp:copyjs', function () {
return gulp.src(options.srcFolderPath + '/**/*.js')
@@ -111,6 +123,7 @@
return runSequence(
'webapp:clean',
'webapp:sasscompile',
+ 'webapp:minifyvendorjs',
[
'webapp:copyjs',
'webapp:copycss',
diff --git a/package.json b/package.json
index 8e6844b..dd2a5bd 100644
--- a/package.json
+++ b/package.json
@@ -23,11 +23,10 @@
"keywords": [
"node"
],
- "dependencies": {},
+ "dependencies": {
+ },
"peerDependencies": {},
"devDependencies": {
- "angular": "^1.5.6",
- "angular-route": "^1.5.6",
"autoprefixer": "^6.6.1",
"bower": "1.8.0",
"eslint-plugin-angular": "2.0.0",
@@ -35,14 +34,13 @@
"gulp": "3.9.1",
"gulp-angular-templatecache": "2.0.0",
"gulp-clean": "^0.3.2",
- "gulp-clean-css": "^3.0.4",
"gulp-connect": "5.0.0",
"gulp-eslint": "3.0.1",
"gulp-htmlparser": "^0.0.4",
"gulp-if": "^1.2.5",
- "gulp-imagemin": "^3.1.1",
"gulp-jsoncombine": "^1.0.3",
"gulp-load-tasks": "^0.8.3",
+ "gulp-clean-css": "^3.0.4",
"gulp-ng-annotate": "^1.1.0",
"gulp-ng-constant": "^0.3.0",
"gulp-nodemon": "^2.1.0",
@@ -54,12 +52,12 @@
"gulp-uglify": "^1.2.0",
"gulp-useref": "^1.2.0",
"gulp-util": "^3.0.6",
+ "gulp-imagemin": "^3.1.1",
"html-minifier": "^3.3.0",
"node-sass": "^4.3.0",
"onchange": "^3.2.1",
"parallelshell": "^2.0.0",
- "run-sequence": "^1.1.2",
- "v-accordion": "^1.6.0"
+ "run-sequence": "^1.1.2"
},
"license": "MIT",
"engines": {