summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/jobs/store/getters.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/jobs/store/getters.js')
-rw-r--r--app/assets/javascripts/jobs/store/getters.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/app/assets/javascripts/jobs/store/getters.js b/app/assets/javascripts/jobs/store/getters.js
index 8c2d1dd8ab2..30a4a247dc4 100644
--- a/app/assets/javascripts/jobs/store/getters.js
+++ b/app/assets/javascripts/jobs/store/getters.js
@@ -1,37 +1,37 @@
import { isEmpty, isString } from 'lodash';
import { isScrolledToBottom } from '~/lib/utils/scroll_utils';
-export const headerTime = state => (state.job.started ? state.job.started : state.job.created_at);
+export const headerTime = (state) => (state.job.started ? state.job.started : state.job.created_at);
-export const hasForwardDeploymentFailure = state =>
+export const hasForwardDeploymentFailure = (state) =>
state?.job?.failure_reason === 'forward_deployment_failure';
-export const hasUnmetPrerequisitesFailure = state =>
+export const hasUnmetPrerequisitesFailure = (state) =>
state?.job?.failure_reason === 'unmet_prerequisites';
-export const shouldRenderCalloutMessage = state =>
+export const shouldRenderCalloutMessage = (state) =>
!isEmpty(state.job.status) && !isEmpty(state.job.callout_message);
/**
* When job has not started the key will be null
* When job started the key will be a string with a date.
*/
-export const shouldRenderTriggeredLabel = state => isString(state.job.started);
+export const shouldRenderTriggeredLabel = (state) => isString(state.job.started);
-export const hasEnvironment = state => !isEmpty(state.job.deployment_status);
+export const hasEnvironment = (state) => !isEmpty(state.job.deployment_status);
/**
* Checks if it the job has trace.
* Used to check if it should render the job log or the empty state
* @returns {Boolean}
*/
-export const hasTrace = state =>
+export const hasTrace = (state) =>
state.job.has_trace || (!isEmpty(state.job.status) && state.job.status.group === 'running');
-export const emptyStateIllustration = state =>
+export const emptyStateIllustration = (state) =>
(state.job && state.job.status && state.job.status.illustration) || {};
-export const emptyStateAction = state =>
+export const emptyStateAction = (state) =>
(state.job && state.job.status && state.job.status.action) || null;
/**
@@ -40,12 +40,12 @@ export const emptyStateAction = state =>
*
* @returns {Boolean}
*/
-export const shouldRenderSharedRunnerLimitWarning = state =>
+export const shouldRenderSharedRunnerLimitWarning = (state) =>
!isEmpty(state.job.runners) &&
!isEmpty(state.job.runners.quota) &&
state.job.runners.quota.used >= state.job.runners.quota.limit;
-export const isScrollingDown = state => isScrolledToBottom() && !state.isTraceComplete;
+export const isScrollingDown = (state) => isScrolledToBottom() && !state.isTraceComplete;
-export const hasRunnersForProject = state =>
+export const hasRunnersForProject = (state) =>
state.job.runners.available && !state.job.runners.online;