File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 135135 </span >
136136 <span v-else >{{ text }}</span >
137137 </span >
138- <template slot="state" slot-scope="text">
139- <status :text =" text ? text : ''" displayText />
138+ <template slot="state" slot-scope="text, record">
139+ <status v-if =" $route.path.startsWith('/host')" :text =" getHostState(record)" displayText />
140+ <status v-else :text =" text ? text : ''" displayText />
140141 </template >
141142 <template slot="allocationstate" slot-scope="text">
142143 <status :text =" text ? text : ''" displayText />
@@ -578,6 +579,12 @@ export default {
578579 }
579580
580581 return record .nic .filter (e => { return e .ip6address }).map (e => { return e .ip6address }).join (' , ' ) || text
582+ },
583+ getHostState (host ) {
584+ if (host && host .hypervisor === ' KVM' && host .state === ' Up' && host .details && host .details .secured !== ' true' ) {
585+ return ' Unsecure'
586+ }
587+ return host .state
581588 }
582589 }
583590}
Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ export default {
127127 case ' created' :
128128 case ' maintenance' :
129129 case ' pending' :
130+ case ' unsecure' :
130131 status = ' warning'
131132 break
132133 }
You can’t perform that action at this time.
0 commit comments