{"size": 3475, "ext": "js", "max_stars_repo_path": "ee/spec/frontend/environments/mock_data.js", "max_stars_repo_name": "samg/a-gl", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "ee/spec/frontend/environments/mock_data.js", "max_issues_repo_name": "samg/a-gl", "max_issues_repo_issues_event_min_datetime": "2020-05-19T00:04:51.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-30T22:05:57.000Z", "max_forks_repo_path": "ee/spec/frontend/environments/mock_data.js", "max_forks_repo_name": "samg/a-gl", "max_forks_repo_forks_event_min_datetime": "2020-11-04T05:27:00.000Z", "max_forks_repo_forks_event_max_datetime": "2021-04-01T11:21:10.000Z"}
{"max_stars_count": null, "max_issues_count": 21, "max_forks_count": 2, "avg_line_length": 25.9328358209, "max_line_length": 99, "alphanum_fraction": 0.6048920863}
export const environment = {
  name: 'production',
  size: 1,
  state: 'stopped',
  external_url: 'http://external.com',
  environment_type: null,
  last_deployment: {
    id: 66,
    iid: 6,
    sha: '500aabcb17c97bdcf2d0c410b70cb8556f0362dd',
    ref: {
      name: 'master',
      ref_url: 'root/ci-folders/tree/master',
    },
    tag: true,
    'last?': true,
    user: {
      name: 'Administrator',
      username: 'root',
      id: 1,
      state: 'active',
      avatar_url:
        'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon',
      web_url: 'http://localhost:3000/root',
    },
    commit: {
      id: '500aabcb17c97bdcf2d0c410b70cb8556f0362dd',
      short_id: '500aabcb',
      title: 'Update .gitlab-ci.yml',
      author_name: 'Administrator',
      author_email: 'admin@example.com',
      created_at: '2016-11-07T18:28:13.000+00:00',
      message: 'Update .gitlab-ci.yml',
      author: {
        name: 'Administrator',
        username: 'root',
        id: 1,
        state: 'active',
        avatar_url:
          'https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon',
        web_url: 'http://localhost:3000/root',
      },
      commit_path: '/root/ci-folders/tree/500aabcb17c97bdcf2d0c410b70cb8556f0362dd',
    },
    deployable: {
      id: 1279,
      name: 'deploy',
      build_path: '/root/ci-folders/builds/1279',
      retry_path: '/root/ci-folders/builds/1279/retry',
      created_at: '2016-11-29T18:11:58.430Z',
      updated_at: '2016-11-29T18:11:58.430Z',
    },
    manual_actions: [
      {
        name: 'action',
        play_path: '/play',
      },
    ],
    deployed_at: '2016-11-29T18:11:58.430Z',
  },
  has_stop_action: true,
  environment_path: 'root/ci-folders/environments/31',
  log_path: 'root/ci-folders/environments/31/logs',
  created_at: '2016-11-07T11:11:16.525Z',
  updated_at: '2016-11-10T15:55:58.778Z',
};

const sharedEnvironmentData = (id) => ({
  environment_path: `/root/review-app/environments/${id}`,
  external_url: null,
  folderName: 'build',
  has_stop_action: false,
  id,
  last_deployment: null,
  rollout_status: {},
  state: 'available',
  stop_path: `/root/review-app/environments/${id}/stop`,
});

export const environmentsList = [
  {
    name: 'DEV',
    size: 1,
    environment_type: null,
    created_at: '2017-01-31T10:53:46.894Z',
    updated_at: '2017-01-31T10:53:46.894Z',
    ...sharedEnvironmentData(7),
  },
  {
    name: 'build/update-README',
    size: 5,
    environment_type: 'build',
    created_at: '2017-02-01T19:42:18.400Z',
    updated_at: '2017-02-01T19:42:18.400Z',
    ...sharedEnvironmentData(12),
  },
];

export const serverDataList = [
  {
    name: 'DEV',
    size: 1,
    latest: {
      name: 'DEV',
      environment_type: null,
      created_at: '2017-01-31T10:53:46.894Z',
      updated_at: '2017-01-31T10:53:46.894Z',
      ...sharedEnvironmentData(7),
    },
  },
  {
    name: 'build',
    size: 5,
    latest: {
      name: 'build/update-README',
      environment_type: 'build',
      created_at: '2017-02-01T19:42:18.400Z',
      updated_at: '2017-02-01T19:42:18.400Z',
      ...sharedEnvironmentData(12),
    },
  },
  {
    name: 'build',
    size: 1,
    latest: {
      name: 'build/update-README',
      environment_type: 'build',
      created_at: '2017-02-01T19:42:18.400Z',
      updated_at: '2017-02-01T19:42:18.400Z',
      ...sharedEnvironmentData(15),
    },
  },
];
