소스 검색

preopulate image

jusrhee 5 년 전
부모
커밋
5b3a65e2e3
2개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 7 0
      dashboard/src/main/home/cluster-dashboard/expanded-chart/SettingsSection.tsx
  2. 1 1
      dashboard/src/shared/types.tsx

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

@@ -30,6 +30,13 @@ export default class SettingsSection extends Component<PropsType, StateType> {
     saveValuesStatus: null as (string | null),
     saveValuesStatus: null as (string | null),
   }
   }
 
 
+  componentDidMount() {
+    let image = this.props.currentChart.config.image;
+    if (image.repository) {
+      this.setState({ selectedImageUrl: image.repository });
+    }
+  }
+
   redeployWithNewImage = (img: string, tag: string) => {
   redeployWithNewImage = (img: string, tag: string) => {
     this.setState({saveValuesStatus: 'loading'})
     this.setState({saveValuesStatus: 'loading'})
     let { currentCluster, currentProject } = this.context;
     let { currentCluster, currentProject } = this.context;

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

@@ -28,7 +28,7 @@ export interface ChartType {
       name: string,
       name: string,
     }[],
     }[],
   },
   },
-  config: string,
+  config: any,
   version: number,
   version: number,
   namespace: string
   namespace: string
 }
 }