Skip to content
Snippets Groups Projects
Commit cb95b28a authored by Zoltan Runyo's avatar Zoltan Runyo
Browse files

Merge branch 'ICSHWI-9272-ioc-status-and-manage' into 'develop'

Icshwi 9272 ioc status and manage

See merge request !167
parents c2376473 e952dc75
No related branches found
No related tags found
4 merge requests!270Merging develop branch to master in order to create RC,!222Fixing missing time interval parameter for logs,!202Merging develop to master,!167Icshwi 9272 ioc status and manage
Pipeline #112192 passed
......@@ -23,5 +23,5 @@ export default function GitRefLink({ioc}) {
//calculate the endpoint for tag/commitId
url = url + '-/tree/' + ioc.sourceVersion;
return <Typography><MuiLink href={url} target="_blank" rel="noreferrer">{ioc.sourceVersion}</MuiLink></Typography>
return <Typography display="inline"><MuiLink href={url} target="_blank" rel="noreferrer">{ioc.sourceVersionShort}</MuiLink></Typography>
}
\ No newline at end of file
import React, { useCallback, useContext, useEffect } from "react";
import { Typography } from "@material-ui/core";
import { Typography, Link as MuiLink } from "@material-ui/core";
import { SimpleAccordion } from "../common/Accordion/SimpleAccordion";
import { IOCDetails } from "./IOCDetails";
import { Link } from 'react-router-dom';
......@@ -31,6 +31,9 @@ export function IOCLiveStatus({ ioc, currentCommand, commands, getCommands, butt
const deploymentStatus = new DeploymentStatus(ioc.activeDeployment, deploymentJob);
const showControls = deploymentStatus.wasSuccessful();
let subset = {
"CCDB name":
<Typography><MuiLink href={`${window.CCDB_ADDRESS}?name=${ioc.namingName}`}
target="_blank" rel="noreferrer">{ioc.namingName}</MuiLink></Typography>,
"Git reference": <GitRefLink ioc={ioc} />,
"Description": ioc.description,
"Owner": ioc.owner,
......
......@@ -44,7 +44,7 @@ function commonTests() {
cy.contains("CCCE:SC-IOC-001");
// Expected in Info table:
cy.contains("ee3ae2a8b9e7e83e4eb511eee340716e9d541056") // git reference
cy.contains("ee3ae2a8") // git reference
cy.contains("Test IOC for CCCE") // description
cy.contains("johnsparger") // owner
cy.contains("ccce-w40.cslab.esss.lu.se") // deployed on
......
......@@ -5,9 +5,7 @@ import { DeployIOC } from "../../components/IOC/DeployIOC";
import { UndeployIOC } from "../../components/IOC/UndeployIOC";
import { SimpleModal } from "../../components/common/SimpleModal/SimpleModal";
import { useUpdateAndDeployIoc, useCreateUndeployment, useDeploymentListForIOC } from "../../api/SwaggerApi";
import GitRefLink from "./GitRefLink";
import AlertMessages from "./AlertMessages";
import { Link } from 'react-router-dom';
import { DeploymentAsyncList } from "../../components/deployments/DeploymentAsyncList";
import { SimpleAccordion } from "../common/Accordion/SimpleAccordion";
import { initRequestParams } from "../common/Helper";
......@@ -80,33 +78,10 @@ export function IOCManage({ ioc, getIOC, buttonDisabled }) {
const getSubset = (ioc) => {
ioc = { ...ioc };
const {
description,
// active,
} = ioc;
const { sourceUrl: git } = ioc;
let host = ioc.activeDeployment?.host.fqdn;
//create link if host is set
if (ioc.activeDeployment) {
host =
<Typography>
{ioc.activeDeployment.host.csEntryId ?
<Link to={`/hosts/${ioc.activeDeployment.host.csEntryId}`}>{ioc.activeDeployment.host.fqdn}</Link>
:
<>{ioc.activeDeployment.host.fqdn}</>
}
</Typography>
}
return {
"CCDB name": <Typography><MuiLink href={`${window.CCDB_ADDRESS}?name=${ioc.namingName}`}
target="_blank" rel="noreferrer">{ioc.namingName}</MuiLink></Typography>,
description,
"Owner": ioc.owner,
git: <Typography><MuiLink href={git} target="_blank" rel="noreferrer">{git}</MuiLink></Typography>,
"Git reference" : ioc.sourceVersion ? <GitRefLink ioc={ioc} /> : '---',
"target host": host || '---',
git: <Typography><MuiLink href={git} target="_blank" rel="noreferrer">{git}</MuiLink></Typography>
};
};
......
......@@ -10,29 +10,30 @@ import { Alert } from "@material-ui/lab";
import { theme } from "../../style/Theme";
import { initRequestParams } from "../common/Helper";
import AccessControl from "../auth/AccessControl";
import { essColors } from "../../style/Palette";
const useStyles = makeStyles({
startButton: {
backgroundColor: '#4caf50',
backgroundColor: essColors.grass,
color: '#FFFFFF',
"&:disabled": {
backgroundColor: '#e0e0e0',
color: '#afaba6',
},
"&:hover": {
backgroundColor: '#005a00',
backgroundColor: essColors.grass_op,
color: '#FFFFFF',
}
},
stopButton: {
backgroundColor: '#aa2e25',
backgroundColor: essColors.navy,
color: '#FFFFFF',
"&:disabled": {
backgroundColor: '#e0e0e0',
color: '#afaba6',
},
"&:hover": {
backgroundColor: '#6c0000',
backgroundColor: essColors.navy_op,
color: '#FFFFFF',
}
},
......
......@@ -5,7 +5,9 @@ export const essColors = {
orange: '#ff7d00',
forest: '#006646',
grass: '#99be00',
grass_op: '#99be00cc',
navy: '#003366',
navy_op: '#003366cc',
black: '#000000',
white: '#ffffff',
};
......
......@@ -8,7 +8,7 @@ function commonTests() {
// Expected in Info table:
cy.contains("CCCE:SC-IOC-001") // ioc name
cy.contains("ee3ae2a8b9e7e83e4eb511eee340716e9d541056") // git reference
cy.contains("ee3ae2a8") // git reference
cy.contains("jsparger-test.cslab.esss.lu.se") // host
cy.contains("https://gitlab.esss.lu.se/ccce/dev/iocs/ccce-demo-w38.git") // git repository
cy.contains("https://awx-lab-01.cslab.esss.lu.se/#/jobs/playbook/3925") // awx job link
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment