X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=skyquake%2Fplugins%2Flaunchpad%2Fsrc%2FrecordViewer%2FrecordCard.jsx;h=69b4bbd98a468e66cc0875aac7fa18d7f965aca1;hb=bea72768204db1ffe569b06277623beb9dd231d6;hp=dc092bc9d7da4c454b1c65bcb68320de9f543ad2;hpb=5887e136dc63a909acba0e529dacf383df9061d7;p=osm%2FUI.git diff --git a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx index dc092bc9d..69b4bbd98 100644 --- a/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx +++ b/skyquake/plugins/launchpad/src/recordViewer/recordCard.jsx @@ -1,6 +1,6 @@ /* - * + * * Copyright 2016 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -32,6 +32,14 @@ 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'; + +import {SkyquakeRBAC, isRBACValid} from 'widgets/skyquake_rbac/skyquakeRBAC.jsx'; +import ROLES from 'utils/roleConstants.js'; + +const PROJECT_ROLES = ROLES.PROJECT; export default class RecordCard extends React.Component { constructor(props) { @@ -66,12 +74,15 @@ export default class RecordCard extends React.Component { let displayNSVirtualLinks = false; let nsVirtualLinksProps = {}; let nsVirtualLinksComponent = null; - + let displayVolumesTab = false; + let volumesHTML = []; let tabList = []; let tabPanels = []; let notice = null; + let hasAccess = isRBACValid(this.context.userProfile, [PROJECT_ROLES.LCM_ADMIN]); + switch(this.props.type) { case 'vnfr' : cardData = this.props.data[0]; @@ -81,7 +92,7 @@ export default class RecordCard extends React.Component { if (displayConfigPrimitives) { configPrimitiveComponent = (
+ //
+ //
+ function buildProperties(obj) {
+ let p = [];
+ _forEach(obj, function(v, k) {
+ p.push(
+