Explorar el Código

resolved confl

Justin Rhee hace 3 años
padre
commit
8ed4686a04

+ 18 - 0
dashboard/src/components/CredentialsForm.tsx

@@ -184,6 +184,9 @@ const CredentialsForm: React.FC<Props> = ({
         <Spacer />
         <Img src={aws} />
         Set AWS credentials
+        <HelperButton onClick={() => window.open("https://docs.porter.run/getting-started/provisioning-on-aws/", "_blank")}>
+          <i className="material-icons">help_outline</i>
+        </HelperButton>
       </Heading>
       <Helper>
         Select your credentials from the list below, or add a new set of credentials:
@@ -201,6 +204,21 @@ const CredentialsForm: React.FC<Props> = ({
 
 export default CredentialsForm;
 
+const HelperButton = styled.div`
+  cursor: pointer;
+  display: flex;
+  align-items: center;
+  margin-left: 10px;
+  justify-content: center;
+  > i {
+    color: #aaaabb;
+    width: 24px;
+    height: 24px;
+    font-size: 20px;
+    border-radius: 20px;
+  }
+`;
+
 const CloseButton = styled.div`
   position: absolute;
   top: 15px;

+ 1 - 1
dashboard/src/main/home/Home.tsx

@@ -257,7 +257,7 @@ const Home: React.FC<Props> = props => {
               .then((res) => {
                 const usage = res.data;
                 setUsage(usage);
-                if (usage.exceeded) {
+                if (usage.exceeded && false) {
                   setCurrentModal("UsageWarningModal", { usage });
                 }
               })

+ 2 - 2
dashboard/src/main/home/dashboard/ClusterSection.tsx

@@ -14,7 +14,7 @@ type Props = {
 };
 
 const ClusterSection = (props: Props) => {
-  const { usage } = useContext(Context);
+  const { usage, currentCluster } = useContext(Context);
 
   const [currentStep, setCurrentStep] = useState("");
 
@@ -93,7 +93,7 @@ const ClusterSection = (props: Props) => {
   }
   return (
     <>
-      {usage?.current.cluster > 1 && (
+      {(usage?.current.cluster > 1 || !currentCluster) && (
         <Button onClick={() => setCurrentStep("cloud")}>
           <i className="material-icons">add</i> Create a cluster
         </Button>

+ 1 - 1
dashboard/src/main/home/integrations/IntegrationRow.tsx

@@ -55,7 +55,7 @@ export default class IntegrationRow extends Component<PropsType, StateType> {
       <Integration disabled={false}>
         <MainRow onClick={this.props.toggleCollapse} disabled={false}>
           <Flex>
-            <Icon src={"https://avatars2.githubusercontent.com/u/52505464?s=400&u=da920f994c67665c7ad6c606a5286557d4f8555f&v=4"} />
+            <Icon src={icon ? icon : "https://avatars2.githubusercontent.com/u/52505464?s=400&u=da920f994c67665c7ad6c606a5286557d4f8555f&v=4"} />
             <Description>
               <Label>{this.props.label}</Label>
               <Subtitle>{subtitle}</Subtitle>

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

@@ -102,7 +102,7 @@ class Sidebar extends Component<PropsType, StateType> {
 
   renderProjectContents = () => {
     let { currentView } = this.props;
-    let { currentProject, user } = this.context;
+    let { currentProject, user, currentCluster, hasFinishedOnboarding } = this.context;
     if (currentProject) {
       return (
         <ScrollWrapper>
@@ -148,7 +148,7 @@ class Sidebar extends Component<PropsType, StateType> {
 
           <br />
 
-          {this.context.hasFinishedOnboarding && (
+          {currentCluster && (
             <>
               <SidebarLabel>
                 {currentProject.capi_provisioner_enabled ? (

+ 1 - 0
dashboard/src/shared/types.tsx

@@ -306,6 +306,7 @@ export type ActionConfigType = {
   git_repo: string;
   git_branch: string;
   image_repo_uri: string;
+  dockerfile_path?: string;
 } & (
   | {
       kind: "gitlab";