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

Updated file name from environment list to deployment list

jnfrati 4 лет назад
Родитель
Сommit
5d9b2999ec

+ 0 - 2
dashboard/src/main/home/cluster-dashboard/dashboard/Dashboard.tsx

@@ -12,7 +12,6 @@ import ClusterSettings from "./ClusterSettings";
 import useAuth from "shared/auth/useAuth";
 import Metrics from "./Metrics";
 import EventsTab from "./events/EventsTab";
-import EnvironmentList from "../preview-environments/EnvironmentList";
 import { useLocation } from "react-router";
 import { getQueryParam } from "shared/routing";
 
@@ -30,7 +29,6 @@ const tabOptions: {
 ];
 
 export const Dashboard: React.FunctionComponent = () => {
-  const { currentProject } = useContext(Context);
   const [currentTab, setCurrentTab] = useState<TabEnum>("nodes");
   const [currentTabOptions, setCurrentTabOptions] = useState(tabOptions);
   const [isAuthorized] = useAuth();

+ 2 - 2
dashboard/src/main/home/cluster-dashboard/preview-environments/EnvironmentList.tsx → dashboard/src/main/home/cluster-dashboard/preview-environments/DeploymentList.tsx

@@ -39,7 +39,7 @@ export type Environment = {
   git_repo_name: string;
 };
 
-const EnvironmentList = () => {
+const DeploymentList = () => {
   const [isLoading, setIsLoading] = useState(true);
   const [hasError, setHasError] = useState(false);
   const [hasPermissions, setHasPermissions] = useState(false);
@@ -333,7 +333,7 @@ const EnvironmentList = () => {
   );
 };
 
-export default EnvironmentList;
+export default DeploymentList;
 
 const ActionsWrapper = styled.div`
   display: flex;

+ 1 - 1
dashboard/src/main/home/cluster-dashboard/preview-environments/EnvironmentCard.tsx

@@ -1,6 +1,6 @@
 import React, { useState } from "react";
 import styled, { keyframes } from "styled-components";
-import { Environment, PRDeployment } from "./EnvironmentList";
+import { Environment, PRDeployment } from "./DeploymentList";
 import pr_icon from "assets/pull_request_icon.svg";
 import { integrationList } from "shared/common";
 import { useRouteMatch } from "react-router";

+ 1 - 1
dashboard/src/main/home/cluster-dashboard/preview-environments/EnvironmentDetail.tsx

@@ -5,7 +5,7 @@ import TitleSection from "components/TitleSection";
 import pr_icon from "assets/pull_request_icon.svg";
 import { useRouteMatch, useLocation } from "react-router";
 import DynamicLink from "components/DynamicLink";
-import { PRDeployment, Environment } from "./EnvironmentList";
+import { PRDeployment } from "./DeploymentList";
 import Loading from "components/Loading";
 import { Context } from "shared/Context";
 import api from "shared/api";

+ 2 - 2
dashboard/src/main/home/cluster-dashboard/preview-environments/PreviewEnvironmentsHome.tsx

@@ -3,7 +3,7 @@ import TitleSection from "components/TitleSection";
 import React, { useContext, useState } from "react";
 import { Context } from "shared/Context";
 import styled from "styled-components";
-import EnvironmentList from "./EnvironmentList";
+import DeploymentList from "./DeploymentList";
 
 const Header = () => (
   <>
@@ -48,7 +48,7 @@ const PreviewEnvironmentsHome = () => {
           {
             label: "Pull requests",
             value: "pull_requests",
-            component: <EnvironmentList />,
+            component: <DeploymentList />,
           },
         ]}
         currentTab={currentTab}

+ 1 - 2
dashboard/src/main/home/cluster-dashboard/preview-environments/components/ConnectNewRepo.tsx

@@ -1,6 +1,5 @@
 import DynamicLink from "components/DynamicLink";
 import Heading from "components/form-components/Heading";
-import Helper from "components/form-components/Helper";
 import RepoList from "components/repo-selector/RepoList";
 import SaveButton from "components/SaveButton";
 import DocsHelper from "components/DocsHelper";
@@ -12,7 +11,7 @@ import styled from "styled-components";
 import api from "shared/api";
 import { Context } from "shared/Context";
 import { useRouting } from "shared/routing";
-import { Environment } from "../EnvironmentList";
+import { Environment } from "../DeploymentList";
 
 const ConnectNewRepo: React.FC = () => {
   const { currentProject, currentCluster, setCurrentError } = useContext(

+ 0 - 0
dashboard/src/main/home/cluster-dashboard/preview-environments/index.tsx