Sfoglia il codice sorgente

add service variables

Ivan Galakhov 4 anni fa
parent
commit
4db91e9ed5
1 ha cambiato i file con 11 aggiunte e 1 eliminazioni
  1. 11 1
      dashboard/src/components/values-form/FormWrapper.tsx

+ 11 - 1
dashboard/src/components/values-form/FormWrapper.tsx

@@ -65,7 +65,17 @@ export default class FormWrapper extends Component<PropsType, StateType> {
       let tabOptions = [] as { value: string; label: string }[];
       let tabs = this.props.formData?.tabs;
       let requiredFields = [] as string[];
-      let metaState: any = {};
+      let metaState: any = {
+        "currentCluster.service.is_gcp": {
+          value: this.context.currentCluster.service == "gke",
+        },
+        "currentCluster.service.is_aws": {
+          value: this.context.currentCluster.service == "eks",
+        },
+        "currentCluster.service.is_do": {
+          value: this.context.currentCluster.service == "doks",
+        },
+      };
       if (tabs) {
         tabs.forEach((tab: any, i: number) => {
           if (tab?.name && tab.label) {