RIFT-16840: VNF config-primitive job does not contain details
authorKIRAN KASHALKAR <kiran.kashalkar@riftio.com>
Wed, 31 May 2017 16:00:48 +0000 (12:00 -0400)
committerKIRAN KASHALKAR <kiran.kashalkar@riftio.com>
Wed, 31 May 2017 16:00:48 +0000 (12:00 -0400)
Signed-off-by: KIRAN KASHALKAR <kiran.kashalkar@riftio.com>
skyquake/plugins/launchpad/src/launchpad_card/jobListCard.jsx

index 5cdcb85..8253f0a 100644 (file)
@@ -57,8 +57,13 @@ class JobListCard extends React.Component {
     }
     getJobDetails(job) {
         let jobDetails = null;
-        if (job['job-status-details']) {
-            let jobDetailsArray = job['job-status-details'].split(/\\n/);
+        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);
@@ -140,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 (
             <div className="jobListCard">
                 <div className="jobListCard--header">
@@ -169,6 +175,7 @@ class JobListCard extends React.Component {
                         </div>
                     </div>
                 </div>
+                {jobDetailsHTML}
             </div>
         )
     }