diff --git a/ui/public/locales/en.json b/ui/public/locales/en.json index b42899fc631..cda4e34618a 100644 --- a/ui/public/locales/en.json +++ b/ui/public/locales/en.json @@ -1166,6 +1166,7 @@ "label.isdedicated": "Dedicated", "label.isdefault": "Is default", "label.isdynamicallyscalable": "Dynamically scalable", +"label.isencrypted": "Encrypted", "label.istagarule": "Tag as JS rule", "label.isextractable": "Extractable", "label.isfeatured": "Featured", diff --git a/ui/src/components/view/SearchView.vue b/ui/src/components/view/SearchView.vue index 7883b162d66..07e2d14e8bc 100644 --- a/ui/src/components/view/SearchView.vue +++ b/ui/src/components/view/SearchView.vue @@ -111,6 +111,10 @@ + item.name === 'isencrypted') + this.fields[volumeIndex].loading = true + promises.push(await this.fetchVolumes(searchKeyword)) + } + Promise.all(promises).then(response => { if (typeIndex > -1) { const types = response.filter(item => item.type === 'type') @@ -884,6 +899,19 @@ export default { }) } }, + fetchVolumes (searchKeyword) { + return new Promise((resolve, reject) => { + api('listvolumes', { listAll: true, isencrypted: searchKeyword }).then(json => { + const volumes = json.listvolumesresponse.volume + resolve({ + type: 'isencrypted', + data: volumes + }) + }).catch(error => { + reject(error.response.headers['x-description']) + }) + }) + }, fetchManagementServers (searchKeyword) { return new Promise((resolve, reject) => { api('listManagementServers', { listAll: true, keyword: searchKeyword }).then(json => { diff --git a/ui/src/config/section/storage.js b/ui/src/config/section/storage.js index 28c451105a1..4c76ebf8db3 100644 --- a/ui/src/config/section/storage.js +++ b/ui/src/config/section/storage.js @@ -91,7 +91,7 @@ export default { } ], searchFilters: () => { - var filters = ['name', 'zoneid', 'domainid', 'account', 'state', 'tags', 'serviceofferingid', 'diskofferingid'] + var filters = ['name', 'zoneid', 'domainid', 'account', 'state', 'tags', 'serviceofferingid', 'diskofferingid', 'isencrypted'] if (['Admin', 'DomainAdmin'].includes(store.getters.userInfo.roletype)) { filters.push('storageid') }