Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ui/public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -2143,6 +2143,8 @@
"label.traffictype": "Traffic type",
"label.transportzoneuuid": "Transport zone UUID",
"label.trigger.shutdown": "Trigger Safe Shutdown",
"label.true": "True",
"label.false": "False",
"label.try.again": "Try again",
"label.tuesday": "Tuesday",
"label.two.factor.authentication.secret.key": "Your Two factor authentication secret key",
Expand Down
3 changes: 3 additions & 0 deletions ui/src/components/view/ListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@
<router-link :to="{ path: $route.path + '/' + record.uuid, query: { zoneid: $route.query.zoneid } }" v-else-if="record.uuid && $route.query.zoneid">{{ $t(text.toLowerCase()) }}</router-link>
<router-link :to="{ path: $route.path }" v-else>{{ $t(text.toLowerCase()) }}</router-link>
</span>
<span v-else-if="$route.path.startsWith('/guestnetwork') && record.id && record.displaynetwork === false">
<router-link :to="{ path: $route.path + '/' + record.id, query: { displaynetwork: false } }" v-if="record.id">{{ $t(text.toLowerCase()) }}</router-link>
</span>
<span v-else>
<router-link :to="{ path: $route.path + '/' + record.id }" v-if="record.id">{{ text }}</router-link>
<router-link :to="{ path: $route.path + '/' + record.name }" v-else>{{ text }}</router-link>
Expand Down
23 changes: 22 additions & 1 deletion ui/src/components/view/SearchView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,12 @@ export default {
if (item === 'groupid' && !('listInstanceGroups' in this.$store.getters.apis)) {
return true
}
if (item === 'displaynetwork' && this.$store.getters.userInfo.roletype !== 'Admin') {
return true
}
if (['zoneid', 'domainid', 'imagestoreid', 'storageid', 'state', 'account', 'hypervisor', 'level',
'clusterid', 'podid', 'groupid', 'entitytype', 'accounttype', 'systemvmtype', 'scope', 'provider',
'type', 'serviceofferingid', 'diskofferingid'].includes(item)
'type', 'serviceofferingid', 'diskofferingid', 'displaynetwork'].includes(item)
) {
type = 'list'
} else if (item === 'tags') {
Expand All @@ -311,6 +314,12 @@ export default {
return arrayField
},
fetchStaticFieldData (arrayField) {
if (arrayField.includes('displaynetwork')) {
const typeIndex = this.fields.findIndex(item => item.name === 'displaynetwork')
this.fields[typeIndex].loading = true
this.fields[typeIndex].opts = this.fetchBoolean()
this.fields[typeIndex].loading = false
}
if (arrayField.includes('type')) {
if (this.$route.path === '/guestnetwork' || this.$route.path.includes('/guestnetwork/')) {
const typeIndex = this.fields.findIndex(item => item.name === 'type')
Expand Down Expand Up @@ -856,6 +865,18 @@ export default {
}
return types
},
fetchBoolean () {
const types = []
types.push({
id: 'true',
name: 'label.true'
})
types.push({
id: 'false',
name: 'label.false'
})
return types
},
fetchAccountTypes () {
const types = []
if (this.apiName.indexOf('listAccounts') > -1) {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/config/section/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default {
return fields
},
filters: ['all', 'account', 'domainpath', 'shared'],
searchFilters: ['keyword', 'zoneid', 'domainid', 'account', 'type', 'tags'],
searchFilters: ['keyword', 'zoneid', 'domainid', 'account', 'type', 'displaynetwork', 'tags'],
related: [{
name: 'vm',
title: 'label.instances',
Expand Down
3 changes: 3 additions & 0 deletions ui/src/views/AutogenView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,9 @@ export default {
this.loading = true
if (this.$route.params && this.$route.params.id) {
params.id = this.$route.params.id
if (['listNetworks'].includes(this.apiName) && 'displaynetwork' in this.$route.query) {
params.displaynetwork = this.$route.query.displaynetwork
}
if (['listSSHKeyPairs'].includes(this.apiName)) {
if (!this.$isValidUuid(params.id)) {
delete params.id
Expand Down
Loading