فهرست منبع

updatetabs on expanded chart mount

jusrhee 5 سال پیش
والد
کامیت
62cb8eef2b

+ 1 - 0
dashboard/src/components/TabRegion.tsx

@@ -25,6 +25,7 @@ export default class TabRegion extends Component<PropsType, StateType> {
   }
 
   componentDidMount() {
+    console.log(this.props.options)
     this.setDefaultTab();
   }
 

+ 1 - 1
dashboard/src/components/values-form/ValuesWrapper.tsx

@@ -96,7 +96,7 @@ export default class ValuesWrapper extends Component<PropsType, StateType> {
         <SaveButton
           disabled={this.isDisabled() || this.props.disabled}
           text='Deploy'
-          onClick={() => {console.log(this.state); this.props.onSubmit(this.state)}}
+          onClick={() => this.props.onSubmit(this.state)}
           status={this.isDisabled() ? 'Missing required fields' : this.props.saveValuesStatus}
           makeFlush={true}
         />

+ 9 - 3
dashboard/src/main/home/cluster-dashboard/chart/ChartList.tsx

@@ -234,16 +234,22 @@ export default class ChartList extends Component<PropsType, StateType> {
 ChartList.contextType = Context;
 
 const Placeholder = styled.div`
-  padding-top: 100px;
   width: 100%;
   display: flex;
   justify-content: center;
   align-items: center;
   color: #ffffff44;
-  font-size: 14px;
+  background: #26282f;
+  border-radius: 5px;
+  height: 320px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  color: #ffffff44;
+  font-size: 13px;
 
   > i {
-    font-size: 18px;
+    font-size: 16px;
     margin-right: 12px;
   }
 `;

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

@@ -460,7 +460,6 @@ export default class ExpandedChart extends Component<PropsType, StateType> {
         console.log(err)
       } else {
         this.setState({ components: res.data.Objects });
-        console.log(res.data.Objects)
       }
     });
 
@@ -475,12 +474,13 @@ export default class ExpandedChart extends Component<PropsType, StateType> {
         console.log(err);
         return
       }
-      console.log(res.data)
       
       if (res.data?.status?.loadBalancer?.ingress) {
         this.setState({url: `http://${res.data?.status?.loadBalancer?.ingress[0]?.hostname}` })
       }
-    })
+    });
+
+    this.updateTabs();
   }
 
   componentDidUpdate(prevProps: PropsType) {
@@ -493,8 +493,8 @@ export default class ExpandedChart extends Component<PropsType, StateType> {
   componentWillUnmount() {
     if (this.state.websockets) {
       this.state.websockets.forEach((ws: WebSocket) => {
-        ws.close()
-      })
+        ws.close();
+      });
     }
   }
 

+ 1 - 2
server/api/deploy_handler.go

@@ -132,8 +132,7 @@ func (app *App) HandleUninstallTemplate(w http.ResponseWriter, r *http.Request)
 				Repo: app.Repo,
 			},
 		},
-		Name:     name,
-		Revision: 0,
+		Name: name,
 	}
 
 	agent, err := app.getAgentFromQueryParams(