|
|
@@ -8,6 +8,8 @@ import Logs from "../status/Logs";
|
|
|
import plus from "assets/plus.svg";
|
|
|
import closeRounded from "assets/close-rounded.png";
|
|
|
import KeyValueArray from "components/form-components/KeyValueArray";
|
|
|
+import CommandLineIcon from "assets/command-line-icon";
|
|
|
+import ConnectToJobInstructionsModal from "./ConnectToJobInstructionsModal";
|
|
|
|
|
|
type PropsType = {
|
|
|
job: any;
|
|
|
@@ -21,6 +23,7 @@ type StateType = {
|
|
|
expanded: boolean;
|
|
|
configIsExpanded: boolean;
|
|
|
pods: any[];
|
|
|
+ showConnectionModal: boolean;
|
|
|
};
|
|
|
|
|
|
export default class JobResource extends Component<PropsType, StateType> {
|
|
|
@@ -28,6 +31,7 @@ export default class JobResource extends Component<PropsType, StateType> {
|
|
|
expanded: false,
|
|
|
configIsExpanded: false,
|
|
|
pods: [] as any[],
|
|
|
+ showConnectionModal: false,
|
|
|
};
|
|
|
|
|
|
expandJob = (event: MouseEvent) => {
|
|
|
@@ -286,6 +290,12 @@ export default class JobResource extends Component<PropsType, StateType> {
|
|
|
<CommandString>{commandString}</CommandString>
|
|
|
{this.renderStatus()}
|
|
|
<MaterialIconTray disabled={false}>
|
|
|
+ <CLIModalIcon
|
|
|
+ onClick={(e) => {
|
|
|
+ e.preventDefault();
|
|
|
+ this.setState({ showConnectionModal: true });
|
|
|
+ }}
|
|
|
+ />
|
|
|
{this.renderStopButton()}
|
|
|
{!this.props.readOnly && (
|
|
|
<i
|
|
|
@@ -309,6 +319,11 @@ export default class JobResource extends Component<PropsType, StateType> {
|
|
|
</MainRow>
|
|
|
{this.renderLogsSection()}
|
|
|
</StyledJob>
|
|
|
+ <ConnectToJobInstructionsModal
|
|
|
+ show={this.state.showConnectionModal}
|
|
|
+ onClose={() => this.setState({ showConnectionModal: false })}
|
|
|
+ job={this.props.job}
|
|
|
+ />
|
|
|
</>
|
|
|
);
|
|
|
}
|
|
|
@@ -390,6 +405,19 @@ const Icon = styled.img`
|
|
|
margin-right: 18px;
|
|
|
`;
|
|
|
|
|
|
+const CLIModalIcon = styled(CommandLineIcon)`
|
|
|
+ border-radius: 20px;
|
|
|
+ width: 26px;
|
|
|
+ padding: 5px;
|
|
|
+ margin: 0 5px;
|
|
|
+ :hover {
|
|
|
+ background: #ffffff11;
|
|
|
+ }
|
|
|
+ > path {
|
|
|
+ fill: #ffffff44;
|
|
|
+ }
|
|
|
+`;
|
|
|
+
|
|
|
const Flex = styled.div`
|
|
|
display: flex;
|
|
|
align-items: center;
|