This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git


The following commit(s) were added to refs/heads/master by this push:
     new 85b6b24  roles: boilerplate stuff
85b6b24 is described below

commit 85b6b247d28a4f46ba218e29b8e0ca698ddf04c7
Author: Rohit Yadav <[email protected]>
AuthorDate: Thu Nov 28 14:53:23 2019 +0530

    roles: boilerplate stuff
    
    Signed-off-by: Rohit Yadav <[email protected]>
---
 src/config/section/iam.js           |  7 +++++
 src/views/iam/RolePermissionTab.vue | 52 +++++++++++++++++++++++++++++++
 src/views/infra/InfraSummary.vue    | 62 ++++++++++++++++++++++++-------------
 3 files changed, 99 insertions(+), 22 deletions(-)

diff --git a/src/config/section/iam.js b/src/config/section/iam.js
index d910392..3f00ae7 100644
--- a/src/config/section/iam.js
+++ b/src/config/section/iam.js
@@ -220,6 +220,13 @@ export default {
       permission: ['listRoles'],
       columns: ['name', 'type', 'description'],
       details: ['name', 'id', 'type', 'description'],
+      tabs: [{
+        name: 'details',
+        component: () => import('@/components/view/DetailsTab.vue')
+      }, {
+        name: 'rules',
+        component: () => import('@/views/iam/RolePermissionTab.vue')
+      }],
       actions: [
         {
           api: 'createRole',
diff --git a/src/views/iam/RolePermissionTab.vue 
b/src/views/iam/RolePermissionTab.vue
new file mode 100644
index 0000000..762c669
--- /dev/null
+++ b/src/views/iam/RolePermissionTab.vue
@@ -0,0 +1,52 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+<template>
+  <div>
+    Boilerplate for implementation
+    {{ loading }}
+    {{ resource }}
+  </div>
+</template>
+
+<script>
+
+export default {
+  name: 'RolePermissionTab',
+  components: {
+  },
+  props: {
+    resource: {
+      type: Object,
+      required: true
+    },
+    loading: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+    }
+  },
+  computed: {
+  }
+}
+</script>
+
+<style lang="less" scoped>
+</style>
diff --git a/src/views/infra/InfraSummary.vue b/src/views/infra/InfraSummary.vue
index d918b2a..462678f 100644
--- a/src/views/infra/InfraSummary.vue
+++ b/src/views/infra/InfraSummary.vue
@@ -16,42 +16,54 @@
 // under the License.
 
 <template>
-  <a-row :gutter="24" style="margin: 6px">
-    <a-col
-      :md="6"
-      :style="{ marginBottom: '12px', marginTop: '12px' }"
-      v-for="(section, index) in sections"
-      v-if="routes[section]"
-      :key="index">
-      <chart-card :loading="loading">
-        <div class="chart-card-inner">
-          <router-link :to="{ name: section.substring(0, section.length - 1) 
}">
-            <h2>{{ $t(routes[section].title) }}</h2>
-            <h1><a-icon :type="routes[section].icon" /> {{ stats[section] 
}}</h1>
-          </router-link>
-        </div>
-      </chart-card>
+  <a-row :gutter="24">
+    <a-col :md="18">
+      <a-card>
+      <breadcrumb />
+      </a-card>
     </a-col>
-    <!-- move refresh and ssl cert setup somewhere more friendly -->
     <a-col
-      :md="6"
-      :style="{ marginBottom: '12px', marginTop: '12px' }">
+      :md="6" >
       <a-card>
         <a-button
-          style="width: 100%"
-          icon="reload"
+          style="margin-left: 10px; float: right"
           @click="fetchData()"
+          icon="reload"
           :loading="loading"
           type="primary">
           {{ $t('Refresh') }}
         </a-button>
         <a-button
-          style="width: 100%"
+          style="margin-left: 10px; float: right"
+          @click="sslFormVisible = true"
           icon="safety-certificate">
           {{ $t('SSL Certificate') }}
         </a-button>
+        <a-modal
+          :title="$t('SSL Certificate')"
+          v-model="sslFormVisible"
+          @ok="handle">
+          <p>Some contents...</p>
+          <p>Some contents...</p>
+          <p>Some contents...</p>
+        </a-modal>
       </a-card>
     </a-col>
+    <a-col
+      :md="6"
+      :style="{ marginBottom: '12px', marginTop: '12px' }"
+      v-for="(section, index) in sections"
+      v-if="routes[section]"
+      :key="index">
+      <chart-card :loading="loading">
+        <div class="chart-card-inner">
+          <router-link :to="{ name: section.substring(0, section.length - 1) 
}">
+            <h2>{{ $t(routes[section].title) }}</h2>
+            <h1><a-icon :type="routes[section].icon" /> {{ stats[section] 
}}</h1>
+          </router-link>
+        </div>
+      </chart-card>
+    </a-col>
   </a-row>
 </template>
 
@@ -59,18 +71,21 @@
 import { api } from '@/api'
 import router from '@/router'
 
+import Breadcrumb from '@/components/widgets/Breadcrumb'
 import ChartCard from '@/components/widgets/ChartCard'
 
 export default {
   name: 'InfraSummary',
   components: {
+    Breadcrumb,
     ChartCard
   },
   data () {
     return {
       loading: true,
-      sections: ['zones', 'pods', 'clusters', 'hosts', 'storagepools', 
'imagestores', 'systemvms', 'routers', 'cpusockets', 'managementservers', 
'alerts'],
       routes: {},
+      sections: ['zones', 'pods', 'clusters', 'hosts', 'storagepools', 
'imagestores', 'systemvms', 'routers', 'cpusockets', 'managementservers', 
'alerts'],
+      sslFormVisible: false,
       stats: {}
     }
   },
@@ -99,6 +114,9 @@ export default {
       }).finally(f => {
         this.loading = false
       })
+    },
+    handleSslForm (e) {
+      console.log(e)
     }
   }
 }

Reply via email to