Răsfoiți Sursa

metrics frontend + prettier

jusrhee 5 ani în urmă
părinte
comite
53f5f0283b

+ 1 - 1
dashboard/src/components/TabSelector.tsx

@@ -46,7 +46,7 @@ export default class TabSelector extends Component<PropsType, StateType> {
         <TabWrapper>
           {this.renderTabList()}
           <Tab lastItem={true} highlight={null}>
-            { this.props.noBuffer ? null : <Buffer /> }
+            {this.props.noBuffer ? null : <Buffer />}
           </Tab>
         </TabWrapper>
         {this.props.addendum}

+ 2 - 1
dashboard/src/components/repo-selector/RepoList.tsx

@@ -126,7 +126,8 @@ export default class ActionConfEditor extends Component<PropsType, StateType> {
             href={`/api/oauth/projects/${this.context.currentProject.id}/github?redirected=true`}
           >
             log in with GitHub
-          </A>.
+          </A>
+          .
         </LoadingWrapper>
       );
     }

+ 11 - 12
dashboard/src/main/home/cluster-dashboard/expanded-chart/metrics/MetricsSection.tsx

@@ -109,7 +109,7 @@ export default class MetricsSection extends Component<PropsType, StateType> {
         res.data.map((controller: any) => {
           let name = controller?.metadata?.name;
           controllerOptions.push({ value: controller, label: name });
-        })
+        });
 
         // iterate through the controllers to get the list of pods
         this.setState({
@@ -170,8 +170,6 @@ export default class MetricsSection extends Component<PropsType, StateType> {
       pods = [this.state.selectedPod];
     }
 
-
-
     api
       .getMetrics(
         "<token>",
@@ -291,7 +289,7 @@ export default class MetricsSection extends Component<PropsType, StateType> {
         let pods = [{ value: "All", label: "All (Summed)" }] as any[];
         res?.data?.forEach((pod: any) => {
           let name = pod?.metadata?.name;
-          pods.push({ value: name, label: name});
+          pods.push({ value: name, label: name });
         });
 
         this.setState({ pods, selectedPod: "All" });
@@ -358,15 +356,14 @@ export default class MetricsSection extends Component<PropsType, StateType> {
           <DropdownOverlay
             onClick={() => this.setState({ showMetricsSettings: false })}
           />
-          <DropdownAlt
-            dropdownWidth="330px"
-            dropdownMaxHeight="300px"
-          >
+          <DropdownAlt dropdownWidth="330px" dropdownMaxHeight="300px">
             <Label>Additional Settings</Label>
             <SelectRow
               label="Target Controller"
               value={this.state.selectedController}
-              setActiveValue={(x: any) => this.setState({ selectedController: x })}
+              setActiveValue={(x: any) =>
+                this.setState({ selectedController: x })
+              }
               options={this.state.controllerOptions}
               width="100%"
             />
@@ -381,7 +378,7 @@ export default class MetricsSection extends Component<PropsType, StateType> {
         </>
       );
     }
-  }
+  };
 
   render() {
     return (
@@ -390,7 +387,9 @@ export default class MetricsSection extends Component<PropsType, StateType> {
           <Flex>
             <MetricSelector
               onClick={() =>
-                this.setState({ dropdownExpanded: !this.state.dropdownExpanded })
+                this.setState({
+                  dropdownExpanded: !this.state.dropdownExpanded,
+                })
               }
             >
               <MetricsLabel>{this.state.selectedMetricLabel}</MetricsLabel>
@@ -398,7 +397,7 @@ export default class MetricsSection extends Component<PropsType, StateType> {
               {this.renderDropdown()}
             </MetricSelector>
             <Relative>
-              <IconWrapper 
+              <IconWrapper
                 onClick={() => this.setState({ showMetricsSettings: true })}
               >
                 <SettingsIcon src={settings} />

+ 6 - 2
dashboard/src/main/home/launch/expanded-template/LaunchTemplate.tsx

@@ -534,7 +534,9 @@ class LaunchTemplate extends Component<PropsType, StateType> {
           <Subtitle>
             Specify the container image you would like to connect to this
             template.
-            <Highlight onClick={() => this.props.history.push("integrations/registry")}>
+            <Highlight
+              onClick={() => this.props.history.push("integrations/registry")}
+            >
               Manage Docker registries
             </Highlight>
             <Required>*</Required>
@@ -584,7 +586,9 @@ class LaunchTemplate extends Component<PropsType, StateType> {
           </CloseButton>
           <Subtitle>
             Provide a repo folder to use as source.
-            <Highlight onClick={() => this.props.history.push("integrations/repo")}>
+            <Highlight
+              onClick={() => this.props.history.push("integrations/repo")}
+            >
               Manage Git repos
             </Highlight>
             <Required>*</Required>