Commit 590400c6 authored by Kevin Di Lallo's avatar Kevin Di Lallo
Browse files

frontend support for MOBILITY-DISCONNECTED event

parent fb20157a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ import { Select } from '@rmwc/select';
import { Grid, GridCell } from '@rmwc/grid';
import CancelApplyPair from '../../components/helper-components/cancel-apply-pair';

import { EXEC_EVT_MOB_TARGET, EXEC_EVT_MOB_DEST } from '../../meep-constants';
import { EXEC_EVT_MOB_TARGET, EXEC_EVT_MOB_DEST, DEST_DISCONNECTED } from '../../meep-constants';

import { getElemFieldVal, FIELD_NAME } from '../../util/elem-utils';

@@ -131,6 +131,8 @@ class MobilityEventPane extends Component {
        }
      }
    }
    var destOptions = _.map(populateDestination, elem => getElemFieldVal(elem, FIELD_NAME));
    destOptions.push(DEST_DISCONNECTED);

    return (
      <div>
@@ -160,9 +162,7 @@ class MobilityEventPane extends Component {
                style={styles.select}
                label="Destination"
                outlined
                options={_.map(populateDestination, elem =>
                  getElemFieldVal(elem, FIELD_NAME)
                )}
                options={destOptions}
                onChange={event => {
                  this.props.changeEventDestination(event.target.value);
                }}
+1 −0
Original line number Diff line number Diff line
@@ -300,6 +300,7 @@ export const VIEW_NAME_NONE = 'None';
export const MAP_VIEW = 'Map View';
export const NET_TOPOLOGY_VIEW = 'Network Topology';

export const DEST_DISCONNECTED = 'DISCONNECTED';
export const MOBILITY_EVENT = 'MOBILITY';
export const NETWORK_CHARACTERISTICS_EVENT = 'NETWORK-CHARACTERISTICS-UPDATE';