Quellcode durchsuchen

Merge branch 'master' into form-cluster-integration

jusrhee vor 5 Jahren
Ursprung
Commit
4a0517e8c9

+ 1 - 1
README.md

@@ -1,5 +1,5 @@
 # Porter
-Porter is a **dashboard for Helm** with support for the following features:
+Porter is a **Kubernetes powered PaaS** with support for the following features:
 - User-generated [form overlays](https://docs.getporter.dev/docs/porter-templates) for managing `values.yaml`
 - Visualization of all Helm releases with filtering by namespace
 - In-depth view of releases, including revision histories and component graphs

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

@@ -173,7 +173,7 @@ export default class ExpandedChart extends Component<PropsType, StateType> {
     } = this.state;
     let { currentChart, setSidebar, setCurrentView } = this.props;
     let chart = currentChart;
-
+    
     switch (currentTab) {
       case 'status': 
         return (
@@ -251,7 +251,7 @@ export default class ExpandedChart extends Component<PropsType, StateType> {
         tabOptions.push({ value: '@' + tab.name, label: tab.label, sections: tab.sections });
       });
     }
-
+    console.log('1', tabOptions)
     // Append universal tabs
     tabOptions.push(
       { label: 'Status', value: 'status' },
@@ -259,6 +259,7 @@ export default class ExpandedChart extends Component<PropsType, StateType> {
       { label: 'Chart Overview', value: 'graph' },
       { label: 'Settings', value: 'settings' },
     );
+    console.log('2', tabOptions)
 
     if (this.state.devOpsMode) {
       tabOptions.push(
@@ -267,12 +268,15 @@ export default class ExpandedChart extends Component<PropsType, StateType> {
       );
     }
 
+    console.log('3', tabOptions)
+
     // Filter tabs if previewing an old revision
     if (this.state.isPreview) {
       let liveTabs = ['status', 'settings', 'deploy'];
       tabOptions = tabOptions.filter((tab: any) => !liveTabs.includes(tab.value));
     }
-    
+    console.log('4', tabOptions)
+
     this.setState({ tabOptions });
   }
 

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

@@ -32,7 +32,7 @@ export default class SettingsSection extends Component<PropsType, StateType> {
 
   componentDidMount() {
     let image = this.props.currentChart.config.image;
-    if (image.repository) {
+    if (image?.repository) {
       this.setState({ selectedImageUrl: image.repository });
     }
   }

+ 4 - 4
dashboard/src/main/home/templates/expanded-template/LaunchTemplate.tsx

@@ -61,7 +61,7 @@ export default class LaunchTemplate extends Component<PropsType, StateType> {
 
     api.deployTemplate('<token>', {
       templateName: this.props.currentTemplate.name,
-      imageURL: "",
+      imageURL: this.state.selectedImageUrl,
       storage: StorageType.Secret,
       formValues: values,
       namespace: this.state.selectedNamespace,
@@ -91,8 +91,8 @@ export default class LaunchTemplate extends Component<PropsType, StateType> {
               key={tab.name}
               sections={tab.sections} 
               onSubmit={this.onSubmit}
-              // disabled={!this.state.selectedImageUrl || this.state.selectedImageUrl === ''}
               disabled={false}
+              // disabled={!this.state.selectedImageUrl || this.state.selectedImageUrl === ''}
               saveValuesStatus={this.state.saveValuesStatus}
             />
           </ValuesFormWrapper>
@@ -195,7 +195,7 @@ export default class LaunchTemplate extends Component<PropsType, StateType> {
           />
         </ClusterSection>
 
-        {/* <Subtitle>Select the container image you would like to connect to this template (optional).</Subtitle>
+        <Subtitle>Select the container image you would like to connect to this template (optional).</Subtitle>
         <Br />
         <ImageSelector
           selectedTag={this.state.selectedTag}
@@ -206,7 +206,7 @@ export default class LaunchTemplate extends Component<PropsType, StateType> {
           setCurrentView={this.props.setCurrentView}
         />
 
-        <br /> */}
+        <br />
         <Subtitle>Configure additional settings for this template (optional).</Subtitle>
         <TabRegion
           options={this.state.tabOptions}

+ 1 - 0
server/api/release_handler.go

@@ -300,6 +300,7 @@ func (app *App) HandleGetReleaseControllers(w http.ResponseWriter, r *http.Reque
 	// get current status of each controller
 	// TODO: refactor with type assertion
 	for _, c := range controllers {
+		c.Namespace = form.ReleaseForm.Form.Namespace
 		switch c.Kind {
 		case "Deployment":
 			rc, err := k8sAgent.GetDeployment(c)