Browse Source

Merge pull request #1712 from porter-dev/nico/fix-expanded-job-chart-not-waiting-for-ws-connection

[FIX] Job list on expanded chart flashing information - websocket not waiting for http call
Nicolas Frati 4 years ago
parent
commit
a6bfc58d8b

+ 3 - 3
dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedJobChart.tsx

@@ -104,7 +104,7 @@ class ExpandedJobChart extends Component<PropsType, StateType> {
   };
 
   // Retrieve full chart data (includes form and values)
-  getChartData = async (chart: ChartType, revision: number) => {
+  getChartData = (chart: ChartType, revision: number) => {
     let { currentProject } = this.context;
     let { currentCluster, currentChart } = this.props;
 
@@ -507,10 +507,10 @@ class ExpandedJobChart extends Component<PropsType, StateType> {
     }));
   };
 
-  getJobs = async (chart: ChartType) => {
+  getJobs = (chart: ChartType) => {
     let { currentCluster, currentProject, setCurrentError } = this.context;
 
-    api
+    return api
       .getJobs(
         "<token>",
         {},