debian-mirror-gitlab/spec/javascripts/ide/mock_data.js

199 lines
3.3 KiB
JavaScript
Raw Normal View History

2018-10-15 14:42:47 +05:30
export const projectData = {
id: 1,
name: 'abcproject',
web_url: '',
avatar_url: '',
path: '',
name_with_namespace: 'namespace/abcproject',
branches: {
master: {
treeId: 'abcproject/master',
2018-11-08 19:23:39 +05:30
can_push: true,
2018-11-18 11:00:15 +05:30
commit: {
id: '123',
},
2018-10-15 14:42:47 +05:30
},
},
mergeRequests: {},
2018-11-08 19:23:39 +05:30
merge_requests_enabled: true,
2019-09-04 21:01:54 +05:30
default_branch: 'master',
2018-10-15 14:42:47 +05:30
};
2018-11-08 19:23:39 +05:30
export const pipelines = [
{
id: 1,
ref: 'master',
sha: '123',
details: {
status: {
icon: 'status_failed',
group: 'failed',
text: 'Failed',
},
},
commit: { id: '123' },
},
{
id: 2,
ref: 'master',
sha: '213',
details: {
status: {
icon: 'status_failed',
group: 'failed',
text: 'Failed',
},
},
commit: { id: '213' },
},
];
export const stages = [
{
dropdown_path: `${gl.TEST_HOST}/testing`,
name: 'build',
status: {
icon: 'status_failed',
group: 'failed',
text: 'failed',
},
},
{
dropdown_path: 'testing',
name: 'test',
status: {
icon: 'status_failed',
group: 'failed',
text: 'failed',
},
},
];
export const jobs = [
{
id: 1,
name: 'test',
path: 'testing',
status: {
2018-11-18 11:00:15 +05:30
icon: 'status_success',
2018-11-08 19:23:39 +05:30
text: 'passed',
},
stage: 'test',
duration: 1,
started: new Date(),
},
{
id: 2,
name: 'test 2',
path: 'testing2',
status: {
2018-11-18 11:00:15 +05:30
icon: 'status_success',
2018-11-08 19:23:39 +05:30
text: 'passed',
},
stage: 'test',
duration: 1,
started: new Date(),
},
{
id: 3,
name: 'test 3',
path: 'testing3',
status: {
2018-11-18 11:00:15 +05:30
icon: 'status_success',
2018-11-08 19:23:39 +05:30
text: 'passed',
},
stage: 'test',
duration: 1,
started: new Date(),
},
{
id: 4,
name: 'test 4',
path: 'testing4',
status: {
icon: 'status_failed',
text: 'failed',
},
stage: 'build',
duration: 1,
started: new Date(),
},
];
export const fullPipelinesResponse = {
data: {
count: {
all: 2,
},
pipelines: [
{
id: '51',
path: 'test',
commit: {
id: '123',
},
details: {
status: {
icon: 'status_failed',
text: 'failed',
},
stages: [...stages],
},
},
{
id: '50',
commit: {
id: 'abc123def456ghi789jkl',
},
details: {
status: {
2018-11-18 11:00:15 +05:30
icon: 'status_success',
2018-11-08 19:23:39 +05:30
text: 'passed',
},
stages: [...stages],
},
},
],
},
};
export const mergeRequests = [
{
id: 1,
iid: 1,
title: 'Test merge request',
project_id: 1,
web_url: `${gl.TEST_HOST}/namespace/project-path/merge_requests/1`,
},
];
2018-11-18 11:00:15 +05:30
export const branches = [
{
id: 1,
name: 'master',
commit: {
message: 'Update master branch',
committed_date: '2018-08-01T00:20:05Z',
},
can_push: true,
},
{
id: 2,
name: 'feature/lorem-ipsum',
commit: {
message: 'Update some stuff',
committed_date: '2018-08-02T00:00:05Z',
},
can_push: true,
},
{
id: 3,
name: 'feature/dolar-amit',
commit: {
message: 'Update some more stuff',
committed_date: '2018-06-30T00:20:05Z',
},
can_push: true,
},
];