Sha256: c3aab109ffe3000faf6d9327929ff82c0bcad5d84f3bcbf6ca4b45e3098ec680

Contents?: true

Size: 559 Bytes

Versions: 4

Compression:

Stored size: 559 Bytes

Contents

import {
  selectAPIStatus,
  selectAPIResponse,
} from 'foremanReact/redux/API/APISelectors';

import { ROUND_PROGRESS } from './RoundProgressConstants';

const defaultProgress = {
  success: 0,
  warning: 0,
  failed: 0,
  running: 0,
  pending: 0,
  cancelled: 0,
};

export const selectProgress = state =>
  selectAPIResponse(state, ROUND_PROGRESS).progress || defaultProgress;

export const selectAutoRefresh = state =>
  !selectAPIResponse(state, ROUND_PROGRESS).complete;

export const selectStatus = state =>
  selectAPIStatus(state, ROUND_PROGRESS);

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_patch-1.2.1 webpack/components/RoundProgress/RoundProgressSelectors.js
foreman_patch-1.2.0 webpack/components/RoundProgress/RoundProgressSelectors.js
foreman_patch-1.2.0.alpha1 webpack/components/RoundProgress/RoundProgressSelectors.js
foreman_patch-1.1.1 webpack/components/RoundProgress/RoundProgressSelectors.js