Sha256: 16089debe78b29e5f698bc8cf282c1fbbc6205966f7ddc94a61b601bed6dabb6

Contents?: true

Size: 671 Bytes

Versions: 96

Compression:

Stored size: 671 Bytes

Contents

import Immutable from 'seamless-immutable';
import {
  SYSTEM_STATUSES_FAILURE,
  SYSTEM_STATUSES_SUCCESS,
  SYSTEM_STATUSES_REQUEST,
} from './SystemStatusesConsts';

const initialState = Immutable({
  services: {},
  loaderStatus: '',
});

export default (state = initialState, action) => {
  switch (action.type) {
    case SYSTEM_STATUSES_REQUEST:
      return state.set('loaderStatus', 'PENDING');
    case SYSTEM_STATUSES_SUCCESS:
      return state
        .set('services', action.payload.services)
        .set('loaderStatus', 'RESOLVED');
    case SYSTEM_STATUSES_FAILURE:
      return state.set('loaderStatus', 'ERROR');
    default:
      return state;
  }
};

Version data entries

96 entries across 96 versions & 1 rubygems

Version Path
katello-4.3.1 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.4.0.rc1 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.2.2 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.3.0 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.3.0.rc4 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.3.0.rc3 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.3.0.rc2.1 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.3.0.rc2 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.3.0.rc1 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.2.1 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.2.0.1 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.1.4 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.0.3 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.2.0.1.rc3 webpack/components/extensions/about/SystemStatusesReducer.js
katello-3.18.5 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.2.0.1.rc2 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.2.0.rc2 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.1.3 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.2.0.rc1 webpack/components/extensions/about/SystemStatusesReducer.js
katello-4.0.2.1 webpack/components/extensions/about/SystemStatusesReducer.js