Updating login structure

Updated login structure with a field where user can manually add server hostname if it is not populated automatically

Change-Id: I147c2c15869131540e327bda26c05b59d78e01d5
Signed-off-by: Iftekharul Islam <iffy.ryan@ibm.com>
diff --git a/app/common/directives/app-header.html b/app/common/directives/app-header.html
index 9388bb6..0ba8607 100644
--- a/app/common/directives/app-header.html
+++ b/app/common/directives/app-header.html
@@ -6,9 +6,9 @@
 	</header>
 	<div class="header__functions-wrapper" role="heading">
 		<div class="logo__wrapper"><img src="assets/images/logo.svg" class="header__logo" alt="company logo"/></div>
-		<button class="inline header__multi-server" aria-label="multi server select" ng-class="{'active': multi_server_recent}" ng-click="multiRecent();">
+		<!-- <button class="inline header__multi-server" aria-label="multi server select" ng-class="{'active': multi_server_recent}" ng-click="multiRecent();">
 			<span class="icon icon-angle" aria-hidden="true"></span><span class="accessible-text">Multi server switcher</span>
-		</button>
+		</button>-->
 		<div class="inline header__server-name">
 			<p class="header__hostname">{{dataService.hostname}}</p>
 			<p class="header__server-ip courier-bold">BMC IP address {{dataService.server_id}}</p>
diff --git a/app/common/directives/app-navigation.html b/app/common/directives/app-navigation.html
index 4e75a0d..3213345 100644
--- a/app/common/directives/app-navigation.html
+++ b/app/common/directives/app-navigation.html
@@ -64,7 +64,7 @@
 				<span>Users</span>
 			</button>
 		</li>
-		<li class="btn-multi-server">
+		<!--<li class="btn-multi-server">
 			<a ng-class="{opened: firstLevel == 'multi-server'}" href="#/multi-server/overview" ng-click="change('multi-server')" tabindex="6">
 				<span>
 					<svg class="nav-icon" version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 24 24" xml:space="preserve">
@@ -75,7 +75,7 @@
 	s4.7,2.1,4.7,4.7s-2.1,4.7-4.7,4.7S2.2,9.5,2.2,6.9z"/>
 </svg>
 				All Servers</span></a>
-		</li>
+		</li> -->
 	</ul>
 	<ul class="nav__second-level btn-health" ng-style="navStyle" ng-class="{opened: (showSubMenu && firstLevel == 'server-health')}">
 		<li ng-class="{'active': (path == '/server-health/event-log')}">
diff --git a/app/common/directives/firmware-list.html b/app/common/directives/firmware-list.html
index 2f1d3fc..c53a417 100644
--- a/app/common/directives/firmware-list.html
+++ b/app/common/directives/firmware-list.html
@@ -21,16 +21,23 @@
 			</div>
 		</div>
 		<div class="table__body">
-			<div class="table__row" ng-class="firmware.active ? 'firmware__primary' : ''" ng-repeat="firmware in firmwares|filter:filterBy">
+			<div class="table__row" ng-class="firmware.functional ? 'firmware__primary' : ''" ng-repeat="firmware in firmwares|filter:filterBy|orderBy:'+Priority'">
 				<div class="table__cell">
 					<span class="table__cell-label">Boot priority:</span>
-					<div class="icon icon__up-arrow icon-as-spacer" aria-hidden="true">
+					<div class="icon icon__up-arrow" aria-hidden="true" ng-class="{'icon-as-spacer':$first}"
+					     ng-click="!$first && changePriority(firmware.imageId, firmware.Priority, firmware.Priority - 1)"
+					     ng-show="firmware.activationFlags.functional || firmware.activationFlags.ready">
 						<span class="accessible-text">firmware up in priority</span></div>
-					<div class="icon icon__down-arrow" aria-hidden="true">
+					<div class="icon icon__down-arrow" aria-hidden="true" ng-class="{'icon-as-spacer':$last}"
+					    ng-click="!$last && changePriority(firmware.imageId, firmware.Priority, firmware.Priority + 1)"
+					    ng-hide="firmware.activationFlags.ready">
 						<span class="accessible-text">firmware down in priority</span></div>
 				</div>
 				<div class="table__cell firmware__active">
-					<span class="table__cell-label">Image state:</span><span ng-if="firmware.active">Active</span>
+					<span class="table__cell-label">Image state:</span>
+					<span ng-if="firmware.activationFlags.functional">Functional</span>
+					<span ng-if="firmware.activationFlags.active">Active</span>
+					<span ng-if="firmware.activationFlags.ready">Ready</span>
 				</div>
 				<div class="table__cell firmware__version" ng-class="{'active':firmware.isExtended}">
 					<span class="table__cell-label">Version:</span>{{firmware.Version}}
@@ -52,8 +59,8 @@
 				</div>
 				<div class="table__cell">
 				    <span class="table__cell-label">Action:</span>
-				    <button class="firmware__action-link" ng-show="!firmware.active" ng-click="activate(firmware.imageId)">Activate</button>
-				    <button class="firmware__action-link" ng-show="!firmware.active" ng-click="delete(firmware.imageId)">Delete</button>
+				    <button class="firmware__action-link" ng-show="firmware.activationFlags.ready" ng-click="activate(firmware.imageId)">Activate</button>
+				    <button class="firmware__action-link" ng-show="!firmware.functional" ng-click="delete(firmware.imageId)">Delete</button>
 				</div>
 			</div>
 		</div>
diff --git a/app/common/directives/firmware-list.js b/app/common/directives/firmware-list.js
index f4cc94f..6cfa3a1 100644
--- a/app/common/directives/firmware-list.js
+++ b/app/common/directives/firmware-list.js
@@ -22,6 +22,10 @@
                     $scope.delete = function(imageId){
                         $scope.$parent.deleteImage(imageId);
                     }
+
+                    $scope.changePriority = function(imageId, from, to){
+                        $scope.$parent.changePriority(imageId, from, to);
+                    }
                 }]
             };
         }]);