[PATCH] [Gingers390x] generic error message for removal of storage devices

0 views
Skip to first unread message

sure...@linux.vnet.ibm.com

unread,
Feb 7, 2017, 6:32:08 AM2/7/17
to Ginger Devel
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

Daniel Henrique Barboza

unread,
Feb 7, 2017, 7:15:25 AM2/7/17
to ginger-...@googlegroups.com
typo: "supprted"

sure...@linux.vnet.ibm.com

unread,
Feb 9, 2017, 2:22:39 AM2/9/17
to Ginger Devel
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.

v2: corrected typo
index 0e47c29..cd429ce 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 supported.")",
"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

Suresh Babu Angadi

unread,
Feb 9, 2017, 2:24:28 AM2/9/17
to ginger-...@googlegroups.com
Hi Daniel,

I have sent v2, correcting typo.
--
Regards,
Suresh Babu Angadi

Daniel Henrique Barboza

unread,
Feb 9, 2017, 7:20:12 AM2/9/17
to ginger-...@googlegroups.com
Applied. Thanks!
Reply all
Reply to author
Forward
0 new messages