X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=skyquake%2Fplugins%2Flaunchpad%2Fsrc%2Fvirtual_links%2FnsVirtualLinks.jsx;h=aa4fe43cbbee56453fe249c39b74693eb18e2746;hb=03156e335275de1dafbc2a816e98006afdf249bf;hp=37cf0b3b7f4087e5195496db9fdc61f375190641;hpb=4ef8c40c2c013c21f5487330daeab2561ba25fb3;p=osm%2FUI.git diff --git a/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinks.jsx b/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinks.jsx index 37cf0b3b7..aa4fe43cb 100644 --- a/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinks.jsx +++ b/skyquake/plugins/launchpad/src/virtual_links/nsVirtualLinks.jsx @@ -1,5 +1,5 @@ /* - * + * * Copyright 2016 RIFT.IO Inc * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,11 +25,16 @@ import UpTime from 'widgets/uptime/uptime.jsx'; import NSVirtualLinkDetails from './nsVirtualLinkDetails.jsx'; import NSVirtualLinkCreate from './nsVirtualLinkCreate.jsx'; import SkyquakeComponent from 'widgets/skyquake_container/skyquakeComponent.jsx'; +import ROLES from 'utils/roleConstants.js'; +import {SkyquakeRBAC, isRBACValid} from 'widgets/skyquake_rbac/skyquakeRBAC.jsx'; + +const PROJECT_ROLES = ROLES.PROJECT; +const PLATFORM = ROLES.PLATFORM; class NsVirtualLinks extends React.Component { constructor(props) { super(props); - this.Store = this.props.flux.stores.hasOwnProperty('NSVirtualLinkCreateStore') ? + this.Store = this.props.flux.stores.hasOwnProperty('NSVirtualLinkCreateStore') ? this.props.flux.stores.NSVirtualLinkCreateStore : this.props.flux.createStore(NSVirtualLinkCreateStore, 'NSVirtualLinkCreateStore'); this.state = {}; this.state.mode = 'viewing'; // Can be 'viewing'/'creating'/'editing'/'deleting'. Default is 'viewing' @@ -59,7 +64,7 @@ class NsVirtualLinks extends React.Component { if (!this.state.nsd) { this.setState({ nsd: this.props.data.nsd - }); + }); } if (!this.state.nsrId) { @@ -78,7 +83,7 @@ class NsVirtualLinks extends React.Component { if (!this.state.nsd) { this.setState({ nsd: nextProps.data.nsd - }); + }); } if (!this.state.nsrId) { @@ -149,14 +154,18 @@ class NsVirtualLinks extends React.Component {