From: Laurence Maultsby Date: Mon, 17 Oct 2016 11:38:36 +0000 (-0400) Subject: RIFT-14850: UI support for displaying of volumes X-Git-Tag: v1.1.0~37 X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=commitdiff_plain;h=23b52a272f8520ebac6391e72d5f8576152db8cb RIFT-14850: UI support for displaying of volumes Signed-off-by: Laurence Maultsby --- diff --git a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx index c928ffd0c..41f70073d 100644 --- a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx +++ b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx @@ -33,6 +33,10 @@ import JobListCard from '../launchpad_card/jobListCard.jsx'; import NSVirtualLinks from '../virtual_links/nsVirtualLinks.jsx'; import LaunchpadFleetStore from '../launchpadFleetStore.js'; +import Prism from 'prismjs'; +import 'prismjs/themes/prism.css'; + + export default class RecordCard extends React.Component { constructor(props) { super(props) @@ -66,7 +70,8 @@ export default class RecordCard extends React.Component { let displayNSVirtualLinks = false; let nsVirtualLinksProps = {}; let nsVirtualLinksComponent = null; - + let displayVolumesTab = false; + let volumesHTML = []; let tabList = []; let tabPanels = []; @@ -127,6 +132,17 @@ export default class RecordCard extends React.Component { ) notice =
  • * If a separate browser window does not open, please check if the popup was blocked and allow it.
  • + if(vdur.hasOwnProperty('volumer') && (vdur.volumer.length > 0)) { + displayVolumesTab = true; + vdur.volumer.map((volume, vi) => { + let html = Prism.highlight(JSON.stringify(volume), Prism.languages.javascript, 'javascript'); + volumesHTML.push( +
    +                      
    +                    
    + ) + }) + } }); consoleUrlsComponent = (
    @@ -343,6 +359,21 @@ export default class RecordCard extends React.Component { ) } + if (displayVolumesTab) { + + tabList.push( + Volumes + ); + + tabPanels.push( + + {volumesHTML} +
    +
    +
    + ) + } + html = (