You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by GitBox <gi...@apache.org> on 2020/10/12 08:23:10 UTC

[GitHub] [cloudstack-primate] rhtyd commented on a change in pull request #796: Add storage policy details in the detail view

rhtyd commented on a change in pull request #796:
URL: https://github.com/apache/cloudstack-primate/pull/796#discussion_r503120718



##########
File path: src/config/section/offering.js
##########
@@ -111,7 +118,13 @@ export default {
       permission: ['listDiskOfferings', 'listDomains'],
       params: { isrecursive: 'true' },
       columns: ['name', 'displaytext', 'disksize', 'domain', 'zone', 'order'],
-      details: ['name', 'id', 'displaytext', 'disksize', 'provisioningtype', 'storagetype', 'iscustomized', 'tags', 'domain', 'zone', 'created'],
+      details: () => {
+        var fields = ['name', 'id', 'displaytext', 'disksize', 'provisioningtype', 'storagetype', 'iscustomized', 'tags', 'domain', 'zone', 'created']
+        if (store.getters.apis.createDiskOffering.params.filter(x => x.name === 'storagepolicy').length > 0) {

Review comment:
       @Pearl1594 can you add check what if the API doesn't exist or is available? 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org