|
@@ -4,6 +4,8 @@ import styled from "styled-components";
|
|
|
import { PorterFormContext } from "components/porter-form/PorterFormContextProvider";
|
|
import { PorterFormContext } from "components/porter-form/PorterFormContextProvider";
|
|
|
import JobList from "./JobList";
|
|
import JobList from "./JobList";
|
|
|
import SaveButton from "components/SaveButton";
|
|
import SaveButton from "components/SaveButton";
|
|
|
|
|
+import CommandLineIcon from "assets/command-line-icon";
|
|
|
|
|
+import ConnectToJobInstructionsModal from "./ConnectToJobInstructionsModal";
|
|
|
|
|
|
|
|
interface Props {
|
|
interface Props {
|
|
|
isAuthorized: any;
|
|
isAuthorized: any;
|
|
@@ -12,6 +14,7 @@ interface Props {
|
|
|
jobs: any;
|
|
jobs: any;
|
|
|
handleSaveValues: any;
|
|
handleSaveValues: any;
|
|
|
expandJob: any;
|
|
expandJob: any;
|
|
|
|
|
+ chartName: string;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -20,6 +23,7 @@ interface Props {
|
|
|
*/
|
|
*/
|
|
|
const TempJobList: React.FC<Props> = (props) => {
|
|
const TempJobList: React.FC<Props> = (props) => {
|
|
|
const { getSubmitValues } = useContext(PorterFormContext);
|
|
const { getSubmitValues } = useContext(PorterFormContext);
|
|
|
|
|
+ const [showConnectionModal, setShowConnectionModal] = useState(false);
|
|
|
const [searchInput, setSearchInput] = useState("");
|
|
const [searchInput, setSearchInput] = useState("");
|
|
|
|
|
|
|
|
let saveButton = (
|
|
let saveButton = (
|
|
@@ -36,6 +40,15 @@ const TempJobList: React.FC<Props> = (props) => {
|
|
|
>
|
|
>
|
|
|
<i className="material-icons">play_arrow</i> Run Job
|
|
<i className="material-icons">play_arrow</i> Run Job
|
|
|
</SaveButton>
|
|
</SaveButton>
|
|
|
|
|
+ <CLIModalIconWrapper
|
|
|
|
|
+ onClick={(e) => {
|
|
|
|
|
+ e.preventDefault();
|
|
|
|
|
+ setShowConnectionModal(true);
|
|
|
|
|
+ }}
|
|
|
|
|
+ >
|
|
|
|
|
+ <CLIModalIcon />
|
|
|
|
|
+ Shell Access
|
|
|
|
|
+ </CLIModalIconWrapper>
|
|
|
</ButtonWrapper>
|
|
</ButtonWrapper>
|
|
|
);
|
|
);
|
|
|
|
|
|
|
@@ -51,6 +64,11 @@ const TempJobList: React.FC<Props> = (props) => {
|
|
|
setJobs={props.setJobs}
|
|
setJobs={props.setJobs}
|
|
|
expandJob={props.expandJob}
|
|
expandJob={props.expandJob}
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <ConnectToJobInstructionsModal
|
|
|
|
|
+ show={showConnectionModal}
|
|
|
|
|
+ onClose={() => setShowConnectionModal(false)}
|
|
|
|
|
+ chartName={props.chartName}
|
|
|
|
|
+ />
|
|
|
</>
|
|
</>
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
@@ -58,5 +76,46 @@ const TempJobList: React.FC<Props> = (props) => {
|
|
|
export default TempJobList;
|
|
export default TempJobList;
|
|
|
|
|
|
|
|
const ButtonWrapper = styled.div`
|
|
const ButtonWrapper = styled.div`
|
|
|
|
|
+ display: flex;
|
|
|
margin: 5px 0 35px;
|
|
margin: 5px 0 35px;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+`;
|
|
|
|
|
+
|
|
|
|
|
+const CLIModalIconWrapper = styled.div`
|
|
|
|
|
+ height: 35px;
|
|
|
|
|
+ font-size: 13px;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ font-family: "Work Sans", sans-serif;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ padding: 6px 20px 6px 10px;
|
|
|
|
|
+ text-align: left;
|
|
|
|
|
+ border: 1px solid #ffffff55;
|
|
|
|
|
+ border-radius: 8px;
|
|
|
|
|
+ background: #ffffff11;
|
|
|
|
|
+ color: #ffffffdd;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+
|
|
|
|
|
+ :hover {
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ background: #ffffff22;
|
|
|
|
|
+ > path {
|
|
|
|
|
+ fill: #ffffff77;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ > path {
|
|
|
|
|
+ fill: #ffffff99;
|
|
|
|
|
+ }
|
|
|
|
|
+`;
|
|
|
|
|
+
|
|
|
|
|
+const CLIModalIcon = styled(CommandLineIcon)`
|
|
|
|
|
+ width: 32px;
|
|
|
|
|
+ height: 32px;
|
|
|
|
|
+ padding: 8px;
|
|
|
|
|
+
|
|
|
|
|
+ > path {
|
|
|
|
|
+ fill: #ffffff99;
|
|
|
|
|
+ }
|
|
|
`;
|
|
`;
|