X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Flaunchpad%2Fsrc%2FrecordViewer%2FrecordCard.jsx;h=737ef701d7db6d9dde2ea7c0877db2242fc12639;hp=c928ffd0c2224605b6326117116678f6186d73d3;hb=573c1249edf74aa6cc50af1f92fd38832149d3eb;hpb=c2aa68e3412d966dc373822a22ec0a5843ae0c66 diff --git a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx index c928ffd0c..737ef701d 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,37 @@ 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('volumes') && (vdur.volumes.length > 0)) { + displayVolumesTab = true; + vdur.volumer.map((volume, vi) => { + // let html = Prism.highlight(JSON.stringify(volume), Prism.languages.javascript, 'javascript'); + // volumesHTML.push( + //
    +                //       
    +                //     
    + let properties = []; + _.forEach(volume, function(v, k) { + properties.push( +
    +
    {k}
    +
    {v}
    +
    + ) + }) + volumesHTML.push( +
    +
    + VOLUME +
    + + { + properties + } +
    + ) + }) + } }); consoleUrlsComponent = (
    @@ -343,6 +379,21 @@ export default class RecordCard extends React.Component { ) } + if (displayVolumesTab) { + + tabList.push( + Volumes + ); + + tabPanels.push( + + {volumesHTML} +
    +
    +
    + ) + } + html = (