Przeglądaj źródła

Merge pull request #752 from porter-dev/advanced-routing

Allow namespace to be set to all from env-groups and redirect to applications (not jobs) on application close
jusrhee 5 lat temu
rodzic
commit
9fd86aa8c7

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

@@ -76,14 +76,11 @@ class EnvGroupDashboard extends Component<PropsType, StateType> {
               />
               <NamespaceSelector
                 setNamespace={(namespace) =>
-                  this.setState({ namespace }, () =>
+                  this.setState({ namespace }, () => {
                     pushQueryParams(this.props, {
-                      namespace:
-                        this.state.namespace === null
-                          ? "default"
-                          : this.state.namespace,
-                    })
-                  )
+                      namespace: this.state.namespace || "ALL",
+                    });
+                  })
                 }
                 namespace={this.state.namespace}
               />

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

@@ -117,7 +117,7 @@ class ExpandedChartWrapper extends Component<PropsType, StateType> {
           currentChart={currentChart}
           currentCluster={this.context.currentCluster}
           closeChart={() =>
-            pushFiltered(this.props, "/jobs", ["project_id"], {
+            pushFiltered(this.props, "/applications", ["project_id"], {
               cluster: this.context.currentCluster.name,
               namespace: namespace,
             })