X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Flaunchpad%2Fsrc%2FrecordViewer%2FrecordCard.jsx;h=f9a400b8676fca2ae7c33513763b3ad56751f6a1;hp=a577706297e12373a2407f87973b1a0aaa4a2b6c;hb=b198311b2a8fd6593777d7c76d7fe66538d47431;hpb=579ee20c3c320cbf361f5fd52575a4e939bb7159 diff --git a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx index a57770629..f9a400b86 100644 --- a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx +++ b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx @@ -32,7 +32,7 @@ import PlacementGroupsInfo from './placementGroupsInfo.jsx'; import JobListCard from '../launchpad_card/jobListCard.jsx'; import NSVirtualLinks from '../virtual_links/nsVirtualLinks.jsx'; import LaunchpadFleetStore from '../launchpadFleetStore.js'; - +import _forEach from 'lodash/forEach'; import Prism from 'prismjs'; import 'prismjs/themes/prism.css'; @@ -106,7 +106,7 @@ export default class RecordCard extends React.Component { //That match the currently selected job id if(v.id == cardData.id) { return v.primitive.map(function(p, i) { - return + return }) } }) @@ -135,11 +135,35 @@ export default class RecordCard extends React.Component { if(vdur.hasOwnProperty('volumes') && (vdur.volumes.length > 0)) { displayVolumesTab = true; vdur.volumes.map((volume, vi) => { - let html = Prism.highlight(JSON.stringify(volume), Prism.languages.javascript, 'javascript'); + // let html = Prism.highlight(JSON.stringify(volume), Prism.languages.javascript, 'javascript'); + // volumesHTML.push( + //
+                //       
+                //     
+ function buildProperties(obj) { + let p = []; + _forEach(obj, function(v, k) { + p.push( +
+
{k}
+
{(v.constructor.name == 'String' || v.constructor.name == 'Number') ? v : buildProperties(v)}
+
+ ) + }); + return p; + } volumesHTML.push( -
-                      
-                    
+
+
+ VOLUME +
+
+ { + buildProperties(volume) + } +
+
) }) } @@ -184,7 +208,7 @@ export default class RecordCard extends React.Component { //That match the currently selected job id if(v.id == cardData.id) { return v.primitive.map(function(p, i) { - return + return }) } }) @@ -242,7 +266,7 @@ export default class RecordCard extends React.Component { if(this.props.isLoading) { html = } else { - let glyphValue = (this.props.mmmrecordDetailsToggleValue) ? "chevron-left" : "chevron-right"; + let glyphValue = (!this.props.recordDetailsToggleValue) ? "chevron-left" : "chevron-right"; if (this.props.type == 'nsr') { tabList.push( @@ -345,11 +369,11 @@ export default class RecordCard extends React.Component { consoleUrlsTabTitle = 'VDU Console Links'; tabList.push( - {consoleUrlsTabTitle} + {consoleUrlsTabTitle} ); tabPanels.push( - +
{consoleUrlsComponent}