Просмотр исходного кода

Add env variable to block Gitlab UI

jnfrati 4 лет назад
Родитель
Сommit
e33be538db
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      dashboard/src/main/home/integrations/Integrations.tsx

+ 2 - 2
dashboard/src/main/home/integrations/Integrations.tsx

@@ -15,7 +15,7 @@ type PropsType = RouteComponentProps;
 const IntegrationCategoryStrings = [
 const IntegrationCategoryStrings = [
   "registry",
   "registry",
   "slack",
   "slack",
-  "gitlab",
+  ...(process.env.ENABLE_GITLAB ? ["gitlab"] : []),
 ]; /*"kubernetes",*/
 ]; /*"kubernetes",*/
 
 
 const Integrations: React.FC<PropsType> = (props) => {
 const Integrations: React.FC<PropsType> = (props) => {
@@ -73,7 +73,7 @@ const Integrations: React.FC<PropsType> = (props) => {
 
 
             <IntegrationList
             <IntegrationList
               currentCategory={""}
               currentCategory={""}
-              integrations={["registry", "slack", "gitlab"]}
+              integrations={IntegrationCategoryStrings}
               setCurrent={(x) =>
               setCurrent={(x) =>
                 pushFiltered(props, `/integrations/${x}`, ["project_id"])
                 pushFiltered(props, `/integrations/${x}`, ["project_id"])
               }
               }