Sha256: c17f42678a34bde3d8be780690ef747eeb6e6098ee01bc283f21ec35863c1124
Contents?: true
Size: 838 Bytes
Versions: 2
Compression:
Stored size: 838 Bytes
Contents
import Immutable from 'seamless-immutable'; import { cloneDeep, findIndex, findLastIndex, } from 'lodash'; import { APPLICATION_INSTANCE_REPORT_INIT, APPLICATION_INSTANCE_REPORT_SET_ACTIVE_HOST, } from './ApplicationInstanceReportConstants'; export const initialState = Immutable({ name: false, error: { errorMsg: '', status: '', statusText: '' }, }); const applicationInstanceReport = (state = initialState, action) => { const { payload } = action; switch (action.type) { case APPLICATION_INSTANCE_REPORT_INIT: { return state.merge(payload); } case APPLICATION_INSTANCE_REPORT_SET_ACTIVE_HOST: { return state.merge({ loading: true, activeHostId: payload.activeHostId, }) } default: { return state; } } }; export default applicationInstanceReport;
Version data entries
2 entries across 2 versions & 1 rubygems