Przeglądaj źródła

undo upgrade testing in api

sunguroku 5 lat temu
rodzic
commit
e2408cbd0c

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

@@ -391,8 +391,10 @@ export default class ExpandedChart extends Component<PropsType, StateType> {
   getChartStatus = (chartStatus: string) => {
     if (chartStatus === 'deployed') {
       for (var uid in this.state.controllers) {
+        console.log(this.state.controllers)
         let value = this.state.controllers[uid]
         let status = this.getAvailability(value.metadata.kind, value)
+        console.log(status)
         if (!status) {
           return 'loading'
         }
@@ -456,7 +458,7 @@ export default class ExpandedChart extends Component<PropsType, StateType> {
               <InfoWrapper>
                 <StatusIndicator 
                   controllers={this.state.controllers}
-                  status={chart.info.status}
+                  status={status}
                   margin_left={'0px'}
                 />
                 <LastDeployed>

+ 1 - 1
dashboard/src/shared/api.tsx

@@ -120,7 +120,7 @@ const upgradeChartValues = baseApi<{
   cluster_id: number,
 }>('POST', pathParams => {
   let { id, name, cluster_id } = pathParams;
-  return `/api/projects/${id}/releases/${name}/upgrade/hook?cluster_id=${cluster_id}&repository=fake&commit=hash`;
+  return `/api/projects/${id}/releases/${name}/upgrade?cluster_id=${cluster_id}`;
 });
 
 const getTemplates = baseApi('GET', '/api/templates');