X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Flaunchpad%2Fsrc%2Flaunchpad_card%2FjobListCard.jsx;h=8253f0a1a2f4163a5e3c538ad9167c6713c8f174;hb=HEAD;hp=2a665406fb15d2eb02a34099b98e2b0215daeec8;hpb=e29efc315df33d546237e270470916e26df391d6;p=osm%2FUI.git diff --git a/skyquake/plugins/launchpad/src/launchpad_card/jobListCard.jsx b/skyquake/plugins/launchpad/src/launchpad_card/jobListCard.jsx index 2a665406f..8253f0a1a 100644 --- a/skyquake/plugins/launchpad/src/launchpad_card/jobListCard.jsx +++ b/skyquake/plugins/launchpad/src/launchpad_card/jobListCard.jsx @@ -18,6 +18,7 @@ import React from 'react'; import './jobListCard.scss' +import TreeView from 'react-treeview'; import Uptime from 'widgets/uptime/uptime.jsx'; import Modal from 'react-awesome-modal'; @@ -56,17 +57,31 @@ class JobListCard extends React.Component { } getJobDetails(job) { let jobDetails = null; - if (job['job-status-details']) { + if (job['job-status-details'] || job['execution-error-details']) { + let jobDetailsArray = []; + if (job['job-status-details']) { + jobDetailsArray = job['job-status-details'].split(/\\n/); + } else if (job['execution-error-details']) { + jobDetailsArray = job['execution-error-details'].split(/\\n/); + } + let jobDetailsText = []; + jobDetailsArray && jobDetailsArray.map((jobDetail) => { + jobDetailsText.push(jobDetail); + jobDetailsText.push(
); + }); jobDetails = (

Job Details

-
-
{job['job-status-details']}
+
+ Job Details} key={'job-details'} defaultCollapsed={false}> +

{jobDetailsText}

+

Close

@@ -130,6 +145,7 @@ class JobListCard extends React.Component { let self = this; let jobListStatus = this.getStatusColor(props['execution-status'] ); let hideParameters = this.state.hideParameters; + let jobDetailsHTML = this.getJobDetails(this.props); return (
@@ -159,6 +175,7 @@ class JobListCard extends React.Component {
+ {jobDetailsHTML} ) }