summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2018-03-21 15:31:56 -0500
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-03-29 13:44:58 +0000
commitee6efd85e5c9ee8bcc606f0f2fdb5b8663973fa2 (patch)
treea05578d5fc2bb15026d151a388cc40c229bb57cf
parent51b03887bf146392beb4518a3233a8bcf5c354a6 (diff)
downloadphosphor-webui-ee6efd85e5c9ee8bcc606f0f2fdb5b8663973fa2.tar.gz
phosphor-webui-ee6efd85e5c9ee8bcc606f0f2fdb5b8663973fa2.zip
Add server confirm activation modal
Added text specific to server images that appears in the activation modal when a "server" image is activated. The "server" and "BMC" images use the same modal, but the text and if radio buttons appear differ. Resolves openbmc/openbmc#2967 Tested: Activated both a server and BMC image on a Witherspoon. Change-Id: I83693641ebfef802d403141ade55a950f359ba6e Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
-rw-r--r--app/common/directives/firmware-list.html2
-rw-r--r--app/common/directives/firmware-list.js4
-rw-r--r--app/configuration/controllers/firmware-controller.html10
-rw-r--r--app/configuration/controllers/firmware-controller.js4
4 files changed, 13 insertions, 7 deletions
diff --git a/app/common/directives/firmware-list.html b/app/common/directives/firmware-list.html
index 3c2d826..887548c 100644
--- a/app/common/directives/firmware-list.html
+++ b/app/common/directives/firmware-list.html
@@ -57,7 +57,7 @@
</div>
<div class="table__cell firmware__action">
<span class="table__cell-label">Action:</span>
- <button class="firmware__action-link" ng-show="firmware.activationStatus == 'Ready'" ng-click="activate(firmware.imageId, firmware.Version)">Activate</button>
+ <button class="firmware__action-link" ng-show="firmware.activationStatus == 'Ready'" ng-click="activate(firmware.imageId, firmware.Version, firmware.imageType)">Activate</button>
<button class="firmware__action-link" ng-show="firmware.activationStatus != 'Functional'" ng-click="delete(firmware.imageId, firmware.Version)">Delete</button>
</div>
</div>
diff --git a/app/common/directives/firmware-list.js b/app/common/directives/firmware-list.js
index a4cc58f..4cdf6d7 100644
--- a/app/common/directives/firmware-list.js
+++ b/app/common/directives/firmware-list.js
@@ -15,8 +15,8 @@ window.angular && (function (angular) {
},
'controller': ['$rootScope', '$scope','dataService', '$location', '$timeout', function($rootScope, $scope, dataService, $location, $timeout){
$scope.dataService = dataService;
- $scope.activate = function(imageId, imageVersion){
- $scope.$parent.activateImage(imageId, imageVersion);
+ $scope.activate = function(imageId, imageVersion, imageType){
+ $scope.$parent.activateImage(imageId, imageVersion, imageType);
}
$scope.delete = function(imageId, imageVersion){
diff --git a/app/configuration/controllers/firmware-controller.html b/app/configuration/controllers/firmware-controller.html
index 298b323..92a0083 100644
--- a/app/configuration/controllers/firmware-controller.html
+++ b/app/configuration/controllers/firmware-controller.html
@@ -110,12 +110,16 @@
viewBox="0 0 32 32"><path
d="M18 14h-6v2h1v6h-2v2h8v-2h-2z"/><circle cx="16" cy="10" r="2"/><path
d="M16 2C8.269 2 2 8.269 2 16s6.269 14 14 14 14-6.269 14-14S23.731 2 16 2zm0 26C9.383 28 4 22.617 4 16S9.383 4 16 4s12 5.383 12 12-5.383 12-12 12z"/></svg></span>
- Confirm BMC firmware file activation
+ <!-- We call "Host" firmware "server" firmware -->
+ Confirm {{activate_image_type == 'Host' ? 'server' : activate_image_type}} firmware file activation
</h1>
</div>
<div class="modal__content">
- <p>When you activate the BMC firmware file, {{activate_image_version}}, the BMC must be rebooted before it will operate with the new firmware code.</p>
- <form>
+ <div ng-switch on="activate_image_type">
+ <p ng-switch-when="BMC">When you activate the BMC firmware file, {{activate_image_version}}, the BMC must be rebooted before it will operate with the new firmware code.</p>
+ <p ng-switch-when="Host">When you activate server firmware file, {{activate_image_version}}, the new firmware will not operate until the next time the server boots.</p>
+ </div>
+ <form ng-if="activate_image_type == 'BMC'">
<fieldset>
<div class="row column">
<label class="control-radio bold" for="activate-without-reboot">Activate firmware file without rebooting BMC
diff --git a/app/configuration/controllers/firmware-controller.js b/app/configuration/controllers/firmware-controller.js
index 812f471..b9a87b7 100644
--- a/app/configuration/controllers/firmware-controller.js
+++ b/app/configuration/controllers/firmware-controller.js
@@ -38,6 +38,7 @@ window.angular && (function (angular) {
$scope.delete_image_version = "";
$scope.activate_image_id = "";
$scope.activate_image_version = "";
+ $scope.activate_image_type = "";
$scope.priority_image_id = "";
$scope.priority_image_version = "";
$scope.priority_from = -1;
@@ -53,9 +54,10 @@ window.angular && (function (angular) {
type: "warning"
};
- $scope.activateImage = function(imageId, imageVersion){
+ $scope.activateImage = function(imageId, imageVersion, imageType){
$scope.activate_image_id = imageId;
$scope.activate_image_version = imageVersion;
+ $scope.activate_image_type = imageType;
$scope.activate_confirm = true;
}
OpenPOWER on IntegriCloud