Loading js-apps/meep-frontend/src/js/containers/meep-container.js +1 −1 Original line number Diff line number Diff line Loading @@ -191,7 +191,7 @@ class MeepContainer extends Component { clearInterval(this.refreshIntervalTimer); } else { clearInterval(this.refreshIntervalTimer); // this.refreshIntervalTimer = setInterval(() => this.refreshMeepController(), value); this.refreshIntervalTimer = setInterval(() => this.refreshMeepController(), value); } }); } Loading js-apps/meep-frontend/src/js/containers/monitor/monitor-page-container.js +9 −6 Original line number Diff line number Diff line Loading @@ -162,7 +162,6 @@ const MainPane = (props) => { class MonitorPageContainer extends Component { constructor(props) { super(props); this.state = {}; } handleSelectionChange(e) { Loading @@ -179,7 +178,7 @@ class MonitorPageContainer extends Component { startEditMode() { const opts = JSON.parse(JSON.stringify(this.props.dashboardOptions)); const options = _.map(opts, (op, index) => { return {...op, selected: false, index: index}; return {...op, data: {selected: false}, index: index}; }); this.props.changeEditedDashboardOptions(options); } Loading @@ -196,7 +195,7 @@ class MonitorPageContainer extends Component { const newOptions = [...this.props.editedDashboardOptions, { label: '', value: '', selected: false, data: {selected: false}, index: this.props.editedDashboardOptions.length }]; this.props.changeEditedDashboardOptions(newOptions); Loading @@ -210,7 +209,7 @@ class MonitorPageContainer extends Component { } performDeleteOptions() { const isNotSelected = (option) => !option.selected; const isNotSelected = (option) => !option.data.selected; const options = pipe( filter(isNotSelected), Loading @@ -224,12 +223,16 @@ class MonitorPageContainer extends Component { this.showDialog(IDC_DIALOG_CONFIRM); } isOptionSelected(option) { return _.includes(this.state.selectedIndices, option.index); } canDelete() { if (!this.props.editedDashboardOptions) { return false; } let someSelected = _.reduce(this.props.editedDashboardOptions, (acc, option) => acc || option.selected); let someSelected = _.reduce(this.props.editedDashboardOptions, (acc, option) => acc || option.data.selected); return someSelected; } Loading Loading @@ -274,7 +277,7 @@ class MonitorPageContainer extends Component { deleteOptions={() => this.deleteSelectedOptions()} updateOptionLabel={(index, value) => this.updateOptionAttribute(index,'label', value)} updateOptionValue={(index, value) => this.updateOptionAttribute(index, 'value', value)} updateOptionSelection={(index, value) => this.updateOptionAttribute(index, 'selected', value)} updateOptionSelection={(index, value) => this.updateOptionAttribute(index, 'data', {selected: value})} canDelete={() => this.canDelete()} /> </div> Loading Loading
js-apps/meep-frontend/src/js/containers/meep-container.js +1 −1 Original line number Diff line number Diff line Loading @@ -191,7 +191,7 @@ class MeepContainer extends Component { clearInterval(this.refreshIntervalTimer); } else { clearInterval(this.refreshIntervalTimer); // this.refreshIntervalTimer = setInterval(() => this.refreshMeepController(), value); this.refreshIntervalTimer = setInterval(() => this.refreshMeepController(), value); } }); } Loading
js-apps/meep-frontend/src/js/containers/monitor/monitor-page-container.js +9 −6 Original line number Diff line number Diff line Loading @@ -162,7 +162,6 @@ const MainPane = (props) => { class MonitorPageContainer extends Component { constructor(props) { super(props); this.state = {}; } handleSelectionChange(e) { Loading @@ -179,7 +178,7 @@ class MonitorPageContainer extends Component { startEditMode() { const opts = JSON.parse(JSON.stringify(this.props.dashboardOptions)); const options = _.map(opts, (op, index) => { return {...op, selected: false, index: index}; return {...op, data: {selected: false}, index: index}; }); this.props.changeEditedDashboardOptions(options); } Loading @@ -196,7 +195,7 @@ class MonitorPageContainer extends Component { const newOptions = [...this.props.editedDashboardOptions, { label: '', value: '', selected: false, data: {selected: false}, index: this.props.editedDashboardOptions.length }]; this.props.changeEditedDashboardOptions(newOptions); Loading @@ -210,7 +209,7 @@ class MonitorPageContainer extends Component { } performDeleteOptions() { const isNotSelected = (option) => !option.selected; const isNotSelected = (option) => !option.data.selected; const options = pipe( filter(isNotSelected), Loading @@ -224,12 +223,16 @@ class MonitorPageContainer extends Component { this.showDialog(IDC_DIALOG_CONFIRM); } isOptionSelected(option) { return _.includes(this.state.selectedIndices, option.index); } canDelete() { if (!this.props.editedDashboardOptions) { return false; } let someSelected = _.reduce(this.props.editedDashboardOptions, (acc, option) => acc || option.selected); let someSelected = _.reduce(this.props.editedDashboardOptions, (acc, option) => acc || option.data.selected); return someSelected; } Loading Loading @@ -274,7 +277,7 @@ class MonitorPageContainer extends Component { deleteOptions={() => this.deleteSelectedOptions()} updateOptionLabel={(index, value) => this.updateOptionAttribute(index,'label', value)} updateOptionValue={(index, value) => this.updateOptionAttribute(index, 'value', value)} updateOptionSelection={(index, value) => this.updateOptionAttribute(index, 'selected', value)} updateOptionSelection={(index, value) => this.updateOptionAttribute(index, 'data', {selected: value})} canDelete={() => this.canDelete()} /> </div> Loading