2021-11-18 22:05:49 +05:30
|
|
|
export const proxyData = () => ({
|
|
|
|
dependencyProxyBlobCount: 2,
|
|
|
|
dependencyProxyTotalSize: '1024 Bytes',
|
|
|
|
dependencyProxyImagePrefix: 'gdk.test:3000/private-group/dependency_proxy/containers',
|
|
|
|
dependencyProxySetting: { enabled: true, __typename: 'DependencyProxySetting' },
|
|
|
|
});
|
|
|
|
|
|
|
|
export const proxySettings = (extend = {}) => ({ enabled: true, ...extend });
|
|
|
|
|
2021-12-11 22:18:48 +05:30
|
|
|
export const proxyManifests = () => [
|
2022-07-16 23:28:13 +05:30
|
|
|
{
|
|
|
|
id: 'proxy-1',
|
|
|
|
createdAt: '2021-09-22T09:45:28Z',
|
|
|
|
imageName: 'alpine:latest',
|
|
|
|
status: 'DEFAULT',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'proxy-2',
|
|
|
|
createdAt: '2021-09-21T09:45:28Z',
|
|
|
|
imageName: 'alpine:stable',
|
|
|
|
status: 'DEFAULT',
|
|
|
|
},
|
2021-12-11 22:18:48 +05:30
|
|
|
];
|
|
|
|
|
|
|
|
export const pagination = (extend) => ({
|
|
|
|
endCursor: 'eyJpZCI6IjIwNSIsIm5hbWUiOiJteS9jb21wYW55L2FwcC9teS1hcHAifQ',
|
|
|
|
hasNextPage: true,
|
|
|
|
hasPreviousPage: true,
|
|
|
|
startCursor: 'eyJpZCI6IjI0NyIsIm5hbWUiOiJ2ZXJzaW9uX3Rlc3QxIn0',
|
|
|
|
__typename: 'PageInfo',
|
|
|
|
...extend,
|
|
|
|
});
|
|
|
|
|
|
|
|
export const proxyDetailsQuery = ({ extendSettings = {}, extend } = {}) => ({
|
2021-11-18 22:05:49 +05:30
|
|
|
data: {
|
|
|
|
group: {
|
|
|
|
...proxyData(),
|
|
|
|
__typename: 'Group',
|
2022-01-26 12:08:38 +05:30
|
|
|
id: '1',
|
2021-11-18 22:05:49 +05:30
|
|
|
dependencyProxySetting: {
|
|
|
|
...proxySettings(extendSettings),
|
|
|
|
__typename: 'DependencyProxySetting',
|
|
|
|
},
|
2021-12-11 22:18:48 +05:30
|
|
|
dependencyProxyManifests: {
|
|
|
|
nodes: proxyManifests(),
|
|
|
|
pageInfo: pagination(),
|
|
|
|
},
|
|
|
|
...extend,
|
2021-11-18 22:05:49 +05:30
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|