File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed
Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ import {
4040 dialogUtilPlugin ,
4141 cpuArchitectureUtilPlugin ,
4242 imagesUtilPlugin ,
43- extensionsUtilPlugin
43+ extensionsUtilPlugin ,
44+ backupUtilPlugin
4445} from './utils/plugins'
4546import { VueAxios } from './utils/request'
4647import directives from './utils/directives'
@@ -63,6 +64,7 @@ vueApp.use(dialogUtilPlugin)
6364vueApp . use ( cpuArchitectureUtilPlugin )
6465vueApp . use ( imagesUtilPlugin )
6566vueApp . use ( extensionsUtilPlugin )
67+ vueApp . use ( backupUtilPlugin )
6668vueApp . use ( extensions )
6769vueApp . use ( directives )
6870
Original file line number Diff line number Diff line change @@ -597,3 +597,14 @@ export const extensionsUtilPlugin = {
597597 }
598598 }
599599}
600+
601+ export const backupUtilPlugin = {
602+ install ( app ) {
603+ app . config . globalProperties . $isBackupProviderSupportsQuiesceVm = function ( provider ) {
604+ if ( ! provider && typeof provider !== 'string' ) {
605+ return false
606+ }
607+ return [ 'nas' ] . includes ( provider . toLowerCase ( ) )
608+ }
609+ }
610+ }
Original file line number Diff line number Diff line change 133133 </a-form-item >
134134 </a-col >
135135 <a-col :md =" 24" :lg =" 12" >
136- <a-form-item v-if =" backupProvider === 'nas' " name =" quiescevm" ref =" quiescevm" >
136+ <a-form-item v-if =" isQuiesceVmSupported " name =" quiescevm" ref =" quiescevm" >
137137 <a-switch v-model:checked =" form.quiescevm" />
138138 <template #label >
139139 <tooltip-label :title =" $t('label.quiescevm')" :tooltip =" apiParams.quiescevm.description" />
@@ -211,6 +211,11 @@ export default {
211211 this .fetchBackupOffering ()
212212 },
213213 inject: [' refreshSchedule' , ' closeSchedule' ],
214+ computed: {
215+ isQuiesceVmSupported () {
216+ return this .$isBackupProviderSupportsQuiesceVm (this .backupProvider )
217+ }
218+ },
214219 methods: {
215220 initForm () {
216221 this .formRef = ref ()
You can’t perform that action at this time.
0 commit comments