"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.projectSettingsNavLinks = exports.projectSettingsNavCategories = exports.createProjectSettingsLinkFromManage = void 0; var _securitySolutionNavigation = require("@kbn/security-solution-navigation"); var _common = require("@kbn/security-solution-plugin/common"); var _constants = require("../constants"); var _lazy_icons = require("../../../common/lazy_icons"); var i18n = _interopRequireWildcard(require("./project_settings_translations")); function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ // appLinks configures the Security Solution pages links const projectSettingsAppLink = { id: _securitySolutionNavigation.SecurityPageName.projectSettings, title: i18n.PROJECT_SETTINGS_TITLE, path: _constants.SecurityPagePath[_securitySolutionNavigation.SecurityPageName.projectSettings], capabilities: [`${_common.SERVER_APP_ID}.show`], hideTimeline: true, skipUrlState: true, links: [] // endpoints and cloudDefend links are added in createAssetsLinkFromManage }; const createProjectSettingsLinkFromManage = manageLink => { var _manageLink$links; const projectSettingsSubLinks = []; const entityAnalyticsLink = (_manageLink$links = manageLink.links) === null || _manageLink$links === void 0 ? void 0 : _manageLink$links.find(({ id }) => id === _securitySolutionNavigation.SecurityPageName.entityAnalyticsManagement); if (entityAnalyticsLink) { projectSettingsSubLinks.push(entityAnalyticsLink); } return { ...projectSettingsAppLink, links: projectSettingsSubLinks // cloudDefend and endpoints links are added in the projectAppLinksSwitcher on runtime }; }; exports.createProjectSettingsLinkFromManage = createProjectSettingsLinkFromManage; const projectSettingsNavCategories = [{ type: _securitySolutionNavigation.LinkCategoryType.separator, linkIds: [_constants.ExternalPageName.cloudUsersAndRoles, _constants.ExternalPageName.cloudBilling, _constants.ExternalPageName.integrationsSecurity, _securitySolutionNavigation.SecurityPageName.entityAnalyticsManagement] }, { type: _securitySolutionNavigation.LinkCategoryType.accordion, label: i18n.MANAGEMENT_CATEGORY_TITLE, categories: [{ label: i18n.DATA_CATEGORY_TITLE, iconType: _lazy_icons.IconIndexManagementLazy, linkIds: [_constants.ExternalPageName.managementIndexManagement, _constants.ExternalPageName.managementTransforms, _constants.ExternalPageName.managementIngestPipelines, _constants.ExternalPageName.managementDataViews, _constants.ExternalPageName.managementJobsListLink, _constants.ExternalPageName.managementPipelines] }, { label: i18n.ALERTS_INSIGHTS_CATEGORY_TITLE, iconType: _lazy_icons.IconProductFeaturesAlertingLazy, linkIds: [_constants.ExternalPageName.managementCases, _constants.ExternalPageName.managementTriggersActionsConnectors, _constants.ExternalPageName.managementMaintenanceWindows] }, { label: i18n.CONTENT_CATEGORY_TITLE, iconType: _lazy_icons.IconSecurityShieldLazy, linkIds: [_constants.ExternalPageName.managementObjects, _constants.ExternalPageName.managementFiles, _constants.ExternalPageName.managementReporting, _constants.ExternalPageName.managementTags] }, { label: i18n.OTHER_CATEGORY_TITLE, iconType: _lazy_icons.IconMapServicesLazy, linkIds: [_constants.ExternalPageName.managementApiKeys, _constants.ExternalPageName.managementSettings] }] }]; // navLinks define the navigation links for the Security Solution pages and External pages as well exports.projectSettingsNavCategories = projectSettingsNavCategories; const projectSettingsNavLinks = [{ id: _constants.ExternalPageName.cloudUsersAndRoles, title: i18n.CLOUD_USERS_ROLES_TITLE, description: i18n.CLOUD_USERS_ROLES_DESCRIPTION, landingIcon: _lazy_icons.IconGraphLazy }, { id: _constants.ExternalPageName.cloudBilling, title: i18n.CLOUD_BILLING_TITLE, description: i18n.CLOUD_BILLING_DESCRIPTION, landingIcon: _lazy_icons.IconLoggingLazy }, { id: _constants.ExternalPageName.integrationsSecurity, title: i18n.INTEGRATIONS_TITLE, description: i18n.INTEGRATIONS_DESCRIPTION, landingIcon: _lazy_icons.IconIndexManagementLazy }, { id: _constants.ExternalPageName.managementIndexManagement, title: i18n.MANAGEMENT_INDEX_MANAGEMENT_TITLE }, { id: _constants.ExternalPageName.managementTransforms, title: i18n.MANAGEMENT_TRANSFORMS_TITLE }, { id: _constants.ExternalPageName.managementMaintenanceWindows, title: i18n.MANAGEMENT_MAINTENANCE_WINDOWS_TITLE }, { id: _constants.ExternalPageName.managementIngestPipelines, title: i18n.MANAGEMENT_INGEST_PIPELINES_TITLE }, { id: _constants.ExternalPageName.managementDataViews, title: i18n.MANAGEMENT_DATA_VIEWS_TITLE }, { id: _constants.ExternalPageName.managementJobsListLink, title: i18n.MANAGEMENT_ML_TITLE }, { id: _constants.ExternalPageName.managementPipelines, title: i18n.MANAGEMENT_LOGSTASH_PIPELINES_TITLE }, { id: _constants.ExternalPageName.managementCases, title: i18n.MANAGEMENT_CASES_TITLE }, { id: _constants.ExternalPageName.managementTriggersActionsConnectors, title: i18n.MANAGEMENT_CONNECTORS_TITLE }, { id: _constants.ExternalPageName.managementReporting, title: i18n.MANAGEMENT_REPORTING_TITLE }, { id: _constants.ExternalPageName.managementObjects, title: i18n.MANAGEMENT_SAVED_OBJECTS_TITLE }, { id: _constants.ExternalPageName.managementApiKeys, title: i18n.MANAGEMENT_API_KEYS_TITLE }, { id: _constants.ExternalPageName.managementTags, title: i18n.MANAGEMENT_TAGS_TITLE }, { id: _constants.ExternalPageName.managementFiles, title: i18n.MANAGEMENT_FILES_TITLE }, { id: _constants.ExternalPageName.managementSettings, title: i18n.MANAGEMENT_SETTINGS_TITLE }]; exports.projectSettingsNavLinks = projectSettingsNavLinks;