From: Suresh Babu Angadi <
sure...@in.ibm.com>
Currently removal of storage devices is supported only for dsad
and fc devices. So included generic message for other types.
Signed-off-by: Suresh Babu Angadi <
sure...@in.ibm.com>
---
ui/js/src/gingers390x.storage.js | 8 +++++++-
ui/pages/i18n.json.tmpl | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ui/js/src/gingers390x.storage.js b/ui/js/src/gingers390x.storage.js
index b5994bf..1c6022b 100644
--- a/ui/js/src/gingers390x.storage.js
+++ b/ui/js/src/gingers390x.storage.js
@@ -502,6 +502,7 @@ gingers390x.loadStorageActionButtons = function() {
var selectedRowDetails = JSON.stringify(ginger.selectedrows);
var fcpDeviceNo = 0;
var removalErrorMessage = '';
+ var UnsupportedDiskTypes = [];
opts['loadingMessage'] = i18n['GS390XSD003M'];
ginger.showBootgridLoading(opts);
ginger.hideBootgridData(opts);
@@ -564,6 +565,7 @@ gingers390x.loadStorageActionButtons = function() {
}
}else{
removalErrorMessage = removalErrorMessage + deviceId+"<br>";
+ UnsupportedDiskTypes.push(diskType);
rowNums = rowNums - 1;
if (rowNums == 0) {
@@ -572,8 +574,12 @@ gingers390x.loadStorageActionButtons = function() {
}
});
+ var UniqueUnsupportedDiskTypes = UnsupportedDiskTypes.filter(function(itm, i, a) {
+ return i == a.indexOf(itm);
+ });
+
if(removalErrorMessage!="")
- wok.message.error(i18n['GS390XSD0010M']+'<br>'+removalErrorMessage, '#alert-modal-nw-container', true);
+ wok.message.error(i18n['GS390XSD0010M'].replace("%1",UniqueUnsupportedDiskTypes.join(", "))+'<br>'+removalErrorMessage, '#alert-modal-nw-container', true);
});
}, function() {});
diff --git a/ui/pages/i18n.json.tmpl b/ui/pages/i18n.json.tmpl
index 0e47c29..5643527 100644
--- a/ui/pages/i18n.json.tmpl
+++ b/ui/pages/i18n.json.tmpl
@@ -108,7 +108,7 @@
"GS390XSD007M": "$_("Add FCP Device")",
"GS390XSD008M": "$_("Add ECKD Device")",
"GS390XSD009M": "$_("Format ECKD")",
- "GS390XSD0010M": "$_("Following devices cannot be removed because of the missing device type.Please rectify the issue by manually logging onto the system via console.")",
+ "GS390XSD0010M": "$_("Removal of following devices of type %1 is not supprted.")",
"GS390XSD011M": "$_("Create Partition")",
"GS390XOSA001M": "$_("Do you want to change the OSA port configuration of the interface %1 to %2.<br> This may affect network connectivity. Please confirm !!!")",
--
2.7.4