Skip to content

Commit e90e436

Browse files
UI: Enable listall (for Affinity Groups, SSH Keypairs, User Data) in deploy instance wizard for admin, and lists SSH Keypairs, User Data by domain/account (#11906)
1 parent 255c461 commit e90e436

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

ui/src/views/compute/DeployVM.vue

Lines changed: 11 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,25 +1219,31 @@ 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: {
12241226
list: 'listSSHKeyPairs',
12251227
options: {
12261228
page: 1,
12271229
pageSize: 10,
1230+
account: this.owner.account,
1231+
domainid: this.owner.domainid,
1232+
projectid: this.owner.projectid,
12281233
keyword: undefined,
1229-
listall: false
1234+
listall: listAll
12301235
}
12311236
},
12321237
userDatas: {
12331238
list: 'listUserData',
12341239
options: {
12351240
page: 1,
12361241
pageSize: 10,
1242+
account: this.owner.account,
1243+
domainid: this.owner.domainid,
1244+
projectid: this.owner.projectid,
12371245
keyword: undefined,
1238-
listall: false
1246+
listall: listAll
12391247
}
12401248
},
12411249
networks: {

0 commit comments

Comments
 (0)