Ivan Galakhov 4 лет назад
Родитель
Сommit
1ec49fb60a

+ 12 - 7
dashboard/src/components/values-form/FormWrapper.tsx

@@ -203,13 +203,15 @@ export default class FormWrapper extends Component<PropsType, StateType> {
       if (this.props.tabOptions?.length > 0) {
         let prependTabs = [] as { value: string; label: string }[];
         let appendTabs = [] as { value: string; label: string }[];
-        this.props.tabOptions.forEach((tab: { value: string; label: string }) => {
-          if (tab.value === "status" || tab.value === "metrics") {
-            prependTabs.push(tab);
-          } else {
-            appendTabs.push(tab);
+        this.props.tabOptions.forEach(
+          (tab: { value: string; label: string }) => {
+            if (tab.value === "status" || tab.value === "metrics") {
+              prependTabs.push(tab);
+            } else {
+              appendTabs.push(tab);
+            }
           }
-        });
+        );
         tabOptions = prependTabs.concat(tabOptions.concat(appendTabs));
       }
       this.setState({ tabOptions }, callback);
@@ -267,7 +269,10 @@ export default class FormWrapper extends Component<PropsType, StateType> {
       !_.isEqual(prevProps.tabOptions, this.props.tabOptions) ||
       !_.isEqual(prevProps.formData, this.props.formData)
     ) {
-      if (prevProps.tabOptions?.length === 0 && !_.isEqual(prevProps.tabOptions, this.props.tabOptions)) {
+      if (
+        prevProps.tabOptions?.length === 0 &&
+        !_.isEqual(prevProps.tabOptions, this.props.tabOptions)
+      ) {
         this.setState({ currentTab: "status" });
       }
       let formHasChanged = !_.isEqual(prevProps.formData, this.props.formData);

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

@@ -37,7 +37,7 @@ type StateType = {
   imageTag: string;
 
   actionConfig: ActionConfigType;
-  procfileProcess: string;
+  procfileProcess?: string;
   branch: string;
   repoType: string;
   dockerfilePath: string | null;
@@ -69,7 +69,7 @@ class LaunchFlow extends Component<PropsType, StateType> {
     imageTag: "",
 
     actionConfig: { ...defaultActionConfig },
-    procfileProcess: "",
+    procfileProcess: null as string | null,
     branch: "",
     repoType: "",
     dockerfilePath: null as string | null,

+ 1 - 1
server/api/git_repo_handler.go

@@ -354,7 +354,7 @@ func (app *App) HandleGetProcfileContents(w http.ResponseWriter, r *http.Request
 	)
 
 	if err != nil {
-		app.handleErrorInternal(err, w)
+		http.NotFound(w, r)
 		return
 	}