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

utils.js « error_tracking_settings « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 47a42dc374297ff2870536c16e07fea58a6bce9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
export const projectKeys = ['id', 'name', 'organizationName', 'organizationSlug', 'slug'];

export const transformFrontendSettings = ({
  apiHost,
  enabled,
  integrated,
  token,
  selectedProject,
}) => {
  const project = selectedProject
    ? {
        sentry_project_id: selectedProject.id,
        slug: selectedProject.slug,
        name: selectedProject.name,
        organization_name: selectedProject.organizationName,
        organization_slug: selectedProject.organizationSlug,
      }
    : null;

  return { api_host: apiHost || null, enabled, integrated, token: token || null, project };
};

export const getDisplayName = (project) => `${project.organizationName} | ${project.slug}`;