Explorar o código

Merge pull request #707 from porter-dev/0.3.0-upgrade-error-notifs

add set current error to all calls in launch flow
abelanger5 %!s(int64=5) %!d(string=hai) anos
pai
achega
5a4c7fb412
Modificáronse 1 ficheiros con 7 adicións e 2 borrados
  1. 7 2
      dashboard/src/main/home/launch/launch-flow/LaunchFlow.tsx

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

@@ -78,7 +78,7 @@ class LaunchFlow extends Component<PropsType, StateType> {
   };
   };
 
 
   createGHAction = (chartName: string, chartNamespace: string, env?: any) => {
   createGHAction = (chartName: string, chartNamespace: string, env?: any) => {
-    let { currentProject, currentCluster } = this.context;
+    let { currentProject, currentCluster, setCurrentError } = this.context;
     let {
     let {
       actionConfig,
       actionConfig,
       branch,
       branch,
@@ -123,6 +123,8 @@ class LaunchFlow extends Component<PropsType, StateType> {
         this.setState({
         this.setState({
           saveValuesStatus: `Could not create GitHub Action: ${err}`,
           saveValuesStatus: `Could not create GitHub Action: ${err}`,
         });
         });
+
+        setCurrentError(err)
       });
       });
   };
   };
 
 
@@ -192,7 +194,7 @@ class LaunchFlow extends Component<PropsType, StateType> {
   };
   };
 
 
   onSubmit = async (rawValues: any) => {
   onSubmit = async (rawValues: any) => {
-    let { currentCluster, currentProject } = this.context;
+    let { currentCluster, currentProject, setCurrentError } = this.context;
     let {
     let {
       selectedNamespace,
       selectedNamespace,
       templateName,
       templateName,
@@ -278,6 +280,8 @@ class LaunchFlow extends Component<PropsType, StateType> {
               this.setState({
               this.setState({
                 saveValuesStatus: `Could not create subdomain: ${err}`,
                 saveValuesStatus: `Could not create subdomain: ${err}`,
               });
               });
+
+              setCurrentError(err)
             });
             });
         });
         });
 
 
@@ -332,6 +336,7 @@ class LaunchFlow extends Component<PropsType, StateType> {
         this.setState({
         this.setState({
           saveValuesStatus: `Could not deploy template: ${err}`,
           saveValuesStatus: `Could not deploy template: ${err}`,
         });
         });
+        setCurrentError(err)
       });
       });
   };
   };