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

linked_pipelines_accessors.js « accessors « pipeline_mini_graph « components « pipelines « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1ca9e35c00880701a81e987039f74b9f343cebe3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { get } from 'lodash';

export const accessors = {
  rest: {
    detailedStatus: ['details', 'status'],
  },
  graphql: {
    detailedStatus: 'detailedStatus',
  },
};

export const accessValue = (pipeline, dataMethod, path) => {
  return get(pipeline, accessors[dataMethod][path]);
};