Skip to content

Commit cb8a23b

Browse files
committed
Add events tab to various resources
1 parent 3f04958 commit cb8a23b

6 files changed

Lines changed: 112 additions & 0 deletions

File tree

ui/src/config/section/compute.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,12 @@ export default {
483483
name: 'details',
484484
component: shallowRef(defineAsyncComponent(() => import('@/components/view/DetailsTab.vue')))
485485
},
486+
{
487+
name: 'events',
488+
resourceType: 'VmSnapshot',
489+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/EventsTab.vue'))),
490+
show: () => { return 'listEvents' in store.getters.apis }
491+
},
486492
{
487493
name: 'comments',
488494
component: shallowRef(defineAsyncComponent(() => import('@/components/view/AnnotationsTab.vue')))
@@ -985,6 +991,18 @@ export default {
985991
title: 'label.instances',
986992
param: 'affinitygroupid'
987993
}],
994+
tabs: [
995+
{
996+
name: 'details',
997+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/DetailsTab.vue')))
998+
},
999+
{
1000+
name: 'events',
1001+
resourceType: 'AffinityGroup',
1002+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/EventsTab.vue'))),
1003+
show: () => { return 'listEvents' in store.getters.apis }
1004+
}
1005+
],
9881006
actions: [
9891007
{
9901008
api: 'createAffinityGroup',

ui/src/config/section/infra/hosts.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ export default {
4444
tabs: [{
4545
name: 'details',
4646
component: shallowRef(defineAsyncComponent(() => import('@/components/view/DetailsTab.vue')))
47+
}, {
48+
name: 'events',
49+
resourceType: 'Host',
50+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/EventsTab.vue'))),
51+
show: () => { return 'listEvents' in store.getters.apis }
4752
}, {
4853
name: 'comments',
4954
component: shallowRef(defineAsyncComponent(() => import('@/components/view/AnnotationsTab.vue')))

ui/src/config/section/infra/ilbvms.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
// under the License.
1717

1818
import { shallowRef, defineAsyncComponent } from 'vue'
19+
import store from '@/store'
20+
1921
export default {
2022
name: 'ilbvm',
2123
title: 'label.internal.lb',
@@ -25,6 +27,15 @@ export default {
2527
params: { projectid: '-1' },
2628
columns: ['name', 'state', 'publicip', 'guestnetworkname', 'vpcname', 'version', 'softwareversion', 'hostname', 'account', 'zonename', 'requiresupgrade'],
2729
details: ['name', 'id', 'version', 'softwareversion', 'requiresupgrade', 'guestnetworkname', 'vpcname', 'publicip', 'guestipaddress', 'linklocalip', 'serviceofferingname', 'networkdomain', 'isredundantrouter', 'redundantstate', 'hostname', 'account', 'zonename', 'created', 'hostcontrolstate'],
30+
tabs: [{
31+
name: 'details',
32+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/DetailsTab.vue')))
33+
}, {
34+
name: 'events',
35+
resourceType: 'InternalLbVm',
36+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/EventsTab.vue'))),
37+
show: () => { return 'listEvents' in store.getters.apis }
38+
}],
2839
actions: [
2940
{
3041
api: 'startInternalLoadBalancerVM',

ui/src/config/section/network.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,6 +1046,11 @@ export default {
10461046
name: 'loadbalancerinstance',
10471047
component: shallowRef(defineAsyncComponent(() => import('@/views/network/InternalLBAssignedVmTab.vue'))),
10481048
show: () => true
1049+
}, {
1050+
name: 'events',
1051+
resourceType: 'LoadBalancerRule',
1052+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/EventsTab.vue'))),
1053+
show: () => { return 'listEvents' in store.getters.apis }
10491054
}],
10501055
actions: [
10511056
{
@@ -1162,6 +1167,12 @@ export default {
11621167
name: 'details',
11631168
component: shallowRef(defineAsyncComponent(() => import('@/components/view/DetailsTab.vue')))
11641169
},
1170+
{
1171+
name: 'events',
1172+
resourceType: 'VpnCustomerGateway',
1173+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/EventsTab.vue'))),
1174+
show: () => { return 'listEvents' in store.getters.apis }
1175+
},
11651176
{
11661177
name: 'comments',
11671178
component: shallowRef(defineAsyncComponent(() => import('@/components/view/AnnotationsTab.vue')))

ui/src/config/section/offering.js

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ export default {
5555
name: 'details',
5656
component: shallowRef(defineAsyncComponent(() => import('@/components/view/DetailsTab.vue')))
5757
},
58+
{
59+
name: 'events',
60+
resourceType: 'ServiceOffering',
61+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/EventsTab.vue'))),
62+
show: () => { return 'listEvents' in store.getters.apis }
63+
},
5864
{
5965
name: 'comments',
6066
component: shallowRef(defineAsyncComponent(() => import('@/components/view/AnnotationsTab.vue'))),
@@ -110,6 +116,24 @@ export default {
110116
params: { issystem: 'true', isrecursive: 'true' },
111117
columns: ['name', 'systemvmtype', 'cpunumber', 'cpuspeed', 'memory', 'storagetype', 'order'],
112118
details: ['name', 'id', 'displaytext', 'systemvmtype', 'provisioningtype', 'storagetype', 'iscustomized', 'limitcpuuse', 'cpunumber', 'cpuspeed', 'memory', 'storagetags', 'hosttags', 'tags', 'domain', 'zone', 'created', 'dynamicscalingenabled', 'diskofferingstrictness'],
119+
resourceType: 'ServiceOffering',
120+
tabs: [
121+
{
122+
name: 'details',
123+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/DetailsTab.vue')))
124+
},
125+
{
126+
name: 'events',
127+
resourceType: 'ServiceOffering',
128+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/EventsTab.vue'))),
129+
show: () => { return 'listEvents' in store.getters.apis }
130+
},
131+
{
132+
name: 'comments',
133+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/AnnotationsTab.vue'))),
134+
show: (record, route, user) => { return ['Admin', 'DomainAdmin'].includes(user.roletype) }
135+
}
136+
],
113137
actions: [{
114138
api: 'createServiceOffering',
115139
icon: 'plus-outlined',
@@ -168,6 +192,12 @@ export default {
168192
name: 'details',
169193
component: shallowRef(defineAsyncComponent(() => import('@/components/view/DetailsTab.vue')))
170194
},
195+
{
196+
name: 'events',
197+
resourceType: 'DiskOffering',
198+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/EventsTab.vue'))),
199+
show: () => { return 'listEvents' in store.getters.apis }
200+
},
171201
{
172202
name: 'comments',
173203
component: shallowRef(defineAsyncComponent(() => import('@/components/view/AnnotationsTab.vue'))),
@@ -227,6 +257,18 @@ export default {
227257
title: 'label.instances',
228258
param: 'backupofferingid'
229259
}],
260+
tabs: [
261+
{
262+
name: 'details',
263+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/DetailsTab.vue')))
264+
},
265+
{
266+
name: 'events',
267+
resourceType: 'BackupOffering',
268+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/EventsTab.vue'))),
269+
show: () => { return 'listEvents' in store.getters.apis }
270+
}
271+
],
230272
actions: [{
231273
api: 'importBackupOffering',
232274
icon: 'plus-outlined',
@@ -269,6 +311,12 @@ export default {
269311
name: 'details',
270312
component: shallowRef(defineAsyncComponent(() => import('@/components/view/DetailsTab.vue')))
271313
},
314+
{
315+
name: 'events',
316+
resourceType: 'NetworkOffering',
317+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/EventsTab.vue'))),
318+
show: () => { return 'listEvents' in store.getters.apis }
319+
},
272320
{
273321
name: 'comments',
274322
component: shallowRef(defineAsyncComponent(() => import('@/components/view/AnnotationsTab.vue'))),
@@ -361,6 +409,18 @@ export default {
361409
title: 'label.vpc',
362410
param: 'vpcofferingid'
363411
}],
412+
tabs: [
413+
{
414+
name: 'details',
415+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/DetailsTab.vue')))
416+
},
417+
{
418+
name: 'events',
419+
resourceType: 'VpcOffering',
420+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/EventsTab.vue'))),
421+
show: () => { return 'listEvents' in store.getters.apis }
422+
}
423+
],
364424
actions: [{
365425
api: 'createVPCOffering',
366426
icon: 'plus-outlined',

ui/src/config/section/role.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
// under the License.
1717

1818
import { shallowRef, defineAsyncComponent } from 'vue'
19+
import store from '@/store'
20+
1921
export default {
2022
name: 'role',
2123
title: 'label.roles',
@@ -30,6 +32,11 @@ export default {
3032
}, {
3133
name: 'rules',
3234
component: shallowRef(defineAsyncComponent(() => import('@/views/iam/RolePermissionTab.vue')))
35+
}, {
36+
name: 'events',
37+
resourceType: 'Role',
38+
component: shallowRef(defineAsyncComponent(() => import('@/components/view/EventsTab.vue'))),
39+
show: () => { return 'listEvents' in store.getters.apis }
3340
}],
3441
actions: [
3542
{

0 commit comments

Comments
 (0)