소스 검색

Enable Multi Cluster (#3906)

sdess09 2 년 전
부모
커밋
e471e8b617
2개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 3 2
      dashboard/src/main/home/sidebar/AddCluster/AWSCredentialList.tsx
  2. 2 2
      dashboard/src/main/home/sidebar/ClusterList.tsx

+ 3 - 2
dashboard/src/main/home/sidebar/AddCluster/AWSCredentialList.tsx

@@ -56,11 +56,12 @@ const AWSCredentialsList: React.FunctionComponent<Props> = ({
         setHasError(true);
         setCurrentError(err.response?.data?.error);
         setIsLoading(false);
+
       });
   }, [currentProject]);
 
   if (hasError) {
-    return <Placeholder>Error</Placeholder>;
+    return <ProvisionerFlow />;
   }
 
   if (isLoading) {
@@ -85,7 +86,7 @@ const AWSCredentialsList: React.FunctionComponent<Props> = ({
           credential:
         </Description>
         <CredentialList
-          credentials={awsCredentials.map((cred) => {
+          credentials={awsCredentials?.map((cred) => {
             return {
               id: cred.id,
               display_name: cred.aws_arn,

+ 2 - 2
dashboard/src/main/home/sidebar/ClusterList.tsx

@@ -117,10 +117,10 @@ const ClusterList: React.FC<PropsType> = (props) => {
             <Img src={infra} />
             <ClusterName>{truncate(currentCluster.vanity_name ? currentCluster.vanity_name : currentCluster?.name)}</ClusterName>
 
-            {(clusters.length > 1 || user.isPorterUser) && <i className="material-icons">arrow_drop_down</i>}
+            <i className="material-icons">arrow_drop_down</i>
           </NavButton>
         </MainSelector>
-        {(clusters.length > 1) && renderDropdown()}
+        {renderDropdown()}
         {
           clusterModalVisible && <ProvisionClusterModal
             closeModal={() => setClusterModalVisible(false)} />