Parcourir la source

Merge branch 'master' of https://github.com/porter-dev/porter into sean-testing

Sean Rhee il y a 5 ans
Parent
commit
7e6b86a5e8

+ 6 - 3
README.md

@@ -1,5 +1,6 @@
 # Porter 
 # Porter 
-[![MIT License](https://img.shields.io/apm/l/atomic-design-ui.svg?)](https://github.com/tterb/atomic-design-ui/blob/master/LICENSEs) [![Go Report Card](https://goreportcard.com/badge/gojp/goreportcard)](https://goreportcard.com/report/github.com/porter-dev/porter)
+[![MIT License](https://img.shields.io/apm/l/atomic-design-ui.svg?)](https://github.com/tterb/atomic-design-ui/blob/master/LICENSEs) [![Go Report Card](https://goreportcard.com/badge/gojp/goreportcard)](https://goreportcard.com/report/github.com/porter-dev/porter) [![Discord](https://img.shields.io/discord/542888846271184896?color=7389D8&label=community&logo=discord&logoColor=ffffff)](https://discord.gg/MhYNuWwqum)
+
 
 
 **Porter is a Kubernetes-powered PaaS that runs in your own cloud provider.** Porter brings the Heroku experience to Kubernetes without compromising its flexibility. Get started on Porter without the overhead of DevOps and fully customize your infra later when you need to.
 **Porter is a Kubernetes-powered PaaS that runs in your own cloud provider.** Porter brings the Heroku experience to Kubernetes without compromising its flexibility. Get started on Porter without the overhead of DevOps and fully customize your infra later when you need to.
 
 
@@ -19,8 +20,8 @@ Porter brings the simplicity of a traditional PaaS to your own cloud provider wh
 ### Basics
 ### Basics
 - One-click provisioning of a Kubernetes cluster in your own cloud console
 - One-click provisioning of a Kubernetes cluster in your own cloud console
   - ✅ AWS
   - ✅ AWS
-  - 🚧 GCP
-  - 🚧 Digital Ocean
+  -  GCP
+  -  Digital Ocean
   
   
 - Simple deploy of any public or private Docker image
 - Simple deploy of any public or private Docker image
 
 
@@ -73,6 +74,8 @@ For Linux and Windows installation, see our [Docs](https://docs.getporter.dev/do
 4. [Build and push your Docker image to the provisioned registry with the CLI](https://docs.getporter.dev/docs/cli-documentation#porter-docker-configure).
 4. [Build and push your Docker image to the provisioned registry with the CLI](https://docs.getporter.dev/docs/cli-documentation#porter-docker-configure).
 
 
 5. From the Templates tab on the Dashboard, select the Docker template. Click on the image you have just pushed, configure the port, then hit deploy.
 5. From the Templates tab on the Dashboard, select the Docker template. Click on the image you have just pushed, configure the port, then hit deploy.
+## Want Help?
+We are always hanging out in our [Discord community](https://discord.gg/MhYNuWwqum). Join us there if you need help or have any questions!
 
 
 ## Want to Help?
 ## Want to Help?
 We welcome all contributions. Submit an issue or a pull request to help us improve Porter!
 We welcome all contributions. Submit an issue or a pull request to help us improve Porter!

+ 4 - 3
dashboard/src/components/TabRegion.tsx

@@ -11,6 +11,7 @@ type PropsType = {
   defaultTab?: string,
   defaultTab?: string,
   addendum?: any,
   addendum?: any,
   color?: string | null,
   color?: string | null,
+  overflowY?: string,
 };
 };
 
 
 type StateType = {
 type StateType = {
@@ -63,7 +64,7 @@ export default class TabRegion extends Component<PropsType, StateType> {
 
 
   render() {
   render() {
     return (
     return (
-      <StyledTabRegion>
+      <StyledTabRegion overflowY={this.props.overflowY}>
         {this.renderContents()}
         {this.renderContents()}
       </StyledTabRegion>
       </StyledTabRegion>
     );
     );
@@ -98,9 +99,9 @@ const Gap = styled.div`
   height: 30px;
   height: 30px;
 `;
 `;
 
 
-const StyledTabRegion = styled.div`
+const StyledTabRegion = styled.div<{ overflowY: string }>`
   width: 100%;
   width: 100%;
   height: 100%;
   height: 100%;
   position: relative;
   position: relative;
-  overflow-y: auto;
+  overflow-y: ${props => props.overflowY};
 `;
 `;

+ 2 - 2
dashboard/src/main/home/dashboard/StatusPlaceholder.tsx → dashboard/src/main/home/dashboard/ClusterPlaceholder.tsx

@@ -17,7 +17,7 @@ type StateType = {
   loading: boolean,
   loading: boolean,
 };
 };
 
 
-export default class StatusPlaceholder extends Component<PropsType, StateType> {
+export default class ClusterPlaceholder extends Component<PropsType, StateType> {
   state = {
   state = {
     loading: true,
     loading: true,
   }
   }
@@ -65,7 +65,7 @@ export default class StatusPlaceholder extends Component<PropsType, StateType> {
   }
   }
 }
 }
 
 
-StatusPlaceholder.contextType = Context;
+ClusterPlaceholder.contextType = Context;
 
 
 const LoadingWrapper = styled.div`
 const LoadingWrapper = styled.div`
   height: calc(100vh - 450px);
   height: calc(100vh - 450px);

+ 4 - 4
dashboard/src/main/home/dashboard/StatusPlaceholderContainer.tsx → dashboard/src/main/home/dashboard/ClusterPlaceholderContainer.tsx

@@ -2,7 +2,7 @@ import React, { Component } from 'react';
 import styled from 'styled-components';
 import styled from 'styled-components';
 
 
 import { Context } from '../../../shared/Context';
 import { Context } from '../../../shared/Context';
-import StatusPlaceholder from './StatusPlaceholder';
+import ClusterPlaceholder from './ClusterPlaceholder';
 
 
 type PropsType = {
 type PropsType = {
   setCurrentView: (x: string) => void,
   setCurrentView: (x: string) => void,
@@ -12,13 +12,13 @@ type StateType = {
 };
 };
 
 
 // Props in context to project section to trigger update on context change
 // Props in context to project section to trigger update on context change
-export default class StatusPlaceholderContainer extends Component<PropsType, StateType> {
+export default class ClusterPlaceholderContainer extends Component<PropsType, StateType> {
   state = {
   state = {
   }
   }
 
 
   render() {
   render() {
     return (
     return (
-      <StatusPlaceholder
+      <ClusterPlaceholder
         setCurrentView={this.props.setCurrentView}
         setCurrentView={this.props.setCurrentView}
         currentCluster={this.context.currentCluster}
         currentCluster={this.context.currentCluster}
       />
       />
@@ -26,4 +26,4 @@ export default class StatusPlaceholderContainer extends Component<PropsType, Sta
   }
   }
 }
 }
 
 
-StatusPlaceholderContainer.contextType = Context;
+ClusterPlaceholderContainer.contextType = Context;

+ 19 - 10
dashboard/src/main/home/dashboard/Dashboard.tsx

@@ -8,6 +8,7 @@ import { InfraType } from '../../../shared/types';
 import api from '../../../shared/api';
 import api from '../../../shared/api';
 
 
 import ProvisionerSettings from '../provisioner/ProvisionerSettings';
 import ProvisionerSettings from '../provisioner/ProvisionerSettings';
+import ClusterPlaceholderContainer from './ClusterPlaceholderContainer';
 
 
 type PropsType = {
 type PropsType = {
   setCurrentView: (x: string) => void,
   setCurrentView: (x: string) => void,
@@ -94,16 +95,24 @@ export default class Dashboard extends Component<PropsType, StateType> {
 
 
             <LineBreak />
             <LineBreak />
 
 
-            {!currentCluster && (
-              <Banner>
-                <i className="material-icons">error_outline</i>
-                This project currently has no clusters conncted.
-              </Banner>
-            )}
-            <ProvisionerSettings 
-              setCurrentView={setCurrentView} 
-              infras={infras}
-            />
+            {!currentCluster 
+              ? (
+                <>
+                  <Banner>
+                    <i className="material-icons">error_outline</i>
+                    This project currently has no clusters conncted.
+                    </Banner>
+                  <ProvisionerSettings 
+                    setCurrentView={setCurrentView} 
+                    infras={infras}
+                  />
+                </>
+              ) : (
+                <ClusterPlaceholderContainer
+                  setCurrentView={this.props.setCurrentView} 
+                />
+              )
+            }
           </DashboardWrapper>
           </DashboardWrapper>
         )}
         )}
       </>
       </>

+ 7 - 8
dashboard/src/main/home/project-settings/InviteList.tsx

@@ -233,12 +233,12 @@ export default class InviteList extends Component<PropsType, StateType> {
           >
           >
             Create Invite
             Create Invite
           </InviteButton>
           </InviteButton>
+          {this.state.invalidEmail &&
+            <Invalid>
+              Invalid email address. Please try again.
+            </Invalid>
+          }
         </ButtonWrapper>
         </ButtonWrapper>
-        {this.state.invalidEmail &&
-          <Invalid>
-            Invalid Email Address. Try Again.
-          </Invalid>
-        }
         {this.renderInvitations()}
         {this.renderInvitations()}
       </>
       </>
     )
     )
@@ -394,9 +394,8 @@ const LinkTd = styled(Td)`
 `;
 `;
 
 
 const Invalid = styled.div`
 const Invalid = styled.div`
-  margin-top: -26px;
-  margin-bottom: 26px;
-  color: #fa0a26;
+  color: #f5cb42;
+  margin-left: 15px;
   font-size: 13px;
   font-size: 13px;
   font-family: 'Work Sans', sans-serif;
   font-family: 'Work Sans', sans-serif;
 `;
 `;

+ 1 - 0
dashboard/src/main/home/project-settings/ProjectSettings.tsx

@@ -63,6 +63,7 @@ export default class ProjectSettings extends Component<PropsType, StateType> {
           <Title>Project Settings</Title>
           <Title>Project Settings</Title>
         </TitleSection>
         </TitleSection>
         <TabRegion
         <TabRegion
+          overflowY='visible'
           currentTab={this.state.currentTab}
           currentTab={this.state.currentTab}
           setCurrentTab={(x: string) => this.setState({ currentTab: x })}
           setCurrentTab={(x: string) => this.setState({ currentTab: x })}
           options={tabOptions}
           options={tabOptions}

+ 2 - 1
dashboard/src/main/home/templates/expanded-template/LaunchTemplate.tsx

@@ -77,6 +77,7 @@ export default class LaunchTemplate extends Component<PropsType, StateType> {
       if (err) {
       if (err) {
         this.setState({ saveValuesStatus: 'error' });
         this.setState({ saveValuesStatus: 'error' });
       } else {
       } else {
+        // this.props.setCurrentView('cluster-dashboard');
         this.setState({ saveValuesStatus: 'successful' });
         this.setState({ saveValuesStatus: 'successful' });
       }
       }
     });
     });
@@ -123,6 +124,7 @@ export default class LaunchTemplate extends Component<PropsType, StateType> {
       if (err) {
       if (err) {
         this.setState({ saveValuesStatus: 'error' });
         this.setState({ saveValuesStatus: 'error' });
       } else {
       } else {
+        // this.props.setCurrentView('cluster-dashboard');
         this.setState({ saveValuesStatus: 'successful' });
         this.setState({ saveValuesStatus: 'successful' });
       }
       }
     });
     });
@@ -320,7 +322,6 @@ export default class LaunchTemplate extends Component<PropsType, StateType> {
             closeOverlay={true}
             closeOverlay={true}
           />
           />
         </ClusterSection>
         </ClusterSection>
-        <Subtitle>Name</Subtitle>
         {this.renderSourceSelector()}
         {this.renderSourceSelector()}
         {this.renderTabRegion()}
         {this.renderTabRegion()}
       </StyledLaunchTemplate>
       </StyledLaunchTemplate>