File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -568,9 +568,10 @@ export const imagesUtilPlugin = {
568568 install ( app ) {
569569 app . config . globalProperties . $fetchTemplateTypes = function ( hypervisor ) {
570570 const baseTypes = [ 'USER' ]
571- if ( hypervisor ! == 'External' ) {
572- baseTypes . push ( 'VNF' )
571+ if ( hypervisor = == 'External' ) {
572+ return baseTypes . map ( type => ( { id : type , name : type , description : type } ) )
573573 }
574+ baseTypes . push ( 'VNF' )
574575 const adminTypes = [ 'SYSTEM' , 'BUILTIN' , 'ROUTING' ]
575576 const types = [ ...baseTypes ]
576577 if ( store . getters . userInfo ?. roletype === 'Admin' ) {
Original file line number Diff line number Diff line change @@ -1061,6 +1061,9 @@ export default {
10611061 this .fetchNicAdapterTypes ()
10621062 this .fetchKeyboardType ()
10631063 this .templateTypes .opts = this .$fetchTemplateTypes (hyperVisor)
1064+ if (this .form .templatetype && ! this .templateTypes .opts .find (opt => opt .id === this .form .templatetype )) {
1065+ this .form .templatetype = undefined
1066+ }
10641067
10651068 this .form .rootDiskControllerType = this .rootDisk .opts .length > 0 ? ' osdefault' : ' '
10661069 },
You can’t perform that action at this time.
0 commit comments