Commit 6151f1e2 authored by Thong Kuah's avatar Thong Kuah Committed by Jose Vargas
parent d4ed85ad
import { setDeployBoard } from 'ee_else_ce/environments/stores/helpers';
import { setDeployBoard } from './helpers';
import { parseIntPagination, normalizeHeaders } from '~/lib/utils/common_utils';
/**
......
/**
* Deploy boards are EE only.
*
* @param {Object} environment
* @returns {Object}
*/
export const setDeployBoard = (oldEnvironmentState, environment) => environment;
export const setDeployBoard = (oldEnvironmentState, environment) => {
let parsedEnvironment = environment;
if (environment.size === 1 && environment.rollout_status) {
parsedEnvironment = {
...environment,
hasDeployBoard: true,
isDeployBoardVisible:
oldEnvironmentState.isDeployBoardVisible === false
? oldEnvironmentState.isDeployBoardVisible
: true,
deployBoardData:
environment.rollout_status.status === 'found' ? environment.rollout_status : {},
isLoadingDeployBoard: environment.rollout_status.status === 'loading',
isEmptyDeployBoard: environment.rollout_status.status === 'not_found',
};
}
return parsedEnvironment;
};
/**
* Deploy boards are EE only.
*
* @param {Object} environment
* @returns {Object}
*/
export const setDeployBoard = (oldEnvironmentState, environment) => {
let parsedEnvironment = environment;
if (environment.size === 1 && environment.rollout_status) {
parsedEnvironment = {
...environment,
hasDeployBoard: true,
isDeployBoardVisible:
oldEnvironmentState.isDeployBoardVisible === false
? oldEnvironmentState.isDeployBoardVisible
: true,
deployBoardData:
environment.rollout_status.status === 'found' ? environment.rollout_status : {},
isLoadingDeployBoard: environment.rollout_status.status === 'loading',
isEmptyDeployBoard: environment.rollout_status.status === 'not_found',
};
}
return parsedEnvironment;
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment