weizhouapache commented on code in PR #9208:
URL: https://github.com/apache/cloudstack/pull/9208#discussion_r1741546171


##########
ui/src/config/section/storage.js:
##########
@@ -543,6 +543,142 @@ export default {
           groupMap: (selection) => { return selection.map(x => { return { id: 
x } }) }
         }
       ]
+    },
+    {
+      name: 'sharedfs',
+      title: 'label.sharedfs',
+      icon: 'file-text-outlined',
+      permission: ['listSharedFileSystems'],
+      resourceType: 'SharedFS',
+      columns: () => {
+        const fields = ['name', 'state', 'sizegb']
+        const metricsFields = ['diskkbsread', 'diskkbswrite', 'utilization', 
'physicalsize']
+
+        if (store.getters.metrics) {
+          fields.push(...metricsFields)
+        }
+        if (store.getters.userInfo.roletype === 'Admin') {
+          fields.push('storage')
+          fields.push('account')
+        } else if (store.getters.userInfo.roletype === 'DomainAdmin') {
+          fields.push('account')
+        }
+        if (store.getters.listAllProjects) {
+          fields.push('project')
+        }
+        fields.push('zonename')
+
+        return fields
+      },
+      details: ['id', 'name', 'description', 'state', 'filesystem', 
'diskofferingdisplaytext', 'ipaddress', 'sizegb', 'provider', 'protocol', 
'provisioningtype', 'utilization', 'diskkbsread', 'diskkbswrite', 'diskioread', 
'diskiowrite', 'account', 'domain', 'created'],
+      tabs: [{
+        component: shallowRef(defineAsyncComponent(() => 
import('@/views/storage/SharedFSTab.vue')))
+      }],
+      searchFilters: () => {
+        var filters = ['name', 'zoneid', 'domainid', 'account', 'networkid', 
'serviceofferingid', 'diskofferingid']
+        return filters
+      },
+      actions: [
+        {
+          api: 'createSharedFileSystem',
+          icon: 'plus-outlined',
+          docHelp: 'adminguide/storage.html#creating-a-new-file-share',
+          label: 'label.create.sharedfs',
+          listView: true,
+          popup: true,
+          component: shallowRef(defineAsyncComponent(() => 
import('@/views/storage/CreateSharedFS.vue')))
+        },
+        {
+          api: 'updateSharedFileSystem',
+          icon: 'edit-outlined',
+          docHelp: 'adminguide/storage.html#lifecycle-operations',
+          label: 'label.update.sharedfs',
+          dataView: true,
+          popup: true,
+          component: shallowRef(defineAsyncComponent(() => 
import('@/views/storage/UpdateSharedFS.vue')))
+        },
+        {
+          api: 'startSharedFileSystem',
+          icon: 'caret-right-outlined',
+          label: 'label.action.start.sharedfs',
+          message: 'message.action.start.sharedfs',
+          docHelp: 'adminguide/storage.html#lifecycle-operations',
+          dataView: true,
+          show: (record) => { return ['Stopped'].includes(record.state) }
+        },
+        {
+          api: 'stopSharedFileSystem',
+          icon: 'poweroff-outlined',
+          label: 'label.action.stop.sharedfs',
+          message: 'message.action.stop.sharedfs',
+          docHelp: 'adminguide/storage.html#lifecycle-operations',
+          dataView: true,
+          popup: true,

Review Comment:
   ```suggestion
             popup: true,
             groupAction: true,
   ```



-- 
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.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

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

Reply via email to