Parcourir la source

Removed last chart version from query params

jnfrati il y a 4 ans
Parent
commit
715defac92

+ 1 - 3
dashboard/src/main/home/cluster-dashboard/chart/Chart.tsx

@@ -97,9 +97,7 @@ const Chart: React.FunctionComponent<Props> = ({
         let urlParams = new URLSearchParams(location.search);
         let cluster = urlParams.get("cluster");
         let route = `${match.url}/${cluster}/${chart.namespace}/${chart.name}`;
-        pushFiltered({ location, history }, route, ["project_id"], {
-          chart_revision: chart.version,
-        });
+        pushFiltered({ location, history }, route, ["project_id"]);
       }}
     >
       <Title>

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

@@ -33,15 +33,17 @@ class ExpandedChartWrapper extends Component<PropsType, StateType> {
     let { namespace, chartName } = match.params as any;
     let { currentProject, currentCluster } = this.context;
     if (currentProject && currentCluster) {
-      // TODO: add query for retrieving max revision #
-      const lastCheckedRevision = getQueryParam(this.props, "chart_revision");
-
       api
         .getChart(
           "<token>",
+          {},
           {
-          },
-          { id: currentProject.id, namespace: namespace, cluster_id: currentCluster.id ,name: chartName, revision: Number(lastCheckedRevision), }
+            id: currentProject.id,
+            namespace: namespace,
+            cluster_id: currentCluster.id,
+            name: chartName,
+            revision: 0,
+          }
         )
         .then((res) => {
           this.setState({ currentChart: res.data, loading: false });