@@ -289,9 +289,12 @@ export default {
289289 if (item === ' groupid' && ! (' listInstanceGroups' in this .$store .getters .apis )) {
290290 return true
291291 }
292+ if (item === ' displaynetwork' && this .$store .getters .userInfo .roletype !== ' Admin' ) {
293+ return true
294+ }
292295 if ([' zoneid' , ' domainid' , ' imagestoreid' , ' storageid' , ' state' , ' account' , ' hypervisor' , ' level' ,
293296 ' clusterid' , ' podid' , ' groupid' , ' entitytype' , ' accounttype' , ' systemvmtype' , ' scope' , ' provider' ,
294- ' type' , ' serviceofferingid' , ' diskofferingid' ].includes (item)
297+ ' type' , ' serviceofferingid' , ' diskofferingid' , ' displaynetwork ' ].includes (item)
295298 ) {
296299 type = ' list'
297300 } else if (item === ' tags' ) {
@@ -311,6 +314,12 @@ export default {
311314 return arrayField
312315 },
313316 fetchStaticFieldData (arrayField ) {
317+ if (arrayField .includes (' displaynetwork' )) {
318+ const typeIndex = this .fields .findIndex (item => item .name === ' displaynetwork' )
319+ this .fields [typeIndex].loading = true
320+ this .fields [typeIndex].opts = this .fetchBoolean ()
321+ this .fields [typeIndex].loading = false
322+ }
314323 if (arrayField .includes (' type' )) {
315324 if (this .$route .path === ' /guestnetwork' || this .$route .path .includes (' /guestnetwork/' )) {
316325 const typeIndex = this .fields .findIndex (item => item .name === ' type' )
@@ -856,6 +865,18 @@ export default {
856865 }
857866 return types
858867 },
868+ fetchBoolean () {
869+ const types = []
870+ types .push ({
871+ id: ' true' ,
872+ name: ' label.true'
873+ })
874+ types .push ({
875+ id: ' false' ,
876+ name: ' label.false'
877+ })
878+ return types
879+ },
859880 fetchAccountTypes () {
860881 const types = []
861882 if (this .apiName .indexOf (' listAccounts' ) > - 1 ) {
0 commit comments