<img src={circleXImage} title="Close card" />
</a>
);
- if (this.props.hasAccess) {
- closeButton = null;
- }
+
html = (
<DashboardCard className={'launchpadCard'} closeCard={closeButton}>
- <LaunchpadHeader nsr={this.props.nsr} name={this.props.name} isActive={this.props.isActive} id={this.props.id}/>
+ <LaunchpadHeader hasAccess={this.props.hasAccess} nsr={this.props.nsr} name={this.props.name} isActive={this.props.isActive} id={this.props.id}/>
{
deleting ?
<div className={'deletingIndicator'}>
</a>
</h3>
{toggleStatus}
- <h3 className="launchpadCard_header-link" style={{display: 'inherit'}}>
- <a onClick={this.deleteLaunchpad} title="Delete">
- <span className="oi" data-glyph="trash" aria-hidden="true"></span>
- </a>
- </h3>
+ {this.props.hasAccess ?
+ (
+ <h3 className="launchpadCard_header-link" style={{display: 'inherit'}}>
+ <a onClick={this.deleteLaunchpad} title="Delete">
+ <span className="oi" data-glyph="trash" aria-hidden="true"></span>
+ </a>
+ </h3>
+ )
+ : null}
</div>
</div>
<div className="launchpadCard_header-status">
/*
- *
+ *
* Copyright 2016 RIFT.IO Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
}
constructConfigPrimitiveTabs = (tabList, tabPanels) => {
let self = this;
+ const hasAccess = self.props.hasAccess;
let defaultFromRpc = '';
//coded here for dev purposes
let mandatoryFieldValue = 'true';
</div>
)
})}
- <Button label="Submit" isLoading={this.state.isSaving} onClick={this.handleExecuteClick.bind(this, nsConfigPrimitiveIndex)} className="dark"/>
+ {
+ hasAccess ?
+ <Button label="Submit" isLoading={this.state.isSaving} onClick={this.handleExecuteClick.bind(this, nsConfigPrimitiveIndex)} className="dark"/>
+ : null
+ }
</TabPanel>
)
);
if (displayConfigPrimitives) {
configPrimitiveComponent = (
<div className="flex nsConfigPrimitiveContainer">
- <NsrConfigPrimitives data={configPrimitivesProps} />
+ <NsrConfigPrimitives data={configPrimitivesProps} hasAccess={hasAccess} />
<div style={{display:'flex', flexDirection: 'column', flex: '1 1 40%'}}>
<div className="launchpadCard_title">
JOB LIST