summaryrefslogtreecommitdiff
path: root/spec/frontend/environments/graphql/mock_data.js
blob: e56b6448b7d90f874356ca1c198fad6ffe1746fd (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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
export const environmentsApp = {
  environments: [
    {
      name: 'review',
      size: 2,
      latest: {
        id: 42,
        global_id: 'gid://gitlab/Environment/42',
        name: 'review/goodbye',
        state: 'available',
        external_url: 'https://example.org',
        environment_type: 'review',
        name_without_type: 'goodbye',
        last_deployment: null,
        has_stop_action: false,
        rollout_status: null,
        environment_path: '/h5bp/html5-boilerplate/-/environments/42',
        stop_path: '/h5bp/html5-boilerplate/-/environments/42/stop',
        cancel_auto_stop_path: '/h5bp/html5-boilerplate/-/environments/42/cancel_auto_stop',
        delete_path: '/api/v4/projects/8/environments/42',
        folder_path: '/h5bp/html5-boilerplate/-/environments/folders/review',
        created_at: '2021-10-04T19:27:20.639Z',
        updated_at: '2021-10-04T19:27:20.639Z',
        can_stop: true,
        logs_path: '/h5bp/html5-boilerplate/-/logs?environment_name=review%2Fgoodbye',
        logs_api_path: '/h5bp/html5-boilerplate/-/logs/k8s.json?environment_name=review%2Fgoodbye',
        enable_advanced_logs_querying: false,
        can_delete: false,
        has_opened_alert: false,
      },
    },
    {
      name: 'production',
      size: 1,
      latest: {
        id: 8,
        global_id: 'gid://gitlab/Environment/8',
        name: 'production',
        state: 'available',
        external_url: 'https://example.org',
        environment_type: null,
        name_without_type: 'production',
        last_deployment: {
          id: 80,
          iid: 24,
          sha: '4ca0310329e8f251b892d7be205eec8b7dd220e5',
          ref: {
            name: 'root-master-patch-18104',
            ref_path: '/h5bp/html5-boilerplate/-/tree/root-master-patch-18104',
          },
          status: 'success',
          created_at: '2021-10-08T19:53:54.543Z',
          deployed_at: '2021-10-08T20:02:36.763Z',
          tag: false,
          'last?': true,
          user: {
            id: 1,
            name: 'Administrator',
            username: 'root',
            state: 'active',
            avatar_url:
              'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon',
            web_url: 'http://gdk.test:3000/root',
            show_status: false,
            path: '/root',
          },
          deployable: {
            id: 911,
            name: 'deploy-job',
            started: '2021-10-08T19:54:00.658Z',
            complete: true,
            archived: false,
            build_path: '/h5bp/html5-boilerplate/-/jobs/911',
            retry_path: '/h5bp/html5-boilerplate/-/jobs/911/retry',
            play_path: '/h5bp/html5-boilerplate/-/jobs/911/play',
            playable: true,
            scheduled: false,
            created_at: '2021-10-08T19:53:54.482Z',
            updated_at: '2021-10-08T20:02:36.730Z',
            status: {
              icon: 'status_success',
              text: 'passed',
              label: 'manual play action',
              group: 'success',
              tooltip: 'passed',
              has_details: true,
              details_path: '/h5bp/html5-boilerplate/-/jobs/911',
              illustration: {
                image:
                  '/assets/illustrations/manual_action-c55aee2c5f9ebe9f72751480af8bb307be1a6f35552f344cc6d1bf979d3422f6.svg',
                size: 'svg-394',
                title: 'This job requires a manual action',
                content:
                  'This job requires manual intervention to start. Before starting this job, you can add variables below for last-minute configuration changes.',
              },
              favicon:
                '/assets/ci_favicons/favicon_status_success-8451333011eee8ce9f2ab25dc487fe24a8758c694827a582f17f42b0a90446a2.png',
              action: {
                icon: 'play',
                title: 'Play',
                path: '/h5bp/html5-boilerplate/-/jobs/911/play',
                method: 'post',
                button_title: 'Trigger this manual action',
              },
            },
          },
          commit: {
            id: '4ca0310329e8f251b892d7be205eec8b7dd220e5',
            short_id: '4ca03103',
            created_at: '2021-10-08T19:27:01.000+00:00',
            parent_ids: ['b385360b15bd61391a0efbd101788d4a80387270'],
            title: 'Update .gitlab-ci.yml',
            message: 'Update .gitlab-ci.yml',
            author_name: 'Administrator',
            author_email: 'admin@example.com',
            authored_date: '2021-10-08T19:27:01.000+00:00',
            committer_name: 'Administrator',
            committer_email: 'admin@example.com',
            committed_date: '2021-10-08T19:27:01.000+00:00',
            trailers: {},
            web_url:
              'http://gdk.test:3000/h5bp/html5-boilerplate/-/commit/4ca0310329e8f251b892d7be205eec8b7dd220e5',
            author: {
              id: 1,
              name: 'Administrator',
              username: 'root',
              state: 'active',
              avatar_url:
                'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon',
              web_url: 'http://gdk.test:3000/root',
              show_status: false,
              path: '/root',
            },
            author_gravatar_url:
              'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon',
            commit_url:
              'http://gdk.test:3000/h5bp/html5-boilerplate/-/commit/4ca0310329e8f251b892d7be205eec8b7dd220e5',
            commit_path:
              '/h5bp/html5-boilerplate/-/commit/4ca0310329e8f251b892d7be205eec8b7dd220e5',
          },
          manual_actions: [],
          scheduled_actions: [],
          playable_build: {
            retry_path: '/h5bp/html5-boilerplate/-/jobs/911/retry',
            play_path: '/h5bp/html5-boilerplate/-/jobs/911/play',
          },
          cluster: null,
        },
        has_stop_action: false,
        rollout_status: null,
        environment_path: '/h5bp/html5-boilerplate/-/environments/8',
        stop_path: '/h5bp/html5-boilerplate/-/environments/8/stop',
        cancel_auto_stop_path: '/h5bp/html5-boilerplate/-/environments/8/cancel_auto_stop',
        delete_path: '/api/v4/projects/8/environments/8',
        folder_path: '/h5bp/html5-boilerplate/-/environments/folders/production',
        created_at: '2021-06-17T15:09:38.599Z',
        updated_at: '2021-10-08T19:50:44.445Z',
        can_stop: true,
        logs_path: '/h5bp/html5-boilerplate/-/logs?environment_name=production',
        logs_api_path: '/h5bp/html5-boilerplate/-/logs/k8s.json?environment_name=production',
        enable_advanced_logs_querying: false,
        can_delete: false,
        has_opened_alert: false,
      },
    },
    {
      name: 'staging',
      size: 1,
      latest: {
        id: 7,
        global_id: 'gid://gitlab/Environment/7',
        name: 'staging',
        state: 'available',
        external_url: null,
        environment_type: null,
        name_without_type: 'staging',
        last_deployment: null,
        has_stop_action: false,
        rollout_status: null,
        environment_path: '/h5bp/html5-boilerplate/-/environments/7',
        stop_path: '/h5bp/html5-boilerplate/-/environments/7/stop',
        cancel_auto_stop_path: '/h5bp/html5-boilerplate/-/environments/7/cancel_auto_stop',
        delete_path: '/api/v4/projects/8/environments/7',
        folder_path: '/h5bp/html5-boilerplate/-/environments/folders/staging',
        created_at: '2021-06-17T15:09:38.570Z',
        updated_at: '2021-06-17T15:09:38.570Z',
        can_stop: true,
        logs_path: '/h5bp/html5-boilerplate/-/logs?environment_name=staging',
        logs_api_path: '/h5bp/html5-boilerplate/-/logs/k8s.json?environment_name=staging',
        enable_advanced_logs_querying: false,
        can_delete: false,
        has_opened_alert: false,
      },
    },
  ],
  review_app: {
    can_setup_review_app: true,
    all_clusters_empty: true,
    review_snippet:
      '{"deploy_review"=>{"stage"=>"deploy", "script"=>["echo \\"Deploy a review app\\""], "environment"=>{"name"=>"review/$CI_COMMIT_REF_NAME", "url"=>"https://$CI_ENVIRONMENT_SLUG.example.com"}, "only"=>["branches"]}}',
  },
  available_count: 4,
  stopped_count: 0,
};

export const resolvedEnvironmentsApp = {
  availableCount: 4,
  environments: [
    {
      name: 'review',
      size: 2,
      latest: {
        id: 42,
        globalId: 'gid://gitlab/Environment/42',
        name: 'review/goodbye',
        state: 'available',
        externalUrl: 'https://example.org',
        environmentType: 'review',
        nameWithoutType: 'goodbye',
        lastDeployment: null,
        hasStopAction: false,
        rolloutStatus: null,
        environmentPath: '/h5bp/html5-boilerplate/-/environments/42',
        stopPath: '/h5bp/html5-boilerplate/-/environments/42/stop',
        cancelAutoStopPath: '/h5bp/html5-boilerplate/-/environments/42/cancel_auto_stop',
        deletePath: '/api/v4/projects/8/environments/42',
        folderPath: '/h5bp/html5-boilerplate/-/environments/folders/review',
        createdAt: '2021-10-04T19:27:20.639Z',
        updatedAt: '2021-10-04T19:27:20.639Z',
        canStop: true,
        logsPath: '/h5bp/html5-boilerplate/-/logs?environment_name=review%2Fgoodbye',
        logsApiPath: '/h5bp/html5-boilerplate/-/logs/k8s.json?environment_name=review%2Fgoodbye',
        enableAdvancedLogsQuerying: false,
        canDelete: false,
        hasOpenedAlert: false,
      },
      __typename: 'NestedLocalEnvironment',
    },
    {
      name: 'production',
      size: 1,
      latest: {
        id: 8,
        globalId: 'gid://gitlab/Environment/8',
        name: 'production',
        state: 'available',
        externalUrl: 'https://example.org',
        environmentType: null,
        nameWithoutType: 'production',
        lastDeployment: {
          id: 80,
          iid: 24,
          sha: '4ca0310329e8f251b892d7be205eec8b7dd220e5',
          ref: {
            name: 'root-master-patch-18104',
            refPath: '/h5bp/html5-boilerplate/-/tree/root-master-patch-18104',
          },
          status: 'success',
          createdAt: '2021-10-08T19:53:54.543Z',
          deployedAt: '2021-10-08T20:02:36.763Z',
          tag: false,
          'last?': true,
          user: {
            id: 1,
            name: 'Administrator',
            username: 'root',
            state: 'active',
            avatarUrl:
              'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon',
            webUrl: 'http://gdk.test:3000/root',
            showStatus: false,
            path: '/root',
          },
          deployable: {
            id: 911,
            name: 'deploy-job',
            started: '2021-10-08T19:54:00.658Z',
            complete: true,
            archived: false,
            buildPath: '/h5bp/html5-boilerplate/-/jobs/911',
            retryPath: '/h5bp/html5-boilerplate/-/jobs/911/retry',
            playPath: '/h5bp/html5-boilerplate/-/jobs/911/play',
            playable: true,
            scheduled: false,
            createdAt: '2021-10-08T19:53:54.482Z',
            updatedAt: '2021-10-08T20:02:36.730Z',
            status: {
              icon: 'status_success',
              text: 'passed',
              label: 'manual play action',
              group: 'success',
              tooltip: 'passed',
              hasDetails: true,
              detailsPath: '/h5bp/html5-boilerplate/-/jobs/911',
              illustration: {
                image:
                  '/assets/illustrations/manual_action-c55aee2c5f9ebe9f72751480af8bb307be1a6f35552f344cc6d1bf979d3422f6.svg',
                size: 'svg-394',
                title: 'This job requires a manual action',
                content:
                  'This job requires manual intervention to start. Before starting this job, you can add variables below for last-minute configuration changes.',
              },
              favicon:
                '/assets/ci_favicons/favicon_status_success-8451333011eee8ce9f2ab25dc487fe24a8758c694827a582f17f42b0a90446a2.png',
              action: {
                icon: 'play',
                title: 'Play',
                path: '/h5bp/html5-boilerplate/-/jobs/911/play',
                method: 'post',
                buttonTitle: 'Trigger this manual action',
              },
            },
          },
          commit: {
            id: '4ca0310329e8f251b892d7be205eec8b7dd220e5',
            shortId: '4ca03103',
            createdAt: '2021-10-08T19:27:01.000+00:00',
            parentIds: ['b385360b15bd61391a0efbd101788d4a80387270'],
            title: 'Update .gitlab-ci.yml',
            message: 'Update .gitlab-ci.yml',
            authorName: 'Administrator',
            authorEmail: 'admin@example.com',
            authoredDate: '2021-10-08T19:27:01.000+00:00',
            committerName: 'Administrator',
            committerEmail: 'admin@example.com',
            committedDate: '2021-10-08T19:27:01.000+00:00',
            trailers: {},
            webUrl:
              'http://gdk.test:3000/h5bp/html5-boilerplate/-/commit/4ca0310329e8f251b892d7be205eec8b7dd220e5',
            author: {
              id: 1,
              name: 'Administrator',
              username: 'root',
              state: 'active',
              avatarUrl:
                'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon',
              webUrl: 'http://gdk.test:3000/root',
              showStatus: false,
              path: '/root',
            },
            authorGravatarUrl:
              'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon',
            commitUrl:
              'http://gdk.test:3000/h5bp/html5-boilerplate/-/commit/4ca0310329e8f251b892d7be205eec8b7dd220e5',
            commitPath: '/h5bp/html5-boilerplate/-/commit/4ca0310329e8f251b892d7be205eec8b7dd220e5',
          },
          manualActions: [],
          scheduledActions: [],
          playableBuild: {
            retryPath: '/h5bp/html5-boilerplate/-/jobs/911/retry',
            playPath: '/h5bp/html5-boilerplate/-/jobs/911/play',
          },
          cluster: null,
        },
        hasStopAction: false,
        rolloutStatus: null,
        environmentPath: '/h5bp/html5-boilerplate/-/environments/8',
        stopPath: '/h5bp/html5-boilerplate/-/environments/8/stop',
        cancelAutoStopPath: '/h5bp/html5-boilerplate/-/environments/8/cancel_auto_stop',
        deletePath: '/api/v4/projects/8/environments/8',
        folderPath: '/h5bp/html5-boilerplate/-/environments/folders/production',
        createdAt: '2021-06-17T15:09:38.599Z',
        updatedAt: '2021-10-08T19:50:44.445Z',
        canStop: true,
        logsPath: '/h5bp/html5-boilerplate/-/logs?environment_name=production',
        logsApiPath: '/h5bp/html5-boilerplate/-/logs/k8s.json?environment_name=production',
        enableAdvancedLogsQuerying: false,
        canDelete: false,
        hasOpenedAlert: false,
      },
      __typename: 'NestedLocalEnvironment',
    },
    {
      name: 'staging',
      size: 1,
      latest: {
        id: 7,
        globalId: 'gid://gitlab/Environment/7',
        name: 'staging',
        state: 'available',
        externalUrl: null,
        environmentType: null,
        nameWithoutType: 'staging',
        lastDeployment: null,
        hasStopAction: false,
        rolloutStatus: null,
        environmentPath: '/h5bp/html5-boilerplate/-/environments/7',
        stopPath: '/h5bp/html5-boilerplate/-/environments/7/stop',
        cancelAutoStopPath: '/h5bp/html5-boilerplate/-/environments/7/cancel_auto_stop',
        deletePath: '/api/v4/projects/8/environments/7',
        folderPath: '/h5bp/html5-boilerplate/-/environments/folders/staging',
        createdAt: '2021-06-17T15:09:38.570Z',
        updatedAt: '2021-06-17T15:09:38.570Z',
        canStop: true,
        logsPath: '/h5bp/html5-boilerplate/-/logs?environment_name=staging',
        logsApiPath: '/h5bp/html5-boilerplate/-/logs/k8s.json?environment_name=staging',
        enableAdvancedLogsQuerying: false,
        canDelete: false,
        hasOpenedAlert: false,
      },
      __typename: 'NestedLocalEnvironment',
    },
  ],
  reviewApp: {
    canSetupReviewApp: true,
    allClustersEmpty: true,
    reviewSnippet:
      '{"deploy_review"=>{"stage"=>"deploy", "script"=>["echo \\"Deploy a review app\\""], "environment"=>{"name"=>"review/$CI_COMMIT_REF_NAME", "url"=>"https://$CI_ENVIRONMENT_SLUG.example.com"}, "only"=>["branches"]}}',
    __typename: 'ReviewApp',
  },
  stoppedCount: 0,
  __typename: 'LocalEnvironmentApp',
};

export const folder = {
  environments: [
    {
      id: 42,
      global_id: 'gid://gitlab/Environment/42',
      name: 'review/goodbye',
      state: 'available',
      external_url: 'https://example.org',
      environment_type: 'review',
      name_without_type: 'goodbye',
      last_deployment: null,
      has_stop_action: false,
      rollout_status: null,
      environment_path: '/h5bp/html5-boilerplate/-/environments/42',
      stop_path: '/h5bp/html5-boilerplate/-/environments/42/stop',
      cancel_auto_stop_path: '/h5bp/html5-boilerplate/-/environments/42/cancel_auto_stop',
      delete_path: '/api/v4/projects/8/environments/42',
      folder_path: '/h5bp/html5-boilerplate/-/environments/folders/review',
      created_at: '2021-10-04T19:27:20.639Z',
      updated_at: '2021-10-04T19:27:20.639Z',
      can_stop: true,
      logs_path: '/h5bp/html5-boilerplate/-/logs?environment_name=review%2Fgoodbye',
      logs_api_path: '/h5bp/html5-boilerplate/-/logs/k8s.json?environment_name=review%2Fgoodbye',
      enable_advanced_logs_querying: false,
      can_delete: false,
      has_opened_alert: false,
    },
    {
      id: 41,
      global_id: 'gid://gitlab/Environment/41',
      name: 'review/hello',
      state: 'available',
      external_url: 'https://example.org',
      environment_type: 'review',
      name_without_type: 'hello',
      last_deployment: null,
      has_stop_action: false,
      rollout_status: null,
      environment_path: '/h5bp/html5-boilerplate/-/environments/41',
      stop_path: '/h5bp/html5-boilerplate/-/environments/41/stop',
      cancel_auto_stop_path: '/h5bp/html5-boilerplate/-/environments/41/cancel_auto_stop',
      delete_path: '/api/v4/projects/8/environments/41',
      folder_path: '/h5bp/html5-boilerplate/-/environments/folders/review',
      created_at: '2021-10-04T19:27:00.527Z',
      updated_at: '2021-10-04T19:27:00.527Z',
      can_stop: true,
      logs_path: '/h5bp/html5-boilerplate/-/logs?environment_name=review%2Fhello',
      logs_api_path: '/h5bp/html5-boilerplate/-/logs/k8s.json?environment_name=review%2Fhello',
      enable_advanced_logs_querying: false,
      can_delete: false,
      has_opened_alert: false,
    },
  ],
  available_count: 2,
  stopped_count: 0,
};

export const resolvedFolder = {
  availableCount: 2,
  environments: [
    {
      id: 42,
      globalId: 'gid://gitlab/Environment/42',
      name: 'review/goodbye',
      state: 'available',
      externalUrl: 'https://example.org',
      environmentType: 'review',
      nameWithoutType: 'goodbye',
      lastDeployment: null,
      hasStopAction: false,
      rolloutStatus: null,
      environmentPath: '/h5bp/html5-boilerplate/-/environments/42',
      stopPath: '/h5bp/html5-boilerplate/-/environments/42/stop',
      cancelAutoStopPath: '/h5bp/html5-boilerplate/-/environments/42/cancel_auto_stop',
      deletePath: '/api/v4/projects/8/environments/42',
      folderPath: '/h5bp/html5-boilerplate/-/environments/folders/review',
      createdAt: '2021-10-04T19:27:20.639Z',
      updatedAt: '2021-10-04T19:27:20.639Z',
      canStop: true,
      logsPath: '/h5bp/html5-boilerplate/-/logs?environment_name=review%2Fgoodbye',
      logsApiPath: '/h5bp/html5-boilerplate/-/logs/k8s.json?environment_name=review%2Fgoodbye',
      enableAdvancedLogsQuerying: false,
      canDelete: false,
      hasOpenedAlert: false,
      __typename: 'LocalEnvironment',
    },
    {
      id: 41,
      globalId: 'gid://gitlab/Environment/41',
      name: 'review/hello',
      state: 'available',
      externalUrl: 'https://example.org',
      environmentType: 'review',
      nameWithoutType: 'hello',
      lastDeployment: null,
      hasStopAction: false,
      rolloutStatus: null,
      environmentPath: '/h5bp/html5-boilerplate/-/environments/41',
      stopPath: '/h5bp/html5-boilerplate/-/environments/41/stop',
      cancelAutoStopPath: '/h5bp/html5-boilerplate/-/environments/41/cancel_auto_stop',
      deletePath: '/api/v4/projects/8/environments/41',
      folderPath: '/h5bp/html5-boilerplate/-/environments/folders/review',
      createdAt: '2021-10-04T19:27:00.527Z',
      updatedAt: '2021-10-04T19:27:00.527Z',
      canStop: true,
      logsPath: '/h5bp/html5-boilerplate/-/logs?environment_name=review%2Fhello',
      logsApiPath: '/h5bp/html5-boilerplate/-/logs/k8s.json?environment_name=review%2Fhello',
      enableAdvancedLogsQuerying: false,
      canDelete: false,
      hasOpenedAlert: false,
      __typename: 'LocalEnvironment',
    },
  ],
  stoppedCount: 0,
  __typename: 'LocalEnvironmentFolder',
};