From 9dd0acf8c9809ed819aa98430c48183f42d68312 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Fri, 11 Jun 2021 20:07:07 +0530 Subject: [PATCH] ui: add action syncStoragePool (#5098) Added action in UI for syncStoragePool API for DatastoreCluster type primary storages. Fixes #5086 Signed-off-by: Abhishek Kumar --- ui/public/locales/en.json | 2 ++ ui/src/config/section/infra/primaryStorages.js | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index d13758ba585..1f835756b6f 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -2063,6 +2063,7 @@ "label.supportsstrechedl2subnet": "Supports Streched L2 Subnet", "label.suspend.project": "Suspend Project", "label.switch.type": "Switch Type", +"label.sync.storage": "Sync Storage Pool", "label.system.capacity": "System Capacity", "label.system.offering": "System Offering", "label.system.offering.for.router": "System Offering for Router", @@ -2627,6 +2628,7 @@ "message.confirm.start.lb.vm": "Please confirm you want to start LB VM", "message.confirm.stop.kubernetes.cluster": "Please confirm that you want to stop this Kubernetes cluster.", "message.confirm.stop.lb.vm": "Please confirm you want to stop LB VM", +"message.confirm.sync.storage": "Please confirm you want to sync the storage pool", "message.confirm.upgrade.router.newer.template": "Please confirm that you want to upgrade router to use newer template", "message.confirm.upgrade.routers.account.newtemplate": "Please confirm that you want to upgrade all routers in this account to use newer template", "message.confirm.upgrade.routers.cluster.newtemplate": "Please confirm that you want to upgrade all routers in this cluster to use newer template", diff --git a/ui/src/config/section/infra/primaryStorages.js b/ui/src/config/section/infra/primaryStorages.js index 9f78ab95768..eda57176668 100644 --- a/ui/src/config/section/infra/primaryStorages.js +++ b/ui/src/config/section/infra/primaryStorages.js @@ -81,6 +81,14 @@ export default { defaultArgs: { enabled: true }, show: (record) => { return record.state === 'Disabled' } }, + { + api: 'syncStoragePool', + icon: 'sync', + label: 'label.sync.storage', + message: 'message.confirm.sync.storage', + dataView: true, + show: (record) => { return record.state === 'Up' && record.type === 'DatastoreCluster' } + }, { api: 'enableStorageMaintenance', icon: 'plus-square',