From 0e7ce1aff064a6753557dca5a32dc107e1d1e1c1 Mon Sep 17 00:00:00 2001 From: Ricardo Hernandez-Montoya Date: Tue, 23 May 2017 10:57:28 +0200 Subject: [PATCH] removed unused js module --- .../dialog/edit-widget-signal-type-control.js | 64 ------------------- 1 file changed, 64 deletions(-) delete mode 100644 src/components/dialog/edit-widget-signal-type-control.js diff --git a/src/components/dialog/edit-widget-signal-type-control.js b/src/components/dialog/edit-widget-signal-type-control.js deleted file mode 100644 index 8978186..0000000 --- a/src/components/dialog/edit-widget-signal-type-control.js +++ /dev/null @@ -1,64 +0,0 @@ -/** - * File: edit-widget-signal-type-control.js - * Author: Ricardo Hernandez-Montoya - * Date: 03.04.2017 - * Copyright: 2017, Institute for Automation of Complex Power Systems, EONERC - * This file is part of VILLASweb. All Rights Reserved. Proprietary and confidential. - * Unauthorized copying of this file, via any medium is strictly prohibited. - **********************************************************************************/ - -import React, { Component } from 'react'; -import { FormGroup, FormControl, ControlLabel } from 'react-bootstrap'; - -class EditWidgetSignalTypeControl extends Component { - constructor(props) { - super(props); - - this.state = { - widget: {} - }; - } - - componentWillReceiveProps(nextProps) { - // Update state's widget with props - this.setState({ widget: nextProps.widget }); - } - - render() { - // get selected simulation model - var simulationModel = {}; - - if (this.props.simulation) { - this.props.simulation.models.forEach((model) => { - if (model.simulation === this.state.widget.simulation) { - simulationModel = model; - } - }); - } - - // Obtain unique signal types with the help of dictionary keys - var signalTypes = Object.keys(simulationModel.mapping.reduce( (collection, signal) => { - var lower = signal.type.toLowerCase(); - collection[lower] = ''; - return collection; - }, {})); - - var capitalize = (str) => { return str.charAt(0).toUpperCase() + str.slice(1); } - - var selectedValue = signalTypes.includes(this.state.widget.signalType) ? this.state.widget.signalType : ''; - - return ( - - Signal type - this.props.handleChange(e)}> - - {signalTypes.map((type, index) => ( - - ))} - - - ); - } -} - -export default EditWidgetSignalTypeControl; \ No newline at end of file