jusrhee %!s(int64=5) %!d(string=hai) anos
pai
achega
d1c71407f6

+ 1 - 3
dashboard/src/components/PageNotFound.tsx

@@ -51,9 +51,7 @@ class PageNotFound extends Component<PropsType, StateType> {
           <Flex>
             <BackButton
               width="90px"
-              onClick={() =>
-                pushFiltered(this.props, "/jobs", ["project_id"])
-              }
+              onClick={() => pushFiltered(this.props, "/jobs", ["project_id"])}
             >
               <i className="material-icons">arrow_back</i>
               Jobs

+ 6 - 6
dashboard/src/main/home/cluster-dashboard/ClusterDashboard.tsx

@@ -89,9 +89,10 @@ class ClusterDashboard extends Component<PropsType, StateType> {
           sortType: "Newest",
           currentChart: null,
         },
-        () => 
+        () =>
           pushQueryParams(this.props, {
-            namespace: this.state.namespace === null ? "default" : this.state.namespace,
+            namespace:
+              this.state.namespace === null ? "default" : this.state.namespace,
           })
       );
     }
@@ -133,9 +134,8 @@ class ClusterDashboard extends Component<PropsType, StateType> {
                 this.setState({ namespace }, () => {
                   pushQueryParams(this.props, {
                     namespace: this.state.namespace || "ALL",
-                  })
-                }
-                )
+                  });
+                })
               }
               namespace={this.state.namespace}
             />
@@ -186,7 +186,7 @@ class ClusterDashboard extends Component<PropsType, StateType> {
     return (
       <Switch>
         <Route path="/:baseRoute/:clusterName+/:namespace/:chartName">
-          <ExpandedChartWrapper 
+          <ExpandedChartWrapper
             setSidebar={setSidebar}
             isMetricsInstalled={this.state.isMetricsInstalled}
           />

+ 4 - 1
dashboard/src/main/home/cluster-dashboard/env-groups/EnvGroupDashboard.tsx

@@ -78,7 +78,10 @@ class EnvGroupDashboard extends Component<PropsType, StateType> {
                 setNamespace={(namespace) =>
                   this.setState({ namespace }, () =>
                     pushQueryParams(this.props, {
-                      namespace: this.state.namespace === null ? "default" : this.state.namespace,
+                      namespace:
+                        this.state.namespace === null
+                          ? "default"
+                          : this.state.namespace,
                     })
                   )
                 }

+ 9 - 11
dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedChartWrapper.tsx

@@ -76,10 +76,10 @@ class ExpandedChartWrapper extends Component<PropsType, StateType> {
               this.setState({ loading: false });
             });
         })
-      .catch((err) => {
-        console.log("err", err.response.data);
-        this.setState({ loading: false });
-      });
+        .catch((err) => {
+          console.log("err", err.response.data);
+          this.setState({ loading: false });
+        });
     }
   };
 
@@ -93,14 +93,14 @@ class ExpandedChartWrapper extends Component<PropsType, StateType> {
     let { baseRoute, namespace } = match.params as any;
     let { loading, currentChart } = this.state;
     if (loading) {
-      return <Loading />
+      return <Loading />;
     } else if (currentChart && baseRoute === "jobs") {
       return (
         <ExpandedJobChart
           namespace={namespace}
           currentChart={currentChart}
           currentCluster={this.context.currentCluster}
-          closeChart={() => 
+          closeChart={() =>
             pushFiltered(this.props, "/jobs", ["project_id"], {
               cluster: this.context.currentCluster.name,
               namespace: namespace,
@@ -116,7 +116,7 @@ class ExpandedChartWrapper extends Component<PropsType, StateType> {
           isMetricsInstalled={this.props.isMetricsInstalled}
           currentChart={currentChart}
           currentCluster={this.context.currentCluster}
-          closeChart={() => 
+          closeChart={() =>
             pushFiltered(this.props, "/jobs", ["project_id"], {
               cluster: this.context.currentCluster.name,
               namespace: namespace,
@@ -124,11 +124,9 @@ class ExpandedChartWrapper extends Component<PropsType, StateType> {
           }
           setSidebar={setSidebar}
         />
-      )
+      );
     }
-    return (
-      <PageNotFound />
-    )
+    return <PageNotFound />;
   }
 }
 

+ 51 - 21
dashboard/src/main/home/sidebar/Sidebar.tsx

@@ -112,14 +112,24 @@ class Sidebar extends Component<PropsType, StateType> {
 
               // If namespace is currently only in path (ex: ExpandedChart) set to param
               if (pathNamespace) {
-                pushFiltered(this.props, "/applications", ["project_id", "cluster", "namespace"], {
-                  cluster: currentCluster.name,
-                  namespace: pathNamespace,
-                })
+                pushFiltered(
+                  this.props,
+                  "/applications",
+                  ["project_id", "cluster", "namespace"],
+                  {
+                    cluster: currentCluster.name,
+                    namespace: pathNamespace,
+                  }
+                );
               } else {
-                pushFiltered(this.props, "/applications", ["project_id", "cluster", "namespace"], {
-                  cluster: currentCluster.name,
-                })
+                pushFiltered(
+                  this.props,
+                  "/applications",
+                  ["project_id", "cluster", "namespace"],
+                  {
+                    cluster: currentCluster.name,
+                  }
+                );
               }
             }}
           >
@@ -134,14 +144,24 @@ class Sidebar extends Component<PropsType, StateType> {
 
               // If namespace is currently only in path (ex: ExpandedChart) set to param
               if (pathNamespace) {
-                pushFiltered(this.props, "/jobs", ["project_id", "cluster", "namespace"], {
-                  cluster: currentCluster.name,
-                  namespace: pathNamespace,
-                })
+                pushFiltered(
+                  this.props,
+                  "/jobs",
+                  ["project_id", "cluster", "namespace"],
+                  {
+                    cluster: currentCluster.name,
+                    namespace: pathNamespace,
+                  }
+                );
               } else {
-                pushFiltered(this.props, "/jobs", ["project_id", "cluster", "namespace"], {
-                  cluster: currentCluster.name,
-                })
+                pushFiltered(
+                  this.props,
+                  "/jobs",
+                  ["project_id", "cluster", "namespace"],
+                  {
+                    cluster: currentCluster.name,
+                  }
+                );
               }
             }}
           >
@@ -156,14 +176,24 @@ class Sidebar extends Component<PropsType, StateType> {
 
               // If namespace is currently only in path (ex: ExpandedChart) set to param
               if (pathNamespace) {
-                pushFiltered(this.props, "/env-groups", ["project_id", "cluster", "namespace"], {
-                  cluster: currentCluster.name,
-                  namespace: pathNamespace,
-                })
+                pushFiltered(
+                  this.props,
+                  "/env-groups",
+                  ["project_id", "cluster", "namespace"],
+                  {
+                    cluster: currentCluster.name,
+                    namespace: pathNamespace,
+                  }
+                );
               } else {
-                pushFiltered(this.props, "/env-groups", ["project_id", "cluster", "namespace"], {
-                  cluster: currentCluster.name,
-                })
+                pushFiltered(
+                  this.props,
+                  "/env-groups",
+                  ["project_id", "cluster", "namespace"],
+                  {
+                    cluster: currentCluster.name,
+                  }
+                );
               }
             }}
           >