mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-30 00:00:13 +01:00
110 lines
3.2 KiB
Handlebars
110 lines
3.2 KiB
Handlebars
<h4>{{widget.name}}</h4>
|
|
|
|
{{#if (eq plotType "table")}}
|
|
<table class="widgetPlot-signal-table" style="float: left; width: 150px;">
|
|
<tr>
|
|
<th>
|
|
Signal
|
|
</th>
|
|
</tr>
|
|
{{#each simulationModel.mapping as |signal|}}
|
|
<tr>
|
|
<td>
|
|
{{#if (eq signal selectedSignal)}}
|
|
<b>
|
|
<a href="" {{action "selectTableSignal" signal}}>{{signal}}</a>
|
|
</b>
|
|
{{else}}
|
|
<a href="" {{action "selectTableSignal" signal}}>{{signal}}</a>
|
|
{{/if}}
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</table>
|
|
|
|
<div style="height: 100%; margin-left: 200px;">
|
|
{{flow-plot data=plotData options=plotOptions}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if (eq plotType "multiple")}}
|
|
{{flow-plot data=plotData options=plotOptions}}
|
|
{{/if}}
|
|
|
|
{{#if isShowingModal}}
|
|
{{#modal-dialog attachment="middle center" translucentOverlay=true}}
|
|
<h1>Plot</h1>
|
|
|
|
<form class="form-widget-plot" {{action 'submitModal' on='submit'}} >
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<label for="name">Name</label>
|
|
</td>
|
|
<td>
|
|
{{input id='name' placeholder='Enter widget name' value=name}}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="simulator">Simulator</label>
|
|
</td>
|
|
<td>
|
|
<select onchange={{action "selectSimulationModel" value="target.value"}} >
|
|
{{#each widget.visualization.project.simulation.models as |simulationModel|}}
|
|
<option value={{simulationModel.name}} selected={{eq simulationModelName simulationModel.name}}>{{simulationModel.name}}</option>
|
|
{{/each}}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="time">Time in sec</label>
|
|
</td>
|
|
<td>
|
|
{{input type='number' id='time' placeholder='Enter time length' value=time}}
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="type">Type</label>
|
|
</td>
|
|
<td>
|
|
<select onchange={{action "selectType" value="target.value"}} >
|
|
<option value="multiple" selected={{eq plotType "multiple"}}>Multiple</option>
|
|
<option value="table" selected={{eq plotType "table"}}>Table</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
{{#if (eq plotType "multiple")}}
|
|
<tr>
|
|
<td>
|
|
<label for="signals">Signals</label>
|
|
</td>
|
|
<td>
|
|
{{#each simulationModel.mapping as |signal|}}
|
|
{{input type='checkbox' name=signal checked=(mut (get checkedSignals signal))}}<label for={{signal}}> {{signal}}</label>
|
|
<br />
|
|
{{/each}}
|
|
</td>
|
|
</tr>
|
|
{{/if}}
|
|
|
|
{{#if (eq plotType "table")}}
|
|
|
|
{{/if}}
|
|
<tr>
|
|
<td colspan="2">
|
|
<button {{action 'cancelModal'}}>Cancel</button>
|
|
<button type="submit">Save</button>
|
|
<button {{action 'deleteModal'}}>Delete</button>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
|
|
{{#if errorMessage}}
|
|
<p><b>Error:</b> {{errorMessage}}</p>
|
|
{{/if}}
|
|
{{/modal-dialog}}
|
|
{{/if}}
|