mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
Revert "WIP: add one-shot triggering system for plots #203"
This reverts commit c8e4e42589
.
This commit is contained in:
parent
c8e4e42589
commit
74c8c59abb
3 changed files with 1 additions and 60 deletions
|
@ -33,7 +33,6 @@ import EditWidgetMinMaxControl from './edit-widget-min-max-control';
|
|||
import EditWidgetParametersControl from './edit-widget-parameters-control';
|
||||
import EditWidgetICControl from './edit-widget-ic-control';
|
||||
import EditWidgetPlotColorsControl from './edit-widget-plot-colors-control';
|
||||
import EditWidgetPlotModeControl from './edit-widget-plot-mode-control';
|
||||
//import EditWidgetHTMLContent from './edit-widget-html-content';
|
||||
|
||||
export default function CreateControls(widgetType = null, widget = null, sessionToken = null, files = null,ics = null, signals, handleChange) {
|
||||
|
@ -76,8 +75,7 @@ export default function CreateControls(widgetType = null, widget = null, session
|
|||
<EditWidgetPlotColorsControl key={2} widget={widget} controlId={'customProperties.lineColors'} signals={signals} handleChange={(e) => handleChange(e)} />,
|
||||
<EditWidgetTextControl key={3} widget={widget} controlId={'customProperties.ylabel'} label={'Y-Axis name'} placeholder={'Enter a name for the y-axis'} handleChange={(e) => handleChange(e)} />,
|
||||
<EditWidgetCheckboxControl key={4} widget={widget} controlId={'customProperties.showUnit'} input text="Show unit" handleChange={e => handleChange(e)} />,
|
||||
<EditWidgetPlotModeControl key={5} widget={widget} controlId={'customProperties.mode'} input handleChange={e => handleChange(e)} />,
|
||||
<EditWidgetMinMaxControl key={6} widget={widget} controlId="customProperties.y" handleChange={e => handleChange(e)} />
|
||||
<EditWidgetMinMaxControl key={5} widget={widget} controlId="customProperties.y" handleChange={e => handleChange(e)} />
|
||||
);
|
||||
break;
|
||||
case 'Table':
|
||||
|
|
|
@ -1,56 +0,0 @@
|
|||
/**
|
||||
* This file is part of VILLASweb.
|
||||
*
|
||||
* VILLASweb is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* VILLASweb is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with VILLASweb. If not, see <http://www.gnu.org/licenses/>.
|
||||
**********************************************************************************/
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { Form } from 'react-bootstrap';
|
||||
|
||||
class EditWidgetPlotModeControl extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
widget: {},
|
||||
};
|
||||
}
|
||||
|
||||
static getDerivedStateFromProps(props, state){
|
||||
return {
|
||||
widget: props.widget,
|
||||
};
|
||||
}
|
||||
|
||||
handleModeChange(e){
|
||||
|
||||
this.props.handleChange({ target: { id: this.props.controlId, value: e.target.value } });
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
return (
|
||||
<Form.Group controlId="mode">
|
||||
<Form.Label>Select mode</Form.Label>
|
||||
<Form.Control as="select" value={this.props.widget.customProperties.mode || ""} onChange={(e) => this.handleModeChange(e)}>
|
||||
<option key={0} value={"auto time-scrolling"}>Auto time-scrolling</option>
|
||||
<option key={1} value={"last samples"}>Last samples</option>
|
||||
</Form.Control>
|
||||
</Form.Group>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default EditWidgetPlotModeControl;
|
|
@ -91,7 +91,6 @@ class WidgetFactory {
|
|||
widget.customProperties.yUseMinMax = false;
|
||||
widget.customProperties.lineColors = [];
|
||||
widget.customProperties.showUnit = false;
|
||||
widget.customProperties.mode = 'auto time-scrolling';
|
||||
break;
|
||||
case 'Table':
|
||||
widget.minWidth = 200;
|
||||
|
|
Loading…
Add table
Reference in a new issue