Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mock_data.js « stores « registry « javascripts « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 07c51503b7fef407b186606f6d48ad6894b03f2b (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
export const defaultState = {
  isLoading: false,
  endpoint: '',
  repos: [],
};

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',
    size: 679,
    layers: 19,
    location: 'location',
    created_at: 1505828744434,
    destroy_path: 'path_',
  },
  {
    name: 'centos6',
    short_revision: 'b118ab5b0',
    revision: 'b118ab5b0e90b7cb5127db31d5321ac14961d097516a8e0e72084b6cdc783b43',
    size: 679,
    layers: 19,
    location: 'location',
    created_at: 1505828744434,
  }];

export const parsedReposServerResponse = [
  {
    canDelete: true,
    destroyPath: reposServerResponse[0].destroy_path,
    id: reposServerResponse[0].id,
    isLoading: false,
    list: [],
    location: reposServerResponse[0].location,
    name: reposServerResponse[0].path,
    tagsPath: reposServerResponse[0].tags_path,
  },
  {
    canDelete: true,
    destroyPath: reposServerResponse[1].destroy_path,
    id: reposServerResponse[1].id,
    isLoading: false,
    list: [],
    location: reposServerResponse[1].location,
    name: reposServerResponse[1].path,
    tagsPath: reposServerResponse[1].tags_path,
  },
];

export const parsedRegistryServerResponse = [
  {
    tag: registryServerResponse[0].name,
    revision: registryServerResponse[0].revision,
    shortRevision: registryServerResponse[0].short_revision,
    size: registryServerResponse[0].size,
    layers: registryServerResponse[0].layers,
    location: registryServerResponse[0].location,
    createdAt: registryServerResponse[0].created_at,
    destroyPath: registryServerResponse[0].destroy_path,
    canDelete: true,
  },
  {
    tag: registryServerResponse[1].name,
    revision: registryServerResponse[1].revision,
    shortRevision: registryServerResponse[1].short_revision,
    size: registryServerResponse[1].size,
    layers: registryServerResponse[1].layers,
    location: registryServerResponse[1].location,
    createdAt: registryServerResponse[1].created_at,
    destroyPath: registryServerResponse[1].destroy_path,
    canDelete: false,
  },
];