moved firmware into config section
Change-Id: I9579c85d7d9d7268d9e35637809fa26d623f0310
Signed-off-by: Michael Davis <michael.s.davis@ibm.com>
diff --git a/app/common/directives/app-navigation.html b/app/common/directives/app-navigation.html
index 0bf5579..c07e136 100644
--- a/app/common/directives/app-navigation.html
+++ b/app/common/directives/app-navigation.html
@@ -90,15 +90,14 @@
<a href="#/server-control/remote-console" tabindex="5" ng-click="closeSubnav()">Serial over LAN</a></li>
</ul>
<ul class="nav__second-level btn-firmware" ng-style="navStyle" ng-class="{opened: (showSubMenu && firstLevel == 'configuration')}">
- <li ng-class="{'active': (path == '/configuration' || path == '/configuration/network')}"><a href="#/configuration/network" ng-click="closeSubnav()">Network settings</a></li>
+ <li ng-class="{'active': (path == '/configuration' || path == '/configuration/network')}">
+ <a href="#/configuration/network" ng-click="closeSubnav()">Network settings</a></li>
+ <li ng-class="{'active': (path == '/configuration' || path == '/configuration/firmware')}">
+ <a href="#/configuration/firmware" ng-click="closeSubnav()">Firmware</a></li>
<!--<li ng-class="{'active': (path == '/configuration/date-time')}"><a href="#/configuration/date-time" ng-click="closeSubnav()">Date & Time</a></li>-->
<!--<li ng-class="{'active': (path == '/configuration/security')}"><a href="#/configuration/security" ng-click="closeSubnav()">Security</a></li>-->
<!--<li ng-class="{'active': (path == '/configuration/file')}"><a href="#/configuration/file" ng-click="closeSubnav()">Configuration File</a></li>-->
</ul>
- <ul class="nav__second-level btn-firmware" ng-style="navStyle" ng-class="{opened: (showSubMenu && firstLevel == 'firmware')}">
- <li ng-class="{'active': (path == '/firmware' || path == '/firmware/bmc')}"><a href="#/firmware/bmc" ng-click="closeSubnav()">BMC firmawre</a></li>
- <li ng-class="{'active': (path == '/firmware/server')}"><a href="#/firmware/server" ng-click="closeSubnav()">Server firmware</a></li>
- </ul>
<ul class="nav__second-level btn-users" ng-style="navStyle" ng-class="{opened: (showSubMenu && firstLevel == 'users')}">
<li ng-class="{'active': (path == '/users' || path == '/users/manage-accounts')}">
<a href="#/users/manage-accounts" ng-click="closeSubnav()">Manage user account</a></li>
diff --git a/app/configuration/controllers/firmware-controller.html b/app/configuration/controllers/firmware-controller.html
new file mode 100644
index 0000000..72d85ec
--- /dev/null
+++ b/app/configuration/controllers/firmware-controller.html
@@ -0,0 +1,136 @@
+<div id="firmware">
+ <div class="row column">
+ <h1>Firmware</h1>
+ </div>
+</div>
+<section class="row column">
+ <div class="column small-12 page-header">
+ <h2 class="inline h4">Manage BMC and server firmware</h2>
+ <a class="inline float-right btn-upload" ng-click="gotoAnchor()">
+ <svg version="1.1" baseProfile="tiny" class="btn-upload-icon" x="0px" y="0px" viewBox="0 0 24 24" xml:space="preserve">
+ <path d="M21,14v6H3v-6H1v9h22v-9H21z"/>
+ <path d="M11,5v13h2V5l4.5,4.5L19,8l-7-7L5,8l1.5,1.5L11,5z"/>
+ </svg>
+ Upload section
+ </a>
+ </div>
+</section>
+<section class="row column firmware__server-image">
+ <div class="table-header column small-12">
+ Server images
+ </div>
+ <div class="table row column">
+ <div class="table__head">
+ <div class="table__row">
+ <div class="table__cell">
+ Image ID
+ </div>
+ <div class="table__cell">
+ Server firmware version
+ </div>
+ <div class="table__cell">
+ State
+ </div>
+ <div class="table__cell">
+ Action
+ </div>
+ </div>
+ </div>
+ <div class="table__body">
+ <div class="table__row" data-table-row="">
+ <div class="table__cell"><span class="table__cell-label">Image ID:</span>46c8c3d0</div>
+ <div class="table__cell"><span class="table__cell-label">Server firmware version:</span>v1.99.4-82-g874f12e
+ </div>
+ <div class="table__cell firmware__active"><span class="table__cell-label">State:</span>Active</div>
+ <div class="table__cell">
+ <span class="table__cell-label">Action:</span><a href="" class="firmware__action-link">Delete</a>
+ </div>
+ </div>
+ <div class="table__row" data-table-row="">
+ <div class="table__cell"><span class="table__cell-label">Image ID:</span>46c8c3d0</div>
+ <div class="table__cell"><span class="table__cell-label">Server firmware version:</span>v2.1.1-22-abcdef
+ </div>
+ <div class="table__cell firmware__ready"><span class="table__cell-label">State:</span>Ready</div>
+ <div class="table__cell">
+ <span class="table__cell-label">Action:</span><a href="">Activate</a><a href="" class="firmware__action-link">Delete</a>
+ </div>
+ </div>
+ </div>
+ </div>
+</section>
+<section class="row column firmware__bmc-image">
+ <div class="table-header column small-12">
+ BMC images
+ </div>
+ <div class="table row column">
+ <div class="table__head">
+ <div class="table__row">
+ <div class="table__cell">
+ Image ID
+ </div>
+ <div class="table__cell">
+ Server firmware version
+ </div>
+ <div class="table__cell">
+ State
+ </div>
+ <div class="table__cell">
+ Action
+ </div>
+ </div>
+ </div>
+ <div class="table__body">
+ <div class="table__row" data-table-row="">
+
+ <div class="table__cell"><span class="table__cell-label">Image ID:</span>46c8c3d0</div>
+ <div class="table__cell"><span class="table__cell-label">Server firmware version:</span>v1.99.4-82-g874f12e
+ </div>
+ <div class="table__cell firmware__active"><span class="table__cell-label">State:</span>Active</div>
+ <div class="table__cell">
+ <span class="table__cell-label">Action:</span><a href="" class="firmware__action-link">Delete</a>
+ </div>
+ </div>
+ <div class="table__row" data-table-row="">
+ <div class="table__cell"><span class="table__cell-label">Image ID:</span>46c8c3d0</div>
+ <div class="table__cell"><span class="table__cell-label">Server firmware version:</span>v2.1.1-22-abcdef
+ </div>
+ <div class="table__cell firmware__ready"><span class="table__cell-label">State:</span>Ready</div>
+ <div class="table__cell">
+ <span class="table__cell-label">Action:</span><a href="">Activate</a><a href="" class="firmware__action-link">Delete</a>
+ </div>
+ </div>
+ </div>
+ </div>
+</section>
+<section class="row column">
+ <div class="column small-12 page-header">
+ <h2 class="inline h3 bold">Upload firmware image</h2>
+ </div>
+ <form id="firmware__upload-form" role="form" class="firmware__upload-form">
+ <div class="row column firmware__upload-station">
+ <label class="control-radio" for="upload-workstation">Upload from workstation
+ <input type="radio" name="firmware-upload" id="upload-workstation" checked/>
+ <span class="control__indicator control__indicator-on"></span>
+ </label>
+ <p>Optional text area. Can be used to explain about updating openBMC firmware from workstation. This could be step-by-step instruction. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce et</p>
+ </div>
+ <div class="row column firmware__upload-tftp">
+ <label class="control-radio" for="upload-tftp">Upload from tftp server
+ <input type="radio" name="firmware-upload" id="upload-tftp"/>
+ <span class="control__indicator control__indicator-on"></span>
+ </label>
+ <p>Optional text area. Can be used to explain about updating openBMC firmware from workstation. This could be step-by-step instruction. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce et</p>
+ <fieldset>
+ <div class="column medium-4 no-padding">
+ <label for="tftp-ip">Server IP address</label>
+ <input name="tftp-ip" id="tftp-ip" type="number"/>
+ </div>
+ <div class="column medium-4 end">
+ <label for="tftp-file-name">File name</label>
+ <input name="tftp-file-name" id="tftp-file-name" type="text"/>
+ </div>
+ </fieldset>
+ </div>
+ <button class="float-right inline button btn-primary" id="upload">Update firmware</button>
+ </form>
+</section>
\ No newline at end of file
diff --git a/app/configuration/controllers/firmware-controller.js b/app/configuration/controllers/firmware-controller.js
new file mode 100644
index 0000000..5004d3b
--- /dev/null
+++ b/app/configuration/controllers/firmware-controller.js
@@ -0,0 +1,46 @@
+/**
+ * Controller for firmware
+ *
+ * @module app/configuration
+ * @exports firmwareController
+ * @name firmwareController
+ * @version 0.1.0
+ */
+
+window.angular && (function (angular) {
+ 'use strict';
+
+ angular
+ .module('app.configuration')
+ .controller('firmwareController', [
+ '$scope',
+ '$window',
+ 'APIUtils',
+ 'dataService',
+ '$location',
+ '$anchorScroll',
+ function ($scope, $window, APIUtils, dataService, $location, $anchorScroll) {
+ $scope.dataService = dataService;
+
+ //Check if window has scroll
+ $scope.hasVScroll = document.body.scrollHeight > document.body.clientHeight;
+ $scope.link = document.getElementsByClassName("btn-upload");
+ $scope.appWindow = angular.element($window);
+
+ //Hide/Show anchor link if window has scroll
+ if ($scope.hasVScroll == true) {
+ $scope.link[0].style.display = 'block';
+ } else {
+ $scope.link[0].style.display = 'none';
+ }
+
+ //Scroll to target anchor
+ $scope.gotoAnchor = function () {
+ $location.hash('upload');
+ $anchorScroll();
+ };
+ }
+ ]
+ );
+
+})(angular);
diff --git a/app/configuration/index.js b/app/configuration/index.js
index a68d5a0..f0918e0 100644
--- a/app/configuration/index.js
+++ b/app/configuration/index.js
@@ -40,7 +40,11 @@
'templateUrl': 'configuration/controllers/network-controller.html',
'controller': 'networkController',
authenticated: true
- });
+ }).when('/configuration/firmware', {
+ 'templateUrl': 'configuration/controllers/firmware-controller.html',
+ 'controller': 'firmwareController',
+ authenticated: true
+ });
}]);
})(window.angular);
diff --git a/app/configuration/styles/firmware.scss b/app/configuration/styles/firmware.scss
new file mode 100644
index 0000000..a3d2226
--- /dev/null
+++ b/app/configuration/styles/firmware.scss
@@ -0,0 +1,66 @@
+.btn-upload {
+ color: $lightbg__primary;
+ font-weight: 700;
+ text-decoration: none;
+ .btn-upload-icon {
+ fill: $lightbg__primary;
+ display: inline-block;
+ width: 1.25em;
+ height: 1.25em;
+ }
+ &:visited .btn-upload-icon {
+ fill: $links__visited;
+ }
+ &:hover .btn-upload-icon {
+ fill: $lightbg__primary;
+ }
+ &:hover {
+ cursor: pointer;
+ }
+}
+
+.table__cell {
+ font-weight: 700;
+ a {
+ display: inline-block;
+ margin-right: 1.7em;
+ text-decoration: none;
+ font-weight: 700;
+ }
+}
+
+.table-header {
+ font-weight: 700;
+}
+
+.firmware__ready {
+ font-weight: 300;
+}
+
+.firmware__bmc-image {
+ margin-top: 2.5em;
+ margin-bottom: 2.5em;
+}
+
+.firmware__upload-form {
+ label {
+ font-weight: 700;
+ }
+ .row p,
+ fieldset {
+ padding-left: 3em;
+ label {
+ font-weight: 300;
+ }
+ }
+ input {
+ height: 2.4em;
+ }
+}
+.firmware__upload-station {
+ padding-bottom: 1em;
+}
+.firmware__upload-tftp {
+ padding-top: 2em;
+ border-top: 1px solid $medgrey;
+}
\ No newline at end of file
diff --git a/app/configuration/styles/index.scss b/app/configuration/styles/index.scss
index 7c8006a..f40eb84 100644
--- a/app/configuration/styles/index.scss
+++ b/app/configuration/styles/index.scss
@@ -1,4 +1,5 @@
@import "./network.scss";
@import "./security.scss";
@import "./date-time.scss";
-@import "./file.scss";
\ No newline at end of file
+@import "./file.scss";
+@import "./firmware.scss";
\ No newline at end of file
diff --git a/app/firmware/controllers/bmc-controller.html b/app/firmware/controllers/bmc-controller.html
deleted file mode 100644
index 61f7493..0000000
--- a/app/firmware/controllers/bmc-controller.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<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
deleted file mode 100644
index 0b3a622..0000000
--- a/app/firmware/controllers/bmc-controller.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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
deleted file mode 100644
index a99d17e..0000000
--- a/app/firmware/controllers/server-controller.html
+++ /dev/null
@@ -1,5 +0,0 @@
-<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
deleted file mode 100644
index daf97b4..0000000
--- a/app/firmware/controllers/server-controller.js
+++ /dev/null
@@ -1,26 +0,0 @@
-/**
- * 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
deleted file mode 100644
index 8094a40..0000000
--- a/app/firmware/index.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * 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/index.html b/app/index.html
index 43240a8..840d71d 100644
--- a/app/index.html
+++ b/app/index.html
@@ -75,9 +75,7 @@
<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="configuration/controllers/firmware-controller.js"></script>
<script src="users/index.js"></script>
<script src="users/controllers/user-accounts-controller.js"></script>
<!-- endbuild -->
diff --git a/app/index.js b/app/index.js
index 11c3576..13add97 100644
--- a/app/index.js
+++ b/app/index.js
@@ -31,7 +31,6 @@
'app.serverControl',
'app.serverHealth',
'app.configuration',
- 'app.firmware',
'app.users'
])
// Route configuration
diff --git a/app/styles/index.scss b/app/styles/index.scss
index ee57b61..ee88ea0 100644
--- a/app/styles/index.scss
+++ b/app/styles/index.scss
@@ -6,5 +6,4 @@
@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