diff options
author | Gunnar Mills <gmills@us.ibm.com> | 2018-03-01 16:19:37 -0600 |
---|---|---|
committer | Gunnar Mills <gmills@us.ibm.com> | 2018-03-05 11:49:45 -0600 |
commit | 6473a41d6c377667993ee9b82485867c4d6fc21c (patch) | |
tree | e0d98323a1b167f6468d870b6ddf6420222cc63c | |
parent | eedefd3ead28d0d276539552faad54bb709a7af5 (diff) | |
download | phosphor-webui-6473a41d6c377667993ee9b82485867c4d6fc21c.tar.gz phosphor-webui-6473a41d6c377667993ee9b82485867c4d6fc21c.zip |
Display Version when confirming changing priority
Before the GUI displayed when changing the priority:
"Change firmware e129c45b priority?"
It now displays:
"Change firmware v2.0-165-ge571670 priority?"
This is important since the user never sees the
image ID (e.g. e129c45b) and always sees the
image version (e.g. v2.0-165-ge571670).
Tested: confirmed text is correct and change priority works
Change-Id: Ie9403aaade8a307b6de54feef20adc2b04e2b80b
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
-rw-r--r-- | app/common/directives/firmware-list.html | 4 | ||||
-rw-r--r-- | app/common/directives/firmware-list.js | 6 | ||||
-rw-r--r-- | app/configuration/controllers/firmware-controller.html | 2 | ||||
-rw-r--r-- | app/configuration/controllers/firmware-controller.js | 4 |
4 files changed, 9 insertions, 7 deletions
diff --git a/app/common/directives/firmware-list.html b/app/common/directives/firmware-list.html index 0be4625..ceec160 100644 --- a/app/common/directives/firmware-list.html +++ b/app/common/directives/firmware-list.html @@ -25,11 +25,11 @@ <div class="table__cell"> <span class="table__cell-label">Boot priority:</span> <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-click="!$first && changePriority(firmware.imageId, firmware.Version, firmware.Priority, firmware.Priority - 1)" ng-show="firmware.activationStatus == 'Functional' || firmware.activationStatus == 'Ready'"> <span class="accessible-text">firmware up in priority</span></div> <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-click="!$last && changePriority(firmware.imageId, firmware.Version, firmware.Priority, firmware.Priority + 1)" ng-hide="firmware.activationStatus == 'Ready'"> <span class="accessible-text">firmware down in priority</span></div> </div> diff --git a/app/common/directives/firmware-list.js b/app/common/directives/firmware-list.js index 781257e..69a8bdd 100644 --- a/app/common/directives/firmware-list.js +++ b/app/common/directives/firmware-list.js @@ -23,10 +23,10 @@ window.angular && (function (angular) { $scope.$parent.deleteImage(imageId); } - $scope.changePriority = function(imageId, from, to){ - $scope.$parent.changePriority(imageId, from, to); + $scope.changePriority = function(imageId, imageVersion, from, to){ + $scope.$parent.changePriority(imageId, imageVersion, from, to); } }] }; }]); -})(window.angular);
\ No newline at end of file +})(window.angular); diff --git a/app/configuration/controllers/firmware-controller.html b/app/configuration/controllers/firmware-controller.html index b532b41..5f4c7b0 100644 --- a/app/configuration/controllers/firmware-controller.html +++ b/app/configuration/controllers/firmware-controller.html @@ -76,7 +76,7 @@ <h1 class="modal-title h4 inline">Change image priority</h1> </div> <div class="modal__content"> - <p>Change firmware {{priority_image_id}} priority?</p> + <p>Change firmware {{priority_image_version}} priority?</p> </div> <div class="modal__button-wrapper"> <button class="inline btn-secondary" ng-click="confirm_priority=false;">Cancel</button> diff --git a/app/configuration/controllers/firmware-controller.js b/app/configuration/controllers/firmware-controller.js index 6356a73..9416177 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_id = ""; $scope.activate_image_id = ""; $scope.priority_image_id = ""; + $scope.priority_image_version = ""; $scope.priority_from = -1; $scope.priority_to = -1; $scope.confirm_priority = false; @@ -136,8 +137,9 @@ window.angular && (function (angular) { }); } - $scope.changePriority = function(imageId, from, to){ + $scope.changePriority = function(imageId, imageVersion, from, to){ $scope.priority_image_id = imageId; + $scope.priority_image_version = imageVersion; $scope.priority_from = from; $scope.priority_to = to; |