diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-03 09:08:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-03 09:08:42 +0000 |
commit | f14507e586a7f75f0fb71a1d8468b7361be860d4 (patch) | |
tree | a8aa547b517a7ae5626c902bfb558c1fc5386c4e /app/assets/javascripts/registry/settings/store/getters.js | |
parent | f4d27d532e3abeecd1caffeb3a56e698ae982e5b (diff) | |
download | gitlab-ce-f14507e586a7f75f0fb71a1d8468b7361be860d4.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/registry/settings/store/getters.js')
-rw-r--r-- | app/assets/javascripts/registry/settings/store/getters.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/app/assets/javascripts/registry/settings/store/getters.js b/app/assets/javascripts/registry/settings/store/getters.js index cd6392bd0cc..639becebeec 100644 --- a/app/assets/javascripts/registry/settings/store/getters.js +++ b/app/assets/javascripts/registry/settings/store/getters.js @@ -1,10 +1,21 @@ import { isEqual } from 'lodash'; -import { findDefaultOption } from '../utils'; +import { findDefaultOption } from '../../shared/utils'; export const getCadence = state => state.settings.cadence || findDefaultOption(state.formOptions.cadence); + export const getKeepN = state => state.settings.keep_n || findDefaultOption(state.formOptions.keepN); + export const getOlderThan = state => state.settings.older_than || findDefaultOption(state.formOptions.olderThan); + +export const getSettings = (state, getters) => ({ + enabled: state.settings.enabled, + cadence: getters.getCadence, + older_than: getters.getOlderThan, + keep_n: getters.getKeepN, + name_regex: state.settings.name_regex, +}); + export const getIsEdited = state => !isEqual(state.original, state.settings); |