sdess09 2 лет назад
Родитель
Сommit
7293233a68

+ 5 - 1
dashboard/src/main/home/app-dashboard/app-view/AppDataContainer.tsx

@@ -668,7 +668,11 @@ const AppDataContainer: React.FC<AppDataContainerProps> = ({ tabParam }) => {
               featureFlagEnabled={currentProject?.helm_values_enabled ?? false}
             />
           ))
-          .with("helm-values", () => <HelmLatestValuesTab />)
+          .with("helm-values", () => (
+            <HelmLatestValuesTab
+              featureFlagEnabled={currentProject?.helm_values_enabled ?? false}
+            />
+          ))
           .with("notifications", () => <Notifications />)
           .otherwise(() => null)}
         <Spacer y={2} />

+ 6 - 2
dashboard/src/main/home/app-dashboard/app-view/tabs/HelmLatestValuesTab.tsx

@@ -8,7 +8,11 @@ import { Context } from "shared/Context";
 import HelmLatestValues from "../../validate-apply/helm/HelmLatestValues";
 import { useLatestRevision } from "../LatestRevisionContext";
 
-const HelmLatestValuesTab: React.FC = () => {
+type Props = {
+  featureFlagEnabled: boolean;
+};
+
+const HelmLatestValuesTab: React.FC<Props> = ({ featureFlagEnabled }) => {
   const { user } = useContext(Context);
   const { projectId, clusterId, latestProto, deploymentTarget, porterApp } =
     useLatestRevision();
@@ -17,7 +21,7 @@ const HelmLatestValuesTab: React.FC = () => {
 
   return (
     <>
-      {user?.isPorterUser && (
+      {user?.isPorterUser && !featureFlagEnabled && (
         <Text color="helper">
           This tab is only visible to Porter operators.
         </Text>