Просмотр исходного кода

support manual jobs run from cron job for job v0.6.0

Alexander Belanger 4 лет назад
Родитель
Сommit
d3bae79cc6

+ 1 - 5
dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedJobChart.tsx

@@ -420,16 +420,12 @@ export default class ExpandedJobChart extends Component<PropsType, StateType> {
   };
 
   renderTabContents = (currentTab: string, submitValues?: any) => {
-    let saveButton = null
-
-    if (!this.props.currentChart.config?.schedule?.enabled) {
-      saveButton = <SaveButton
+    let saveButton = <SaveButton
         text="Rerun Job"
         onClick={() => this.handleSaveValues(submitValues, true)}
         status={this.state.saveValuesStatus}
         makeFlush={true}
       />
-    }
 
     switch (currentTab) {
       case "jobs":

+ 6 - 0
dashboard/src/main/home/launch/launch-flow/LaunchFlow.tsx

@@ -257,6 +257,12 @@ class LaunchFlow extends Component<PropsType, StateType> {
     }
 
     _.set(values, "ingress.provider", provider);
+
+    // pause jobs automatically
+    if (this.props.currentTemplate?.name == "job") {
+      _.set(values, "paused", true)
+    }
+
     var url: string;
     // check if template is docker and create external domain if necessary
     if (this.props.currentTemplate.name == "web") {