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

17 lines
612 B
JavaScript
Raw Normal View History

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