diff --git a/components/form/Command.vue b/components/form/Command.vue
index d91cafd4a2..182b3f2f08 100644
--- a/components/form/Command.vue
+++ b/components/form/Command.vue
@@ -96,17 +96,16 @@ export default {
update() {
const out = {
...this.value,
- ...cleanUp({
- stdin: this.stdin,
- stdinOnce: this.stdinOnce,
- command: this.command,
- args: this.args,
- workingDir: this.workingDir,
- tty: this.tty,
- }),
+ stdin: this.stdin,
+ stdinOnce: this.stdinOnce,
+ command: this.command,
+ args: this.args,
+ workingDir: this.workingDir,
+ tty: this.tty,
+
};
- this.$emit('input', out);
+ this.$emit('input', cleanUp(out) );
},
},
};
diff --git a/components/form/ShellInput.vue b/components/form/ShellInput.vue
index e59224f5f6..169d07ba2e 100644
--- a/components/form/ShellInput.vue
+++ b/components/form/ShellInput.vue
@@ -26,7 +26,7 @@ export default {
let out = null;
if ( userValue ) {
- out = userValue.split(/ /);
+ out = userValue.match(/(\"[^\"]+\")|\S+/g).map(string => string.replace(/^"|"$/g, ''));
}
this.$emit('input', out);
diff --git a/edit/workload/Job.vue b/edit/workload/Job.vue
index b9cbdfb6ee..de5d36423b 100644
--- a/edit/workload/Job.vue
+++ b/edit/workload/Job.vue
@@ -29,7 +29,7 @@ export default {
},
data() {
const {
- failedJobsHistoryLimit, successfulJobsHistoryLimit, suspend = false, schedule
+ failedJobsHistoryLimit, successfulJobsHistoryLimit, suspend = false, schedule,
} = this.value;
if (this.type === WORKLOAD_TYPES.CRON_JOB) {
@@ -38,19 +38,22 @@ export default {
}
const { concurrencyPolicy = 'Allow', startingDeadlineSeconds } = this.value;
const {
- completions, parallelism, backoffLimit, activeDeadlineSeconds
+ completions, parallelism, backoffLimit, activeDeadlineSeconds,
+ template:{ spec: { terminationGracePeriodSeconds } }
+
} = this.value.jobTemplate.spec;
return {
- completions, parallelism, backoffLimit, activeDeadlineSeconds, failedJobsHistoryLimit, successfulJobsHistoryLimit, suspend, schedule, concurrencyPolicy, startingDeadlineSeconds
+ completions, parallelism, backoffLimit, activeDeadlineSeconds, failedJobsHistoryLimit, successfulJobsHistoryLimit, suspend, schedule, concurrencyPolicy, startingDeadlineSeconds, terminationGracePeriodSeconds
};
} else {
const {
- completions, parallelism, backoffLimit, activeDeadlineSeconds
+ completions, parallelism, backoffLimit, activeDeadlineSeconds,
+ template:{ spec: { terminationGracePeriodSeconds } }
} = this.value;
return {
- completions, parallelism, backoffLimit, activeDeadlineSeconds, failedJobsHistoryLimit, successfulJobsHistoryLimit, suspend, schedule
+ completions, parallelism, backoffLimit, activeDeadlineSeconds, failedJobsHistoryLimit, successfulJobsHistoryLimit, suspend, schedule, terminationGracePeriodSeconds
};
}
},
@@ -73,6 +76,8 @@ export default {
activeDeadlineSeconds: this.activeDeadlineSeconds,
};
+ spec.template.spec.terminationGracePeriodSeconds = this.terminationGracePeriodSeconds;
+
this.$emit('input', spec);
} else {
const spec = {
@@ -87,10 +92,13 @@ export default {
completions: this.completions,
parallelism: this.parallelism,
backoffLimit: this.backoffLimit,
- activeDeadlineSeconds: this.activeDeadlineSeconds
+ activeDeadlineSeconds: this.activeDeadlineSeconds,
+
}
};
+ spec.jobTemplate.spec.template.spec.terminationGracePeriodSeconds = this.terminationGracePeriodSeconds;
+
this.$emit('input', spec);
}
}
@@ -144,8 +152,9 @@ export default {
+
-