Loading js-apps/meep-frontend/src/js/containers/exec/event-creation-pane.js +0 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,6 @@ class EventCreationPane extends Component { this.updateElement(element); }} onSuccess={this.props.onSuccess} // onClose={this.props.onClose} onClose={e => this.onEventPaneClose(e)} UEs={this.props.UEs} POAs={this.props.POAs} Loading js-apps/meep-frontend/src/js/containers/exec/exec-page-container.js +0 −4 Original line number Diff line number Diff line Loading @@ -81,10 +81,6 @@ class ExecPageContainer extends Component { autoBind(this); } componentDidMount() { // this.props.changeCurrentEvent(MOBILITY_EVENT); } /** * Callback function to receive the result of the getScenarioList operation. * @callback module:api/ScenarioConfigurationApi~getScenarioListCallback Loading js-apps/meep-frontend/src/js/containers/exec/mobility-event-pane.js +1 −20 Original line number Diff line number Diff line Loading @@ -33,11 +33,6 @@ import { class MobilityEventPane extends Component { constructor(props) { super(props); // this.values = { // eventType: '', // eventTarget: '', // eventDestination: '' // }; this.state = {}; } Loading Loading @@ -72,7 +67,6 @@ class MobilityEventPane extends Component { this.props.MobTypes !== nextProps.MobTypes || this.props.FogEdges !== nextProps.FogEdges || this.props.EdgeApps !== nextProps.EdgeApps || // this.state.eventTarget !== nextState.eventTarget this.props.mobilityEventTarget !== nextProps.mobilityEventTarget ); } Loading @@ -90,8 +84,6 @@ class MobilityEventPane extends Component { name: 'name', type: this.props.currentEvent, eventMobility: { // elementName: this.values.eventTarget, // dest: this.values.eventDestination elementName: this.props.mobilityEventTarget, dest: this.props.mobilityEventDestination } Loading @@ -108,7 +100,6 @@ class MobilityEventPane extends Component { render() { //let found = this.props.UEs.find(element => element.label == this.values.eventTarget); //find if its the selection was a UE, otherwise (in order) EDGE, FOG, EDGE-APP, UE-APP // var target = this.state.eventTarget; var target = this.props.mobilityEventTarget; var found = this.props.UEs.find(function(element) { return element.label === target; Loading Loading @@ -153,12 +144,9 @@ class MobilityEventPane extends Component { options={_.map(this.props.MobTypes, elem => getElemFieldVal(elem, FIELD_NAME) )} // onChange={event => { // this.values['eventTarget'] = event.target.value; // this.setState({ eventTarget: event.target.value }); // }} onChange={event => { this.props.changeEventTarget(event.target.value); this.props.changeEventDestination(''); }} data-cy={EXEC_EVT_MOB_TARGET} value={this.props.mobilityEventTarget} Loading @@ -175,10 +163,6 @@ class MobilityEventPane extends Component { options={_.map(populateDestination, elem => getElemFieldVal(elem, FIELD_NAME) )} // onChange={event => { // this.values['eventDestination'] = event.target.value; // this.setState({ eventDestination: event.target.value }); // }} onChange={event => { this.props.changeEventDestination(event.target.value); }} Loading @@ -191,7 +175,6 @@ class MobilityEventPane extends Component { <CancelApplyPair cancelText="Close" applyText="Submit" // onCancel={this.props.onClose} onCancel={e => this.onMobilityPaneClose(e)} onApply={e => this.triggerEvent(e)} /> Loading Loading @@ -233,5 +216,3 @@ const ConnectedMobilityEventPane = connect( )(MobilityEventPane); export default ConnectedMobilityEventPane; // export default MobilityEventPane; js-apps/meep-frontend/src/js/containers/exec/network-characteristics-event-pane.js +18 −12 Original line number Diff line number Diff line Loading @@ -137,14 +137,28 @@ class NetworkCharacteristicsEventPane extends Component { super(props); this.state = { dialogOpen: false // currentElementType: '' dialogOpen: false, ncTypes: [] }; } componentDidMount() { let ncTypes = ncApplicableTypes.filter(e => { for (let item = 0; item < this.props.networkElements.length; item++) { if (e === getElemFieldVal(this.props.networkElements[item], FIELD_TYPE)) { return true; } } return false; }); this.setState({ ncTypes }); } onNetworkCharacPaneClose(e) { e.preventDefault(); setElemFieldVal(this.props.element, FIELD_TYPE, ''); this.onUpdateElement(FIELD_TYPE, '', null); this.onUpdateElement(FIELD_NAME, '', null); this.props.onClose(e); } Loading @@ -164,7 +178,6 @@ class NetworkCharacteristicsEventPane extends Component { } var neType = ''; // switch(this.state.currentElementType) { switch(type) { case ELEMENT_TYPE_OPERATOR_GENERIC: neType = DOMAIN_TYPE_STR; Loading Loading @@ -197,7 +210,6 @@ class NetworkCharacteristicsEventPane extends Component { neType = CLOUD_APP_TYPE_STR; break; default: // neType = this.state.currentElementType; neType = type; } Loading Loading @@ -243,7 +255,6 @@ class NetworkCharacteristicsEventPane extends Component { currentPrefix() { var type = getElemFieldVal(this.props.element, FIELD_TYPE); // switch (this.state.currentElementType) { switch (type) { case ELEMENT_TYPE_SCENARIO: return PREFIX_INT_DOM; Loading Loading @@ -378,7 +389,6 @@ class NetworkCharacteristicsEventPane extends Component { var elements = _.chain(this.props.networkElements) .filter(e => { // var type = this.state.currentElementType; var type = getElemFieldVal(element, FIELD_TYPE); var elemType = getElemFieldVal(e, FIELD_TYPE); Loading @@ -404,11 +414,10 @@ class NetworkCharacteristicsEventPane extends Component { style={styles.select} label="Network Element Type" outlined options={ncApplicableTypes} options={this.state.ncTypes} onChange={event => { var elem = this.firstElementMatchingType(event.target.value); this.props.updateElement(elem); // this.setState({ currentElementType: event.target.value }); }} data-cy={EXEC_EVT_NC_TYPE} value={element ? getElemFieldVal(element, FIELD_TYPE) || '' : ''} Loading Loading @@ -447,9 +456,6 @@ class NetworkCharacteristicsEventPane extends Component { <CancelApplyPair cancelText="Close" applyText="Submit" // onCancel={() => { // this.props.onClose(); // }} onCancel={e => this.onNetworkCharacPaneClose(e)} onApply={e => this.triggerEvent(e)} saveDisabled={ Loading Loading
js-apps/meep-frontend/src/js/containers/exec/event-creation-pane.js +0 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,6 @@ class EventCreationPane extends Component { this.updateElement(element); }} onSuccess={this.props.onSuccess} // onClose={this.props.onClose} onClose={e => this.onEventPaneClose(e)} UEs={this.props.UEs} POAs={this.props.POAs} Loading
js-apps/meep-frontend/src/js/containers/exec/exec-page-container.js +0 −4 Original line number Diff line number Diff line Loading @@ -81,10 +81,6 @@ class ExecPageContainer extends Component { autoBind(this); } componentDidMount() { // this.props.changeCurrentEvent(MOBILITY_EVENT); } /** * Callback function to receive the result of the getScenarioList operation. * @callback module:api/ScenarioConfigurationApi~getScenarioListCallback Loading
js-apps/meep-frontend/src/js/containers/exec/mobility-event-pane.js +1 −20 Original line number Diff line number Diff line Loading @@ -33,11 +33,6 @@ import { class MobilityEventPane extends Component { constructor(props) { super(props); // this.values = { // eventType: '', // eventTarget: '', // eventDestination: '' // }; this.state = {}; } Loading Loading @@ -72,7 +67,6 @@ class MobilityEventPane extends Component { this.props.MobTypes !== nextProps.MobTypes || this.props.FogEdges !== nextProps.FogEdges || this.props.EdgeApps !== nextProps.EdgeApps || // this.state.eventTarget !== nextState.eventTarget this.props.mobilityEventTarget !== nextProps.mobilityEventTarget ); } Loading @@ -90,8 +84,6 @@ class MobilityEventPane extends Component { name: 'name', type: this.props.currentEvent, eventMobility: { // elementName: this.values.eventTarget, // dest: this.values.eventDestination elementName: this.props.mobilityEventTarget, dest: this.props.mobilityEventDestination } Loading @@ -108,7 +100,6 @@ class MobilityEventPane extends Component { render() { //let found = this.props.UEs.find(element => element.label == this.values.eventTarget); //find if its the selection was a UE, otherwise (in order) EDGE, FOG, EDGE-APP, UE-APP // var target = this.state.eventTarget; var target = this.props.mobilityEventTarget; var found = this.props.UEs.find(function(element) { return element.label === target; Loading Loading @@ -153,12 +144,9 @@ class MobilityEventPane extends Component { options={_.map(this.props.MobTypes, elem => getElemFieldVal(elem, FIELD_NAME) )} // onChange={event => { // this.values['eventTarget'] = event.target.value; // this.setState({ eventTarget: event.target.value }); // }} onChange={event => { this.props.changeEventTarget(event.target.value); this.props.changeEventDestination(''); }} data-cy={EXEC_EVT_MOB_TARGET} value={this.props.mobilityEventTarget} Loading @@ -175,10 +163,6 @@ class MobilityEventPane extends Component { options={_.map(populateDestination, elem => getElemFieldVal(elem, FIELD_NAME) )} // onChange={event => { // this.values['eventDestination'] = event.target.value; // this.setState({ eventDestination: event.target.value }); // }} onChange={event => { this.props.changeEventDestination(event.target.value); }} Loading @@ -191,7 +175,6 @@ class MobilityEventPane extends Component { <CancelApplyPair cancelText="Close" applyText="Submit" // onCancel={this.props.onClose} onCancel={e => this.onMobilityPaneClose(e)} onApply={e => this.triggerEvent(e)} /> Loading Loading @@ -233,5 +216,3 @@ const ConnectedMobilityEventPane = connect( )(MobilityEventPane); export default ConnectedMobilityEventPane; // export default MobilityEventPane;
js-apps/meep-frontend/src/js/containers/exec/network-characteristics-event-pane.js +18 −12 Original line number Diff line number Diff line Loading @@ -137,14 +137,28 @@ class NetworkCharacteristicsEventPane extends Component { super(props); this.state = { dialogOpen: false // currentElementType: '' dialogOpen: false, ncTypes: [] }; } componentDidMount() { let ncTypes = ncApplicableTypes.filter(e => { for (let item = 0; item < this.props.networkElements.length; item++) { if (e === getElemFieldVal(this.props.networkElements[item], FIELD_TYPE)) { return true; } } return false; }); this.setState({ ncTypes }); } onNetworkCharacPaneClose(e) { e.preventDefault(); setElemFieldVal(this.props.element, FIELD_TYPE, ''); this.onUpdateElement(FIELD_TYPE, '', null); this.onUpdateElement(FIELD_NAME, '', null); this.props.onClose(e); } Loading @@ -164,7 +178,6 @@ class NetworkCharacteristicsEventPane extends Component { } var neType = ''; // switch(this.state.currentElementType) { switch(type) { case ELEMENT_TYPE_OPERATOR_GENERIC: neType = DOMAIN_TYPE_STR; Loading Loading @@ -197,7 +210,6 @@ class NetworkCharacteristicsEventPane extends Component { neType = CLOUD_APP_TYPE_STR; break; default: // neType = this.state.currentElementType; neType = type; } Loading Loading @@ -243,7 +255,6 @@ class NetworkCharacteristicsEventPane extends Component { currentPrefix() { var type = getElemFieldVal(this.props.element, FIELD_TYPE); // switch (this.state.currentElementType) { switch (type) { case ELEMENT_TYPE_SCENARIO: return PREFIX_INT_DOM; Loading Loading @@ -378,7 +389,6 @@ class NetworkCharacteristicsEventPane extends Component { var elements = _.chain(this.props.networkElements) .filter(e => { // var type = this.state.currentElementType; var type = getElemFieldVal(element, FIELD_TYPE); var elemType = getElemFieldVal(e, FIELD_TYPE); Loading @@ -404,11 +414,10 @@ class NetworkCharacteristicsEventPane extends Component { style={styles.select} label="Network Element Type" outlined options={ncApplicableTypes} options={this.state.ncTypes} onChange={event => { var elem = this.firstElementMatchingType(event.target.value); this.props.updateElement(elem); // this.setState({ currentElementType: event.target.value }); }} data-cy={EXEC_EVT_NC_TYPE} value={element ? getElemFieldVal(element, FIELD_TYPE) || '' : ''} Loading Loading @@ -447,9 +456,6 @@ class NetworkCharacteristicsEventPane extends Component { <CancelApplyPair cancelText="Close" applyText="Submit" // onCancel={() => { // this.props.onClose(); // }} onCancel={e => this.onNetworkCharacPaneClose(e)} onApply={e => this.triggerEvent(e)} saveDisabled={ Loading