From 23b52a272f8520ebac6391e72d5f8576152db8cb Mon Sep 17 00:00:00 2001 From: Laurence Maultsby Date: Mon, 17 Oct 2016 07:38:36 -0400 Subject: [PATCH] RIFT-14850: UI support for displaying of volumes Signed-off-by: Laurence Maultsby --- .../launchpad/src/recordViewer/recordCard.jsx | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) 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 = ( -- 2.25.1