Skip to content

Commit db43982

Browse files
UI: Enable listall (for Affinity Groups, SSH Keypairs, User Data) in deploy instance wizard for admin
1 parent e333ce9 commit db43982

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

ui/src/views/compute/DeployVM.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,7 @@
879879
import { ref, reactive, toRaw, nextTick, h } from 'vue'
880880
import { Button } from 'ant-design-vue'
881881
import { api } from '@/api'
882+
import { isAdmin } from '@/role'
882883
import _ from 'lodash'
883884
import { mixin, mixinDevice } from '@/utils/mixin.js'
884885
import store from '@/store'
@@ -1170,6 +1171,7 @@ export default {
11701171
return _.map(this.affinityGroups, 'id')
11711172
},
11721173
params () {
1174+
const listAll = isAdmin()
11731175
return {
11741176
serviceOfferings: {
11751177
list: 'listServiceOfferings',
@@ -1217,7 +1219,7 @@ export default {
12171219
domainid: this.owner.domainid,
12181220
projectid: this.owner.projectid,
12191221
keyword: undefined,
1220-
listall: false
1222+
listall: listAll
12211223
}
12221224
},
12231225
sshKeyPairs: {
@@ -1226,7 +1228,7 @@ export default {
12261228
page: 1,
12271229
pageSize: 10,
12281230
keyword: undefined,
1229-
listall: false
1231+
listall: listAll
12301232
}
12311233
},
12321234
userDatas: {
@@ -1235,7 +1237,7 @@ export default {
12351237
page: 1,
12361238
pageSize: 10,
12371239
keyword: undefined,
1238-
listall: false
1240+
listall: listAll
12391241
}
12401242
},
12411243
networks: {

0 commit comments

Comments
 (0)