Alexander Belanger 5 лет назад
Родитель
Сommit
2b77790c10

+ 0 - 96
dashboard/src/main/home/cluster-dashboard/expanded-chart/ExpandedJobChart.tsx

@@ -5,7 +5,6 @@ import close from "assets/close.png";
 import _ from "lodash";
 import _ from "lodash";
 
 
 import {
 import {
-  ResourceType,
   ChartType,
   ChartType,
   StorageType,
   StorageType,
   ClusterType
   ClusterType
@@ -16,10 +15,8 @@ import api from "shared/api";
 import SaveButton from "components/SaveButton";
 import SaveButton from "components/SaveButton";
 import ConfirmOverlay from "components/ConfirmOverlay";
 import ConfirmOverlay from "components/ConfirmOverlay";
 import Loading from "components/Loading";
 import Loading from "components/Loading";
-import StatusIndicator from "components/StatusIndicator";
 import TabRegion from "components/TabRegion";
 import TabRegion from "components/TabRegion";
 import JobList from "./jobs/JobList"
 import JobList from "./jobs/JobList"
-import ExpandableResource from "components/ExpandableResource";
 import SettingsSection from "./SettingsSection";
 import SettingsSection from "./SettingsSection";
 import ValuesWrapper from "components/values-form/ValuesWrapper";
 import ValuesWrapper from "components/values-form/ValuesWrapper";
 import ValuesForm from "components/values-form/ValuesForm";
 import ValuesForm from "components/values-form/ValuesForm";
@@ -231,7 +228,6 @@ export default class ExpandedJobChart extends Component<PropsType, StateType> {
 
 
   renderTabContents = () => {
   renderTabContents = () => {
     let currentTab = this.state.currentTab
     let currentTab = this.state.currentTab
-    let { currentChart } = this.props;
 
 
     switch (currentTab) {
     switch (currentTab) {
       case "jobs":
       case "jobs":
@@ -345,38 +341,6 @@ export default class ExpandedJobChart extends Component<PropsType, StateType> {
     return `${time} on ${date}`;
     return `${time} on ${date}`;
   };
   };
 
 
-  getChartStatus = (chartStatus: string) => {
-      return "jobs"
-
-    // if (chartStatus === "deployed") {
-    //   for (var uid in this.state.controllers) {
-    //     let value = this.state.controllers[uid];
-    //     let available = this.getAvailability(value.metadata.kind, value);
-    //     let progressing = true;
-
-    //     this.state.controllers[uid]?.status?.conditions?.forEach(
-    //       (condition: any) => {
-    //         if (
-    //           condition.type == "Progressing" &&
-    //           condition.status == "False" &&
-    //           condition.reason == "ProgressDeadlineExceeded"
-    //         ) {
-    //           progressing = false;
-    //         }
-    //       }
-    //     );
-
-    //     if (!available && progressing) {
-    //       return "loading";
-    //     } else if (!available && !progressing) {
-    //       return "failed";
-    //     }
-    //   }
-    //   return "deployed";
-    // }
-    // return chartStatus;
-  };
-
   componentDidMount() {
   componentDidMount() {
     let { currentCluster, currentProject } = this.context;
     let { currentCluster, currentProject } = this.context;
     let { currentChart } = this.props;
     let { currentChart } = this.props;
@@ -441,7 +405,6 @@ export default class ExpandedJobChart extends Component<PropsType, StateType> {
   render() {
   render() {
     let { currentChart, setCurrentChart } = this.props;
     let { currentChart, setCurrentChart } = this.props;
     let chart = currentChart;
     let chart = currentChart;
-    let status = this.getChartStatus(chart.info.status);
 
 
     return (
     return (
       <>
       <>
@@ -532,58 +495,6 @@ const DeleteOverlay = styled.div`
   }
   }
 `;
 `;
 
 
-const Bolded = styled.div`
-  font-weight: 500;
-  color: #ffffff44;
-  margin-right: 6px;
-`;
-
-const Url = styled.a`
-  display: block;
-  margin-left: 2px;
-  font-size: 13px;
-  margin-top: 16px;
-  user-select: all;
-  margin-bottom: -5px;
-  user-select: text;
-  display: flex;
-  align-items: center;
-
-  > i {
-    font-size: 15px;
-    margin-right: 10px;
-  }
-`;
-
-const TabButton = styled.div`
-  position: absolute;
-  right: 0px;
-  height: 30px;
-  background: linear-gradient(to right, #26282f00, #26282f 20%);
-  padding-left: 30px;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  font-size: 13px;
-  color: ${(props: { devOpsMode: boolean }) =>
-    props.devOpsMode ? "#aaaabb" : "#aaaabb55"};
-  margin-left: 35px;
-  border-radius: 20px;
-  text-shadow: 0px 0px 8px
-    ${(props: { devOpsMode: boolean }) =>
-      props.devOpsMode ? "#ffffff66" : "none"};
-  cursor: pointer;
-  :hover {
-    color: ${(props: { devOpsMode: boolean }) =>
-      props.devOpsMode ? "" : "#aaaabb99"};
-  }
-
-  > i {
-    font-size: 17px;
-    margin-right: 9px;
-  }
-`;
-
 const CloseOverlay = styled.div`
 const CloseOverlay = styled.div`
   position: absolute;
   position: absolute;
   top: 0;
   top: 0;
@@ -739,11 +650,4 @@ const StyledExpandedChart = styled.div`
       transform: translateY(0px);
       transform: translateY(0px);
     }
     }
   }
   }
-`;
-
-const ResourceList = styled.div`
-  margin-bottom: 15px;
-  margin-top: 20px;
-  border-radius: 5px;
-  overflow: hidden;
 `;
 `;

+ 0 - 3
dashboard/src/main/home/cluster-dashboard/expanded-chart/jobs/JobResource.tsx

@@ -1,9 +1,6 @@
 import React, { MouseEvent, Component } from "react";
 import React, { MouseEvent, Component } from "react";
 import styled from "styled-components";
 import styled from "styled-components";
-
-import { ChartType, StorageType } from "shared/types";
 import { Context } from "shared/Context";
 import { Context } from "shared/Context";
-import StatusIndicator from "components/StatusIndicator";
 
 
 import api from "shared/api";
 import api from "shared/api";
 import Logs from "../status/Logs"
 import Logs from "../status/Logs"