1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/web/ synced 2025-03-09 00:00:01 +01:00

rename visible parts: simulator=infrastructure component, simulation model=component configuration #213

This commit is contained in:
Sonja Happ 2020-03-05 15:10:28 +01:00
parent 43f8ab4332
commit 868553cae4
9 changed files with 22 additions and 22 deletions

View file

@ -34,7 +34,7 @@ class SidebarMenu extends React.Component {
<ul>
<li><NavLink to="/home" activeClassName="active" title="Home">Home</NavLink></li>
<li><NavLink to="/scenarios" activeClassName="active" title="Scenarios">Scenarios</NavLink></li>
<li><NavLink to="/simulators" activeClassName="active" title="Simulators">Simulators</NavLink></li>
<li><NavLink to="/simulators" activeClassName="active" title="Infrastructure Components">Infrastructure Components</NavLink></li>
{ this.props.currentRole === 'Admin' ?
<li><NavLink to="/users" activeClassName="active" title="User Management">User Management</NavLink></li> : ''
}

View file

@ -408,12 +408,12 @@ class Scenario extends React.Component {
return <div className='section'>
<h1>{this.state.scenario.name}</h1>
{/*Simulation Model table*/}
<h2>Simulation Models</h2>
{/*Component Configurations table*/}
<h2>Component Configurations</h2>
<Table data={this.state.simulationModels}>
<TableColumn checkbox onChecked={(index, event) => this.onSimulationModelChecked(index, event)} width='30' />
<TableColumn title='Name' dataKey='name' />
<TableColumn title='Selected model file' dataKey='selectedModelFileID' modifier={(selectedModelFileID) => this.getFileName(selectedModelFileID)}/>
<TableColumn title='Selected configuration file' dataKey='selectedModelFileID' modifier={(selectedModelFileID) => this.getFileName(selectedModelFileID)}/>
<TableColumn
title='# Output Signals'
dataKey='outputLength'
@ -426,7 +426,7 @@ class Scenario extends React.Component {
editButton
onEdit={index => this.setState({ editInputSignalsModal: true, modalSimulationModelData: this.state.simulationModels[index], modalSimulationModelIndex: index })}
/>
<TableColumn title='Simulator' dataKey='simulatorID' modifier={(simulatorID) => this.getSimulatorName(simulatorID)} />
<TableColumn title='Infrastructure Component' dataKey='simulatorID' modifier={(simulatorID) => this.getSimulatorName(simulatorID)} />
<TableColumn
title='Edit/ Delete/ Export'
width='200'
@ -460,7 +460,7 @@ class Scenario extends React.Component {
<EditSimulationModelDialog show={this.state.editSimulationModelModal} onClose={data => this.closeEditSimulationModelModal(data)} simulationModel={this.state.modalSimulationModelData} simulators={this.state.simulators} />
<ImportSimulationModelDialog show={this.state.importSimulationModelModal} onClose={data => this.importSimulationModel(data)} simulators={this.state.simulators} />
<DeleteDialog title="simulation model" name={this.state.modalSimulationModelData.name} show={this.state.deleteSimulationModelModal} onClose={(c) => this.closeDeleteSimulationModelModal(c)} />
<DeleteDialog title="component configuration" name={this.state.modalSimulationModelData.name} show={this.state.deleteSimulationModelModal} onClose={(c) => this.closeDeleteSimulationModelModal(c)} />
<EditSignalMapping
show={this.state.editOutputSignalsModal}

View file

@ -82,7 +82,7 @@ class EditSimulationModelDialog extends React.Component {
}
handleSelectedModelFileChange(newFileID){
console.log("Model file change to: ", newFileID);
console.log("Config file change to: ", newFileID);
this.setState({selectedModelFileID: newFileID})
this.valid = this.isValid()
@ -108,7 +108,7 @@ class EditSimulationModelDialog extends React.Component {
);
return (
<Dialog show={this.props.show} title="Edit Simulation Model" buttonTitle="Save" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
<Dialog show={this.props.show} title="Edit Component Configuration" buttonTitle="Save" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
<form>
<FormGroup controlId="name">
<FormLabel column={false}>Name</FormLabel>
@ -118,13 +118,13 @@ class EditSimulationModelDialog extends React.Component {
<FormGroup controlId="simulatorID">
<FormLabel column={false}> Simulator </FormLabel>
<FormControl as="select" placeholder='Select simulator' value={this.state.simulatorID} onChange={(e) => this.handleChange(e)}>
<FormControl as="select" placeholder='Select infrastructure component' value={this.state.simulatorID} onChange={(e) => this.handleChange(e)}>
{simulatorOptions}
</FormControl>
</FormGroup>
<SelectFile type='model' name='Simulation Model File' onChange={(e) => this.handleSelectedModelFileChange(e)} value={this.state.selectedModelFileID} objectID={this.props.simulationModel.id}/>
<SelectFile type='model' name='Configuration File' onChange={(e) => this.handleSelectedModelFileChange(e)} value={this.state.selectedModelFileID} objectID={this.props.simulationModel.id}/>
{/*<SelectFile type='configuration' name='Configuration' onChange={(e) => this.handleChange(e)} value={this.state.configuration} />*/}

View file

@ -88,16 +88,16 @@ class ImportSimulationModelDialog extends React.Component {
render() {
return (
<Dialog show={this.props.show} title="Import Simulation Model" buttonTitle="Import" onClose={(c) => this.onClose(c)} onReset={this.resetState} valid={this.imported}>
<Dialog show={this.props.show} title="Import Component Configuration" buttonTitle="Import" onClose={(c) => this.onClose(c)} onReset={this.resetState} valid={this.imported}>
<form>
<FormGroup controlId='file'>
<FormLabel>Simulation Model File</FormLabel>
<FormLabel>Component Configuration File</FormLabel>
<FormControl type='file' onChange={this.loadFile} />
</FormGroup>
<FormGroup controlId='simulator'>
<FormLabel>Simulator</FormLabel>
<FormControl disabled={this.imported === false} as='select' placeholder='Select simulator' value={this.state.model.simulator} onChange={this.handleSimulatorChange}>
<FormLabel>Infrastructure Component</FormLabel>
<FormControl disabled={this.imported === false} as='select' placeholder='Select infrastructure component' value={this.state.model.simulator} onChange={this.handleSimulatorChange}>
{this.props.simulators.map(simulator => (
<option key={simulator.id} value={simulator.id}>{_.get(simulator, 'properties.name') || _.get(simulator, 'rawProperties.name')}</option>
))}

View file

@ -68,7 +68,7 @@ class EditSimulatorDialog extends React.Component {
render() {
return (
<Dialog show={this.props.show} title="Edit Simulator" buttonTitle="Save" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
<Dialog show={this.props.show} title="Edit Infrastructure Component" buttonTitle="Save" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
<form>
<FormGroup controlId="name">
<FormLabel column={false}>Name</FormLabel>

View file

@ -115,10 +115,10 @@ class ImportSimulatorDialog extends React.Component {
render() {
return (
<Dialog show={this.props.show} title="New Simulator" buttonTitle="Add" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
<Dialog show={this.props.show} title="Import Infrastructure Component" buttonTitle="Add" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
<form>
<FormGroup controlId="file">
<FormLabel>Simulator File</FormLabel>
<FormLabel>Infrastructure Component File</FormLabel>
<FormControl type="file" onChange={(e) => this.loadFile(e.target.files)} />
</FormGroup>

View file

@ -96,7 +96,7 @@ class NewSimulatorDialog extends React.Component {
render() {
return (
<Dialog show={this.props.show} title="New Simulator" buttonTitle="Add" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
<Dialog show={this.props.show} title="New Infrastructure Component" buttonTitle="Add" onClose={(c) => this.onClose(c)} onReset={() => this.resetState()} valid={this.valid}>
<form>
<FormGroup controlId="name" validationState={this.validateForm('name')}>
<FormLabel>Name</FormLabel>

View file

@ -272,7 +272,7 @@ class Simulators extends Component {
return (
<div className='section'>
<h1>Simulators</h1>
<h1>Infrastructure Components</h1>
<Table data={this.state.simulators}>
<TableColumn checkbox onChecked={(index, event) => this.onSimulatorChecked(index, event)} width='30' />
@ -303,7 +303,7 @@ class Simulators extends Component {
</div>
<div style={{ float: 'right' }}>
<Button onClick={() => this.setState({ newModal: true })} style={buttonStyle}><Icon icon="plus" /> Simulator</Button>
<Button onClick={() => this.setState({ newModal: true })} style={buttonStyle}><Icon icon="plus" /> Infrastructure Component</Button>
<Button onClick={() => this.setState({ importModal: true })} style={buttonStyle}><Icon icon="upload" /> Import</Button>
</div>

View file

@ -112,7 +112,7 @@ body {
@media (min-width: 768px) {
.app-content-margin-left {
margin-left: 200px !important;
margin-left: 275px !important;
}
}
@ -122,7 +122,7 @@ body {
.menu-sidebar {
/*display: inline-table;*/
padding: 20px 25px 20px 25px;
width: 180px;
width: 250px;
float: left;
background-color: #fff;