Skip to content

Commit fcbb703

Browse files
author
DK101010
committed
add checkbox to display all vm's in a account
1 parent faf27e2 commit fcbb703

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

ui/src/components/view/SearchView.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,11 @@
6060
:key="idx"
6161
:value="opt.id">{{ $t(opt.name) }}</a-select-option>
6262
</a-select>
63+
<a-checkbox
64+
v-if="field.type==='checkbox'"
65+
v-decorator="[field.name]" />
6366
<a-input
64-
v-else-if="field.type==='input'"
67+
v-if="field.type==='input'"
6568
v-decorator="[field.name]" />
6669
<div v-else-if="field.type==='tag'">
6770
<div>
@@ -200,6 +203,9 @@ export default {
200203
} else if (item === 'tags') {
201204
type = 'tag'
202205
}
206+
if (item === 'accountwide') {
207+
type = 'checkbox'
208+
}
203209
204210
this.fields.push({
205211
type: type,
@@ -419,7 +425,11 @@ export default {
419425
if (input === '' || input === null || input === undefined) {
420426
continue
421427
}
422-
this.paramsFilter[key] = input
428+
if (key === 'accountwide' && input) {
429+
this.paramsFilter.projectid = -1
430+
} else {
431+
this.paramsFilter[key] = input
432+
}
423433
}
424434
if (this.searchFilters.includes('tags')) {
425435
if (this.inputKey) {

ui/src/config/section/compute.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export default {
6767
}
6868
return fields
6969
},
70-
searchFilters: ['name', 'zoneid', 'domainid', 'account', 'tags'],
70+
searchFilters: ['name', 'zoneid', 'domainid', 'account', 'tags', 'accountwide'],
7171
details: ['displayname', 'name', 'id', 'state', 'ipaddress', 'templatename', 'ostypename', 'serviceofferingname', 'isdynamicallyscalable', 'haenable', 'hypervisor', 'boottype', 'bootmode', 'account', 'domain', 'zonename'],
7272
tabs: [{
7373
component: () => import('@/views/compute/InstanceTab.vue')

0 commit comments

Comments
 (0)