This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.15
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.15 by this push:
new bc28ae4 ui: Add storage name to delete primary/secondary storage
dialog (#5359)
bc28ae4 is described below
commit bc28ae46065a865942c34472709b96fab157a0ae
Author: Hoang Nguyen <[email protected]>
AuthorDate: Tue Aug 24 14:28:41 2021 +0700
ui: Add storage name to delete primary/secondary storage dialog (#5359)
* Add storage name to delete primary/secondary storage dialog
* show display name in alert message
* Update AutogenView.vue
---
ui/src/config/section/infra/primaryStorages.js | 3 ++-
ui/src/config/section/infra/secondaryStorages.js | 3 ++-
ui/src/views/AutogenView.vue | 9 +++++++--
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/ui/src/config/section/infra/primaryStorages.js
b/ui/src/config/section/infra/primaryStorages.js
index eda5717..dc18800 100644
--- a/ui/src/config/section/infra/primaryStorages.js
+++ b/ui/src/config/section/infra/primaryStorages.js
@@ -111,7 +111,8 @@ export default {
label: 'label.action.delete.primary.storage',
dataView: true,
args: ['forced'],
- show: (record) => { return (record.state === 'Down' || record.state ===
'Maintenance' || record.state === 'Disconnected') }
+ show: (record) => { return (record.state === 'Down' || record.state ===
'Maintenance' || record.state === 'Disconnected') },
+ displayName: (record) => { return record.name || record.displayName ||
record.id }
}
]
}
diff --git a/ui/src/config/section/infra/secondaryStorages.js
b/ui/src/config/section/infra/secondaryStorages.js
index 17600aa..450db73 100644
--- a/ui/src/config/section/infra/secondaryStorages.js
+++ b/ui/src/config/section/infra/secondaryStorages.js
@@ -84,7 +84,8 @@ export default {
icon: 'delete',
label: 'label.action.delete.secondary.storage',
message: 'message.action.delete.secondary.storage',
- dataView: true
+ dataView: true,
+ displayName: (record) => { return record.name || record.displayName ||
record.id }
}
]
}
diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue
index 5f408c7..f691cf9 100644
--- a/ui/src/views/AutogenView.vue
+++ b/ui/src/views/AutogenView.vue
@@ -143,9 +143,14 @@
</a>
</span>
<a-spin :spinning="actionLoading">
- <span v-if="currentAction.message">
+ <span v-if="currentAction.message || 'displayName' in currentAction">
<a-alert type="warning">
- <span slot="message" v-html="$t(currentAction.message)" />
+ <span slot="message">
+ <div v-if="currentAction.message"
v-html="$t(currentAction.message)"></div>
+ <div v-if="'displayName' in currentAction">
+ <strong>{{ currentAction.displayName(resource) }}</strong>
+ </div>
+ </span>
</a-alert>
<br v-if="currentAction.paramFields.length > 0"/>
</span>