jusrhee 4 лет назад
Родитель
Сommit
e32ea99b01

+ 6 - 9
dashboard/src/components/Placeholder.tsx

@@ -9,10 +9,7 @@ interface Props {
 
 const Placeholder: React.FC<Props> = ({ height, minHeight, children }) => {
   return (
-    <StyledPlaceholder 
-      height={height}
-      minHeight={minHeight}
-    >
+    <StyledPlaceholder height={height} minHeight={minHeight}>
       {children}
     </StyledPlaceholder>
   );
@@ -20,13 +17,13 @@ const Placeholder: React.FC<Props> = ({ height, minHeight, children }) => {
 
 export default Placeholder;
 
-const StyledPlaceholder = styled.div<{ 
-  height: string,
-  minHeight: string,
+const StyledPlaceholder = styled.div<{
+  height: string;
+  minHeight: string;
 }>`
   width: 100%;
-  height: ${props => props.height || "100px"};
-  minHeight: ${props => props.minHeight || ""};
+  height: ${(props) => props.height || "100px"};
+  minheight: ${(props) => props.minHeight || ""};
   display: flex;
   align-items: center;
   justify-content: center;

+ 5 - 4
dashboard/src/main/home/cluster-dashboard/chart/Chart.tsx

@@ -183,8 +183,8 @@ const Chart: React.FunctionComponent<Props> = ({
               <>
                 <Dot>•</Dot>
                 <JobStatus status={jobStatus.status}>
-                  {jobStatus.status === "running" ? "Started" : "Last run"} {jobStatus.status} at{" "}
-                  {readableDate(jobStatus.start_time)}
+                  {jobStatus.status === "running" ? "Started" : "Last run"}{" "}
+                  {jobStatus.status} at {readableDate(jobStatus.start_time)}
                 </JobStatus>
               </>
             ) : (
@@ -339,8 +339,9 @@ const Title = styled.div`
 
 const JobStatus = styled.span<{ status?: string }>`
   font-size: 13px;
-  font-weight: ${props => props.status && props.status !== "running" ? "500" : ""};
-  ${props => `
+  font-weight: ${(props) =>
+    props.status && props.status !== "running" ? "500" : ""};
+  ${(props) => `
   color: ${
     props.status === "succeeded"
       ? "rgb(56, 168, 138)"

+ 2 - 1
dashboard/src/main/home/cluster-dashboard/dashboard/Metrics.tsx

@@ -263,7 +263,8 @@ const Metrics: React.FC = () => {
       <br />
       <br />
       <Placeholder height="calc(50vh - 50px)" minHeight="400px">
-        Cluster metrics unavailable. Make sure nginx-ingress and Prometheus are installed. 
+        Cluster metrics unavailable. Make sure nginx-ingress and Prometheus are
+        installed.
         <A href="/launch">Go to Launch</A>
       </Placeholder>
     </>

+ 10 - 8
dashboard/src/main/home/cluster-dashboard/expanded-chart/SettingsSection.tsx

@@ -212,14 +212,16 @@ const SettingsSection: React.FC<PropsType> = ({
           />
           {!loadingWebhookToken && (
             <>
-            <Br /><Br /><Br />
-            <SaveButton
-              clearPosition={true}
-              statusPosition="right"
-              text="Save Source Settings"
-              status={saveValuesStatus}
-              onClick={handleSubmit}
-            />
+              <Br />
+              <Br />
+              <Br />
+              <SaveButton
+                clearPosition={true}
+                statusPosition="right"
+                text="Save Source Settings"
+                status={saveValuesStatus}
+                onClick={handleSubmit}
+              />
             </>
           )}
           <Br />

+ 3 - 5
dashboard/src/main/home/cluster-dashboard/expanded-chart/jobs/JobList.tsx

@@ -47,8 +47,8 @@ class JobList extends Component<PropsType, StateType> {
                     onNo: () => {
                       this.setState({ deletionCandidate: null });
                       this.context.setCurrentOverlay(null);
-                    }
-                  })
+                    },
+                  });
                 }}
                 deleting={
                   this.state.deletionJob?.metadata?.name == job.metadata?.name
@@ -102,9 +102,7 @@ class JobList extends Component<PropsType, StateType> {
   };
 
   render() {
-    return (
-      <JobListWrapper>{this.renderJobList()}</JobListWrapper>
-    );
+    return <JobListWrapper>{this.renderJobList()}</JobListWrapper>;
   }
 }
 

+ 5 - 1
dashboard/src/main/home/provisioner/AWSFormSection.tsx

@@ -381,7 +381,11 @@ class AWSFormSection extends Component<PropsType, StateType> {
           <Heading isAtTop={true}>
             AWS Credentials
             <GuideButton
-              onClick={() => window.open("https://docs.getporter.dev/docs/getting-started-with-porter-on-aws")}
+              onClick={() =>
+                window.open(
+                  "https://docs.getporter.dev/docs/getting-started-with-porter-on-aws"
+                )
+              }
             >
               <i className="material-icons-outlined">help</i>
               Guide

+ 5 - 1
dashboard/src/main/home/provisioner/GCPFormSection.tsx

@@ -332,7 +332,11 @@ class GCPFormSection extends Component<PropsType, StateType> {
           <Heading isAtTop={true}>
             GCP Credentials
             <GuideButton
-              onClick={() => window.open("https://docs.getporter.dev/docs/getting-started-on-gcp")}
+              onClick={() =>
+                window.open(
+                  "https://docs.getporter.dev/docs/getting-started-on-gcp"
+                )
+              }
             >
               <i className="material-icons-outlined">help</i>
               Guide