Răsfoiți Sursa

Remove `execute_now` options from destination options

Daniel Vincze 1 an în urmă
părinte
comite
9c36ad850c

+ 1 - 2
src/components/modules/TransferModule/TransferItemModal/TransferItemModal.tsx

@@ -872,8 +872,7 @@ class TransferItemModal extends React.Component<Props, State> {
         optionsLoading={optionsLoading}
         optionsLoadingSkipFields={[
           ...optionsLoadingSkipFields,
-          "description",
-          "execute_now"
+          "description"
         ]}
         dictionaryKey={dictionaryKey}
         executeNowOptionsDisabled={

+ 0 - 12
src/components/modules/WizardModule/WizardOptions/WizardOptions.tsx

@@ -328,18 +328,6 @@ class WizardOptions extends React.Component<Props> {
       fieldsSchema.push(titleFieldSchema);
     }
 
-    if (
-      this.props.wizardType === "replica" ||
-      this.props.wizardType === "migration"
-    ) {
-      fieldsSchema.push({
-        name: "execute_now",
-        type: "boolean",
-        default: true,
-        nullableBoolean: false,
-      });
-    }
-
     return fieldsSchema;
   }
 

+ 1 - 2
src/components/modules/WizardModule/WizardPageContent/WizardPageContent.tsx

@@ -175,7 +175,7 @@ type Props = {
     instanceName: string | null
   ) => void;
   onTransferExecuteOptionsChange: (
-    field: Field, 
+    field: Field,
     value: any,
   ) => void;
 };
@@ -539,7 +539,6 @@ class WizardPageContent extends React.Component<Props, State> {
             optionsLoadingSkipFields={[
               ...getOptionsLoadingSkipFields("destination"),
               "title",
-              "execute_now"
             ]}
             selectedInstances={this.props.wizardData.selectedInstances}
             showSeparatePerVm={Boolean(

+ 3 - 4
src/components/modules/WizardModule/WizardSummary/WizardSummary.tsx

@@ -180,12 +180,12 @@ type Props = {
 @observer
 class WizardSummary extends React.Component<Props> {
   getDefaultBooleanOption(fieldName: string, defaultValue: boolean): boolean {
-    if (!this.props.data.destOptions) {
+    if (!this.props.data.executeOptions) {
       return defaultValue;
     }
 
-    if (this.props.data.destOptions[fieldName] != null) {
-      return this.props.data.destOptions[fieldName];
+    if (this.props.data.executeOptions[fieldName] != null) {
+      return this.props.data.executeOptions[fieldName];
     }
 
     return defaultValue;
@@ -518,7 +518,6 @@ class WizardSummary extends React.Component<Props> {
           {data.destOptions
             ? Object.keys(data.destOptions).map(optionName => {
                 if (
-                  optionName === "execute_now" ||
                   optionName === "separate_vm" ||
                   !data.destOptions ||
                   data.destOptions[optionName] == null ||

+ 0 - 2
src/plugins/default/OptionsSchemaPlugin.ts

@@ -128,9 +128,7 @@ export const defaultGetDestinationEnv = (
 ): any => {
   const env: any = {};
   const specialOptions = [
-    "execute_now",
     "separate_vm",
-    "skip_os_morphing",
     "title",
     "minion_pool_id",
   ]