40 lines
860 B
JavaScript
40 lines
860 B
JavaScript
export const containerExpirationPolicyData = () => ({
|
|
cadence: 'EVERY_DAY',
|
|
enabled: true,
|
|
keepN: 'TEN_TAGS',
|
|
nameRegex: 'asdasdssssdfdf',
|
|
nameRegexKeep: 'sss',
|
|
olderThan: 'FOURTEEN_DAYS',
|
|
nextRunAt: '2020-11-19T07:37:03.941Z',
|
|
});
|
|
|
|
export const expirationPolicyPayload = (override) => ({
|
|
data: {
|
|
project: {
|
|
containerExpirationPolicy: {
|
|
...containerExpirationPolicyData(),
|
|
...override,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
|
|
export const emptyExpirationPolicyPayload = () => ({
|
|
data: {
|
|
project: {
|
|
containerExpirationPolicy: {},
|
|
},
|
|
},
|
|
});
|
|
|
|
export const expirationPolicyMutationPayload = ({ override, errors = [] } = {}) => ({
|
|
data: {
|
|
updateContainerExpirationPolicy: {
|
|
containerExpirationPolicy: {
|
|
...containerExpirationPolicyData(),
|
|
...override,
|
|
},
|
|
errors,
|
|
},
|
|
},
|
|
});
|