From: Laurence Maultsby Date: Tue, 11 Oct 2016 14:32:14 +0000 (-0400) Subject: RIFT-14831: duplicate job status times on create fix X-Git-Tag: v1.0.1~10^2~15 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F36%2F536%2F1;p=osm%2FUI.git RIFT-14831: duplicate job status times on create fix Signed-off-by: Laurence Maultsby --- diff --git a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx index 2b572e932..c928ffd0c 100644 --- a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx +++ b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx @@ -90,16 +90,18 @@ export default class RecordCard extends React.Component {
{ //Sort for recent on top - this.props.jobData.sort(function(a,b){ + this.props.jobData + .sort(function(a,b){ return parseInt(b['job-id']) - parseInt(a['job-id']); - }).map(function(job){ + }) + .map(function(job){ //Return only vnfr configs if(job["triggered-by"] == 'vnf-primitive') { return job.vnfr.map(function(v){ //That match the currently selected job id if(v.id == cardData.id) { return v.primitive.map(function(p, i) { - return + return }) } }) @@ -157,16 +159,16 @@ export default class RecordCard extends React.Component {
{sortedJobs.map(function(job, i){ if(job["triggered-by"] == 'ns-primitive') { - return + return } }) .concat(sortedJobs.map(function(job) { if(!job.hasOwnProperty('job-name') && (job["triggered-by"] == 'ns-primitive')) { - return job.vnfr.map(function(v){ + return job.vnfr.map(function(v, h){ //That match the currently selected job id if(v.id == cardData.id) { return v.primitive.map(function(p, i) { - return + return }) } })