summaryrefslogtreecommitdiff
path: root/spec/frontend/registry/explorer/mock_data.js
blob: a7ffed4c9fd66081b153ff1328f684896b402fac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
export const headers = {
  'X-PER-PAGE': 5,
  'X-PAGE': 1,
  'X-TOTAL': 13,
  'X-TOTAL_PAGES': 1,
  'X-NEXT-PAGE': null,
  'X-PREVIOUS-PAGE': null,
};
export const reposServerResponse = [
  {
    destroy_path: 'path',
    id: '123',
    location: 'location',
    path: 'foo',
    tags_path: 'tags_path',
  },
  {
    destroy_path: 'path_',
    id: '456',
    location: 'location_',
    path: 'bar',
    tags_path: 'tags_path_',
  },
];

export const registryServerResponse = [
  {
    name: 'centos7',
    short_revision: 'b118ab5b0',
    revision: 'b118ab5b0e90b7cb5127db31d5321ac14961d097516a8e0e72084b6cdc783b43',
    total_size: 679,
    layers: 19,
    location: 'location',
    created_at: 1505828744434,
    destroy_path: 'path_',
  },
  {
    name: 'centos6',
    short_revision: 'b118ab5b0',
    revision: 'b118ab5b0e90b7cb5127db31d5321ac14961d097516a8e0e72084b6cdc783b43',
    total_size: 679,
    layers: 19,
    location: 'location',
    created_at: 1505828744434,
  },
];

export const imagesListResponse = {
  data: [
    {
      path: 'foo',
      location: 'location',
      destroy_path: 'path',
    },
    {
      path: 'bar',
      location: 'location-2',
      destroy_path: 'path-2',
    },
  ],
  headers,
};

export const tagsListResponse = {
  data: [
    {
      name: 'centos6',
      revision: 'b118ab5b0e90b7cb5127db31d5321ac14961d097516a8e0e72084b6cdc783b43',
      short_revision: 'b118ab5b0',
      size: 19,
      layers: 10,
      location: 'location',
      path: 'bar:centos6',
      created_at: '2020-06-29T10:23:51.766+00:00',
      destroy_path: 'path',
      digest: 'sha256:1ab51d519f574b636ae7788051c60239334ae8622a9fd82a0cf7bae7786dfd5c',
    },
    {
      name: 'test-tag',
      revision: 'b969de599faea2b3d9b6605a8b0897261c571acaa36db1bdc7349b5775b4e0b4',
      short_revision: 'b969de599',
      size: 19,
      layers: 10,
      path: 'foo:test-tag',
      location: 'location-2',
      created_at: '2020-06-29T10:23:51.766+00:00',
      digest: 'sha256:1ab51d519f574b636ae7788051c60239334ae8622a9fd82a0cf7bae7736dfd5c',
    },
  ],
  headers,
};

export const imagePagination = {
  perPage: 10,
  page: 1,
  total: 14,
  totalPages: 2,
  nextPage: 2,
};