|
|
@@ -108,11 +108,15 @@ export default class ExpandedChart extends Component<PropsType, StateType> {
|
|
|
resolve(null);
|
|
|
} else {
|
|
|
let { form } = res.data;
|
|
|
+ console.log(form)
|
|
|
resolve(form);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+ // resolve with empty data if there is no form.yaml in the files
|
|
|
+ resolve(null)
|
|
|
});
|
|
|
}
|
|
|
|
|
|
@@ -163,7 +167,6 @@ export default class ExpandedChart extends Component<PropsType, StateType> {
|
|
|
} = this.state;
|
|
|
let { currentChart, refreshChart, setSidebar, setCurrentView } = this.props;
|
|
|
let chart = revisionPreview || currentChart;
|
|
|
-
|
|
|
switch (currentTab) {
|
|
|
case 'status':
|
|
|
return (
|
|
|
@@ -234,7 +237,6 @@ export default class ExpandedChart extends Component<PropsType, StateType> {
|
|
|
|
|
|
async updateTabs() {
|
|
|
let formData = await this.getFormData();
|
|
|
- console.log(formData);
|
|
|
let tabOptions = [] as any[];
|
|
|
|
|
|
// Generate form tabs if form.yaml exists
|
|
|
@@ -243,7 +245,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' },
|
|
|
@@ -251,6 +253,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(
|
|
|
@@ -259,12 +262,15 @@ export default class ExpandedChart extends Component<PropsType, StateType> {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ console.log('3', tabOptions)
|
|
|
+
|
|
|
// Filter tabs if previewing an old revision
|
|
|
if (this.state.revisionPreview) {
|
|
|
let liveTabs = ['status', 'settings', 'deploy'];
|
|
|
tabOptions = tabOptions.filter((tab: any) => !liveTabs.includes(tab.value));
|
|
|
}
|
|
|
-
|
|
|
+ console.log('4', tabOptions)
|
|
|
+
|
|
|
this.setState({ tabOptions });
|
|
|
}
|
|
|
|