mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
Merge branch 'master' into feature-whitelabel
This commit is contained in:
commit
8d1322795c
13 changed files with 43 additions and 28 deletions
|
@ -43,9 +43,9 @@ class IconButton extends React.Component {
|
|||
button = btn;
|
||||
} else {
|
||||
button = <OverlayTrigger
|
||||
key={this.props.ikey}
|
||||
key={this.props.childKey}
|
||||
placement={this.props.tipPlacement ? this.props.tipPlacement : 'top'}
|
||||
overlay={<Tooltip id={`tooltip-${this.props.ikey}`}>{this.props.tooltip}</Tooltip>} >
|
||||
overlay={<Tooltip id={`tooltip-${this.props.childKey}`}>{this.props.tooltip}</Tooltip>} >
|
||||
{btn}
|
||||
</OverlayTrigger>
|
||||
}
|
||||
|
|
|
@ -28,9 +28,9 @@ class IconToggleButton extends React.Component {
|
|||
let tooltip = this.props.checked ? this.props.tooltipChecked : this.props.tooltipUnchecked;
|
||||
|
||||
return <OverlayTrigger
|
||||
key={this.props.ikey}
|
||||
key={this.props.childKey}
|
||||
placement={'top'}
|
||||
overlay={<Tooltip id={`tooltip-${this.props.ikey}`}>{tooltip}</Tooltip>} >
|
||||
overlay={<Tooltip id={`tooltip-${this.props.childKey}`}>{tooltip}</Tooltip>} >
|
||||
<ButtonGroup toggle>
|
||||
<ToggleButton
|
||||
variant={this.props.variant ? this.props.variant : 'light'}
|
||||
|
|
|
@ -140,7 +140,7 @@ class CustomTable extends Component {
|
|||
cell.push(
|
||||
<IconButton
|
||||
key={childkey++}
|
||||
ikey={childkey++}
|
||||
childKey={childkey++}
|
||||
icon={'edit'}
|
||||
disabled={child.props.onEdit == null || isLocked}
|
||||
hidetooltip={isLocked}
|
||||
|
@ -171,7 +171,7 @@ class CustomTable extends Component {
|
|||
if (child.props.lockButton) {
|
||||
cell.push(
|
||||
<IconToggleButton
|
||||
ikey={childkey++}
|
||||
childKey={childkey++}
|
||||
onChange={() => child.props.onChangeLock(index)}
|
||||
checked={isLocked}
|
||||
checkedIcon='lock'
|
||||
|
@ -188,7 +188,7 @@ class CustomTable extends Component {
|
|||
cell.push(
|
||||
<IconButton
|
||||
key={childkey++}
|
||||
ikey={childkey++}
|
||||
childKey={childkey++}
|
||||
icon={'download'}
|
||||
disabled={child.props.onExport == null}
|
||||
tooltip={"Export"}
|
||||
|
@ -202,7 +202,7 @@ class CustomTable extends Component {
|
|||
cell.push(
|
||||
<IconButton
|
||||
key={childkey++}
|
||||
ikey={childkey++}
|
||||
childKey={childkey++}
|
||||
icon={'wave-square'}
|
||||
disabled={child.props.onAutoConf == null || child.props.locked }
|
||||
hidetooltip={isLocked}
|
||||
|
@ -217,7 +217,7 @@ class CustomTable extends Component {
|
|||
cell.push(
|
||||
<IconButton
|
||||
key={childkey++}
|
||||
ikey={childkey++}
|
||||
childKey={childkey++}
|
||||
icon={'copy'}
|
||||
disabled={child.props.onDuplicate == null || child.props.locked}
|
||||
hidetooltip={isLocked}
|
||||
|
@ -232,7 +232,7 @@ class CustomTable extends Component {
|
|||
cell.push(
|
||||
<IconButton
|
||||
key={childkey++}
|
||||
ikey={childkey++}
|
||||
childKey={childkey++}
|
||||
icon={'file'}
|
||||
disabled={child.props.onAddRemove == null || isLocked}
|
||||
hidetooltip={isLocked}
|
||||
|
@ -247,7 +247,7 @@ class CustomTable extends Component {
|
|||
cell.push(
|
||||
<IconButton
|
||||
key={childkey++}
|
||||
ikey={childkey++}
|
||||
childKey={childkey++}
|
||||
icon={'file-download'}
|
||||
disabled={child.props.onDownloadAll == null}
|
||||
tooltip={"Download All Files"}
|
||||
|
@ -265,7 +265,7 @@ class CustomTable extends Component {
|
|||
cell.push(
|
||||
<IconButton
|
||||
key={childkey++}
|
||||
ikey={childkey++}
|
||||
childKey={childkey++}
|
||||
icon={'trash'}
|
||||
disabled={child.props.onDelete == null || isLocked}
|
||||
hidetooltip={isLocked}
|
||||
|
|
|
@ -313,7 +313,7 @@ class ConfigTable extends Component {
|
|||
<h2 style={this.props.tableHeadingStyle}>Component Configurations
|
||||
<span className='icon-button'>
|
||||
<IconButton
|
||||
ikey={0}
|
||||
childKey={0}
|
||||
tooltip='Add Component Configuration'
|
||||
onClick={() => this.addConfig()}
|
||||
icon='plus'
|
||||
|
@ -323,7 +323,7 @@ class ConfigTable extends Component {
|
|||
iconStyle={iconStyle}
|
||||
/>
|
||||
<IconButton
|
||||
ikey={1}
|
||||
childKey={1}
|
||||
tooltip='Import Component Configuration'
|
||||
onClick={() => this.setState({ importConfigModal: true })}
|
||||
icon='upload'
|
||||
|
|
|
@ -38,7 +38,7 @@ class DashboardButtonGroup extends React.Component {
|
|||
if (locked) {
|
||||
return <IconButton
|
||||
key={buttonkey++}
|
||||
ikey={buttonkey}
|
||||
childKey={buttonkey}
|
||||
icon={icon}
|
||||
disabled={true}
|
||||
hidetooltip={true}
|
||||
|
@ -51,7 +51,7 @@ class DashboardButtonGroup extends React.Component {
|
|||
} else {
|
||||
return <IconButton
|
||||
key={buttonkey++}
|
||||
ikey={buttonkey}
|
||||
childKey={buttonkey}
|
||||
icon={icon}
|
||||
tooltip={tooltip}
|
||||
tipPlacement={'bottom'}
|
||||
|
|
|
@ -152,7 +152,7 @@ class DashboardTable extends Component {
|
|||
<h2 style={this.props.tableHeadingStyle}>Dashboards
|
||||
<span className='icon-button'>
|
||||
<IconButton
|
||||
ikey={0}
|
||||
childKey={0}
|
||||
tooltip='Add Dashboard'
|
||||
onClick={() => this.setState({newDashboardModal: true})}
|
||||
icon='plus'
|
||||
|
@ -162,7 +162,7 @@ class DashboardTable extends Component {
|
|||
iconStyle={iconStyle}
|
||||
/>
|
||||
<IconButton
|
||||
ikey={1}
|
||||
childKey={1}
|
||||
tooltip='Import Dashboard'
|
||||
onClick={() => this.setState({importDashboardModal: true})}
|
||||
icon='upload'
|
||||
|
|
|
@ -518,7 +518,7 @@ class Dashboard extends Component {
|
|||
{this.state.dashboard.name}
|
||||
<span className='icon-button'>
|
||||
<IconToggleButton
|
||||
ikey={0}
|
||||
childKey={0}
|
||||
checked={this.state.locked}
|
||||
checkedIcon='lock'
|
||||
uncheckedIcon='lock-open'
|
||||
|
|
|
@ -472,16 +472,20 @@ class InfrastructureComponents extends Component {
|
|||
{this.state.currentUser.role === "Admin" ?
|
||||
<span className='icon-button'>
|
||||
<IconButton
|
||||
ikey={1}
|
||||
childKey={1}
|
||||
tooltip='Add Infrastructure Component'
|
||||
onClick={() => this.setState({newModal: true})}
|
||||
icon='plus'
|
||||
buttonStyle={buttonStyle}
|
||||
iconStyle={iconStyle}
|
||||
/>
|
||||
<IconButton
|
||||
ikey={1}
|
||||
childKey={1}
|
||||
tooltip='Import Infrastructure Component'
|
||||
onClick={() => this.setState({importModal: true})}
|
||||
icon='upload'
|
||||
buttonStyle={buttonStyle}
|
||||
iconStyle={iconStyle}
|
||||
/>
|
||||
</span>
|
||||
: <span/>
|
||||
|
|
|
@ -169,7 +169,7 @@ class ResultTable extends Component {
|
|||
<h2 style={this.props.tableHeadingStyle}>Results
|
||||
<span className='icon-button'>
|
||||
<IconButton
|
||||
ikey={1}
|
||||
childKey={1}
|
||||
tooltip='Add Result'
|
||||
onClick={() => this.setState({ newResultModal: true })}
|
||||
icon='plus'
|
||||
|
|
|
@ -134,7 +134,7 @@ class ScenarioUsersTable extends Component {
|
|||
<InputGroup.Append>
|
||||
<span className='icon-button'>
|
||||
<IconButton
|
||||
ikey={1}
|
||||
childKey={1}
|
||||
tooltip='Add User to Scenario'
|
||||
onClick={() => this.addUser()}
|
||||
icon='plus'
|
||||
|
|
|
@ -154,7 +154,7 @@ class Scenario extends React.Component {
|
|||
return <div className='section'>
|
||||
<div className='section-buttons-group-right'>
|
||||
<IconButton
|
||||
ikey="0"
|
||||
childKey="0"
|
||||
tooltip={tooltip}
|
||||
onClick={this.onEditFiles.bind(this)}
|
||||
icon="file"
|
||||
|
@ -166,7 +166,7 @@ class Scenario extends React.Component {
|
|||
{this.state.scenario.name}
|
||||
<span className='icon-button'>
|
||||
<IconToggleButton
|
||||
ikey={0}
|
||||
childKey={0}
|
||||
onChange={() => this.onChangeLock()}
|
||||
checked={this.state.scenario.isLocked}
|
||||
checkedIcon='lock'
|
||||
|
|
|
@ -257,7 +257,7 @@ class Scenarios extends Component {
|
|||
<h1>Scenarios
|
||||
<span className='icon-button'>
|
||||
<IconButton
|
||||
ikey={0}
|
||||
childKey={0}
|
||||
tooltip='Add Scenario'
|
||||
onClick={() => this.setState({ newModal: true })}
|
||||
icon='plus'
|
||||
|
@ -265,7 +265,7 @@ class Scenarios extends Component {
|
|||
iconStyle={iconStyle}
|
||||
/>
|
||||
<IconButton
|
||||
ikey={1}
|
||||
childKey={1}
|
||||
tooltip='Import Scenario'
|
||||
onClick={() => this.setState({ importModal: true })}
|
||||
icon='upload'
|
||||
|
|
|
@ -115,14 +115,25 @@ class Users extends Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const buttonStyle = {
|
||||
marginLeft: '10px',
|
||||
}
|
||||
|
||||
const iconStyle = {
|
||||
height: '30px',
|
||||
width: '30px'
|
||||
}
|
||||
|
||||
return <div>
|
||||
<h1>Users
|
||||
<span className='icon-button'>
|
||||
<IconButton
|
||||
ikey={0}
|
||||
childKey={0}
|
||||
tooltip='Add User'
|
||||
onClick={() => this.setState({ newModal: true })}
|
||||
icon='plus'
|
||||
buttonStyle={buttonStyle}
|
||||
iconStyle={iconStyle}
|
||||
/>
|
||||
</span>
|
||||
</h1>
|
||||
|
|
Loading…
Add table
Reference in a new issue