debian-mirror-gitlab/app/assets/javascripts/error_tracking_settings/utils.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
700 B
JavaScript
Raw Normal View History

2022-07-01 11:34:44 +05:30
export const projectKeys = ['id', 'name', 'organizationName', 'organizationSlug', 'slug'];
2019-07-07 11:18:12 +05:30
2021-11-11 11:23:49 +05:30
export const transformFrontendSettings = ({
apiHost,
enabled,
integrated,
token,
selectedProject,
}) => {
2019-07-07 11:18:12 +05:30
const project = selectedProject
? {
2022-07-01 11:34:44 +05:30
sentry_project_id: selectedProject.id,
2019-07-07 11:18:12 +05:30
slug: selectedProject.slug,
name: selectedProject.name,
organization_name: selectedProject.organizationName,
organization_slug: selectedProject.organizationSlug,
}
: null;
2021-11-11 11:23:49 +05:30
return { api_host: apiHost || null, enabled, integrated, token: token || null, project };
2019-07-07 11:18:12 +05:30
};
2021-03-08 18:12:59 +05:30
export const getDisplayName = (project) => `${project.organizationName} | ${project.slug}`;