[SharedUxChromeNavigation] Use deeplink id instead of href (#159125)

This commit is contained in:
Sébastien Loix 2023-06-13 18:10:10 +01:00 committed by GitHub
parent b1128ea67b
commit fb41ca56f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
125 changed files with 2598 additions and 1627 deletions

View file

@ -0,0 +1,3 @@
# @kbn/deeplinks-management
Empty package generated by @kbn/generate

View file

@ -0,0 +1,13 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export const MONITORING_APP_ID = 'monitoring';
export const INTEGRATIONS_APP_ID = 'integrations';
export const FLEET_APP_ID = 'fleet';
export const OSQUERY_APP_ID = 'osquery';
export const MANAGEMENT_APP_ID = 'management';

View file

@ -0,0 +1,57 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import {
MONITORING_APP_ID,
INTEGRATIONS_APP_ID,
FLEET_APP_ID,
OSQUERY_APP_ID,
MANAGEMENT_APP_ID,
} from './constants';
// Monitoring
export type MonitoringAppId = typeof MONITORING_APP_ID;
export type MonitoringDeepLinkId = MonitoringAppId;
// Integrations
export type IntegrationsAppId = typeof INTEGRATIONS_APP_ID;
export type FleetAppId = typeof FLEET_APP_ID;
export type OsQueryAppId = typeof OSQUERY_APP_ID;
export type IntegrationsDeepLinkId = IntegrationsAppId | FleetAppId | OsQueryAppId;
// Management
export type ManagementAppId = typeof MANAGEMENT_APP_ID;
export type ManagementId =
| 'api_keys'
| 'cases'
| 'cross_cluster_replication'
| 'dataViews'
| 'index_lifecycle_management'
| 'index_management'
| 'ingest_pipelines'
| 'jobsListLink'
| 'objects'
| 'pipelines'
| 'remote_clusters'
| 'reporting'
| 'rollup_jobs'
| 'settings'
| 'snapshot_restore'
| 'spaces'
| 'tags'
| 'transform'
| 'triggersActions'
| 'triggersActionsConnectors'
| 'watcher';
export type ManagementDeepLinkId = MonitoringAppId | `${ManagementAppId}:${ManagementId}`;
// Combined
export type AppId = MonitoringAppId | IntegrationsAppId | ManagementAppId;
export type LinkId = ManagementId;
export type DeepLinkId = MonitoringDeepLinkId | IntegrationsDeepLinkId | ManagementDeepLinkId;

View file

@ -0,0 +1,11 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
export { MONITORING_APP_ID } from './constants';
export type { AppId, LinkId, DeepLinkId } from './deep_links';

View file

@ -0,0 +1,13 @@
/*
* 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 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
module.exports = {
preset: '@kbn/test',
rootDir: '../../..',
roots: ['<rootDir>/packages/deeplinks/management'],
};

View file

@ -0,0 +1,8 @@
{
"type": "shared-common",
"id": "@kbn/deeplinks-management",
"owner": [
"@elastic/platform-deployment-management",
"@elastic/kibana-data-discovery"
]
}

View file

@ -0,0 +1,6 @@
{
"name": "@kbn/deeplinks-management",
"private": true,
"version": "1.0.0",
"license": "SSPL-1.0 OR Elastic License 2.0"
}

View file

@ -0,0 +1,19 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "target/types",
"types": [
"jest",
"node",
"react"
]
},
"include": [
"**/*.ts",
"**/*.tsx",
],
"exclude": [
"target/**/*"
],
"kbn_references": []
}