Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,9 @@ src/core/packages/user-settings/server-mocks @elastic/kibana-security
src/core/test-helpers/kbn-server @elastic/kibana-core
src/core/test-helpers/model-versions @elastic/kibana-core
src/platform/packages/private/analytics/utils/analytics_collection_utils @elastic/kibana-core
src/platform/packages/private/dashboard/dashboard-navigation-options-common @elastic/kibana-presentation
src/platform/packages/private/dashboard/dashboard-navigation-options-components @elastic/kibana-presentation
src/platform/packages/private/dashboard/dashboard-navigation-options-schema @elastic/kibana-presentation
src/platform/packages/private/kbn-ambient-common-types @elastic/kibana-operations
src/platform/packages/private/kbn-ambient-ftr-types @elastic/kibana-operations @elastic/appex-qa
src/platform/packages/private/kbn-apm-config-loader @elastic/kibana-core @vigneshshanmugam
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,9 @@
"@kbn/dashboard-agent-common": "link:x-pack/platform/packages/shared/dashboard-agent/dashboard-agent-common",
"@kbn/dashboard-agent-plugin": "link:x-pack/platform/plugins/shared/dashboard_agent",
"@kbn/dashboard-markdown": "link:src/platform/plugins/shared/dashboard_markdown",
"@kbn/dashboard-navigation-options-common": "link:src/platform/packages/private/dashboard/dashboard-navigation-options-common",
"@kbn/dashboard-navigation-options-components": "link:src/platform/packages/private/dashboard/dashboard-navigation-options-components",
"@kbn/dashboard-navigation-options-schema": "link:src/platform/packages/private/dashboard/dashboard-navigation-options-schema",
"@kbn/dashboard-plugin": "link:src/platform/plugins/shared/dashboard",
"@kbn/dashboards-selector": "link:src/platform/packages/shared/dashboards/dashboards-selector",
"@kbn/data-forge": "link:x-pack/platform/packages/shared/kbn-data-forge",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

export { dashboardNavigationOptionsSchema } from './schemas';
export type { DashboardNavigationOptions } from './types';
export const DEFAULT_DASHBOARD_NAVIGATION_OPTIONS = {
open_in_new_tab: false,
use_time_range: true,
use_filters: true,
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import type { TypeOf } from '@kbn/config-schema';
import type { dashboardNavigationOptionsSchema } from './schemas';

export type DashboardNavigationOptions = TypeOf<typeof dashboardNavigationOptionsSchema>;
module.exports = {
preset: '@kbn/test/jest_node',
rootDir: '../../../../../..',
roots: ['<rootDir>/src/platform/packages/private/dashboard/dashboard-navigation-options-common'],
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "shared-common",
"id": "@kbn/dashboard-navigation-options-common",
"owner": "@elastic/kibana-presentation",
"group": "platform",
"visibility": "private"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This file is generated by the @kbn/moon package. Any manual edits will be erased!
# To extend this, write your extensions/overrides to 'moon.extend.yml'
# then regenerate this file with: 'node scripts/regenerate_moon_projects.js --update --filter @kbn/dashboard-navigation-options-common'

$schema: https://moonrepo.dev/schemas/project.json
id: '@kbn/dashboard-navigation-options-common'
layer: unknown
owners:
defaultOwner: '@elastic/kibana-presentation'
toolchains:
default: node
language: typescript
project:
title: '@kbn/dashboard-navigation-options-common'
description: Moon project for @kbn/dashboard-navigation-options-common
channel: ''
owner: '@elastic/kibana-presentation'
sourceRoot: src/platform/packages/private/dashboard/dashboard-navigation-options-common
dependsOn: []
tags:
- shared-common
- package
- prod
- group-platform
- private
- jest-unit-tests
fileGroups:
src:
- '**/*.ts'
- '!target/**/*'
jest-config:
- jest.config.js
tasks: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "@kbn/dashboard-navigation-options-common",
"private": true,
"version": "1.0.0",
"license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0",
"sideEffects": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "@kbn/tsconfig-base/tsconfig.json",
"compilerOptions": {
"outDir": "target/types",
},
"include": [
"**/*.ts",
],
"exclude": [
"target/**/*"
],
"kbn_references": []
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import { i18n } from '@kbn/i18n';
import React from 'react';
import { EuiFormRow, EuiSpacer, EuiSwitch } from '@elastic/eui';
import type { DashboardNavigationOptions } from '../../server';
import type { DashboardNavigationOptions } from '@kbn/dashboard-navigation-options-schema';

export interface Props {
options: DashboardNavigationOptions;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/

module.exports = {
preset: '@kbn/test',
rootDir: '../../../../../..',
roots: [
'<rootDir>/src/platform/packages/private/dashboard/dashboard-navigation-options-components',
],
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "shared-browser",
"id": "@kbn/dashboard-navigation-options-components",
"owner": "@elastic/kibana-presentation",
"group": "platform",
"visibility": "private"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This file is generated by the @kbn/moon package. Any manual edits will be erased!
# To extend this, write your extensions/overrides to 'moon.extend.yml'
# then regenerate this file with: 'node scripts/regenerate_moon_projects.js --update --filter @kbn/dashboard-navigation-options-components'

$schema: https://moonrepo.dev/schemas/project.json
id: '@kbn/dashboard-navigation-options-components'
layer: unknown
owners:
defaultOwner: '@elastic/kibana-presentation'
toolchains:
default: node
language: typescript
project:
title: '@kbn/dashboard-navigation-options-components'
description: Moon project for @kbn/dashboard-navigation-options-components
channel: ''
owner: '@elastic/kibana-presentation'
sourceRoot: src/platform/packages/private/dashboard/dashboard-navigation-options-components
dependsOn:
- '@kbn/i18n'
- '@kbn/dashboard-navigation-options-schema'
tags:
- shared-browser
- package
- prod
- group-platform
- private
- jest-unit-tests
fileGroups:
src:
- '**/*.ts'
- '**/*.tsx'
- '!target/**/*'
jest-config:
- jest.config.js
tasks: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "@kbn/dashboard-navigation-options-components",
"private": true,
"version": "1.0.0",
"license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0",
"sideEffects": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "@kbn/tsconfig-base/tsconfig.json",
"compilerOptions": {
"outDir": "target/types",
},
"include": [
"**/*.ts",
"**/*.tsx",
],
"exclude": [
"target/**/*"
],
"kbn_references": [
"@kbn/i18n",
"@kbn/dashboard-navigation-options-schema"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import type { TypeOf } from '@kbn/config-schema';
import { schema } from '@kbn/config-schema';
import { DEFAULT_DASHBOARD_NAVIGATION_OPTIONS } from '../../common/page_bundle_constants';
import { DEFAULT_DASHBOARD_NAVIGATION_OPTIONS } from '@kbn/dashboard-navigation-options-common';

export const dashboardNavigationOptionsSchema = schema.object({
use_filters: schema.boolean({
Expand All @@ -30,3 +31,5 @@ export const dashboardNavigationOptionsSchema = schema.object({
},
}),
});

export type DashboardNavigationOptions = TypeOf<typeof dashboardNavigationOptionsSchema>;
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/

module.exports = {
preset: '@kbn/test/jest_node',
rootDir: '../../../../../..',
roots: ['<rootDir>/src/platform/packages/private/dashboard/dashboard-navigation-options-schema'],
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "shared-server",
"id": "@kbn/dashboard-navigation-options-schema",
"owner": "@elastic/kibana-presentation",
"group": "platform",
"visibility": "private"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This file is generated by the @kbn/moon package. Any manual edits will be erased!
# To extend this, write your extensions/overrides to 'moon.extend.yml'
# then regenerate this file with: 'node scripts/regenerate_moon_projects.js --update --filter @kbn/dashboard-navigation-options-schema'

$schema: https://moonrepo.dev/schemas/project.json
id: '@kbn/dashboard-navigation-options-schema'
layer: unknown
owners:
defaultOwner: '@elastic/kibana-presentation'
toolchains:
default: node
language: typescript
project:
title: '@kbn/dashboard-navigation-options-schema'
description: Moon project for @kbn/dashboard-navigation-options-schema
channel: ''
owner: '@elastic/kibana-presentation'
sourceRoot: src/platform/packages/private/dashboard/dashboard-navigation-options-schema
dependsOn:
- '@kbn/config-schema'
- '@kbn/dashboard-navigation-options-common'
tags:
- shared-server
- package
- prod
- group-platform
- private
- jest-unit-tests
fileGroups:
src:
- '**/*.ts'
- '!target/**/*'
jest-config:
- jest.config.js
tasks: {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "@kbn/dashboard-navigation-options-schema",
"private": true,
"version": "1.0.0",
"license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0",
"sideEffects": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"extends": "@kbn/tsconfig-base/tsconfig.json",
"compilerOptions": {
"outDir": "target/types",
},
"include": [
"**/*.ts",
],
"exclude": [
"target/**/*"
],
"kbn_references": [
"@kbn/config-schema",
"@kbn/dashboard-navigation-options-common"
]
}
3 changes: 3 additions & 0 deletions src/platform/plugins/private/links/moon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ dependsOn:
- '@kbn/es-query'
- '@kbn/presentation-util'
- '@kbn/kibana-utils-plugin'
- '@kbn/dashboard-navigation-options-common'
- '@kbn/dashboard-navigation-options-components'
- '@kbn/dashboard-navigation-options-schema'
tags:
- plugin
- prod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import type { ResolvedLink } from '../../types';
import { BehaviorSubject } from 'rxjs';
import type { AggregateQuery, Filter, Query, TimeRange } from '@kbn/es-query';
import { EuiThemeProvider } from '@elastic/eui';
import { DEFAULT_DASHBOARD_NAVIGATION_OPTIONS } from '@kbn/dashboard-plugin/public';
import { DEFAULT_DASHBOARD_NAVIGATION_OPTIONS } from '@kbn/dashboard-navigation-options-common';

function createMockLinksParent({
initialQuery,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import type { DashboardLocatorParams } from '@kbn/dashboard-plugin/common';
import type { Query } from '@kbn/es-query';
import { isFilterPinned } from '@kbn/es-query';
import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing';
import type { DashboardNavigationOptions } from '@kbn/dashboard-plugin/server';
import { DEFAULT_DASHBOARD_NAVIGATION_OPTIONS } from '@kbn/dashboard-plugin/public';
import type { DashboardNavigationOptions } from '@kbn/dashboard-navigation-options-schema';
import { DEFAULT_DASHBOARD_NAVIGATION_OPTIONS } from '@kbn/dashboard-navigation-options-common';

import type { LinksLayoutType } from '../../../common/content_management';
import { DASHBOARD_LINK_TYPE, LINKS_VERTICAL_LAYOUT } from '../../../common/content_management';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ describe('LinksEditor', () => {
.getAttribute('aria-checked');
};

// FLAKY: https://github.com/elastic/kibana/issues/253303
describe.skip('dashboard link options', () => {
describe('dashboard link options', () => {
test('starts with default when options not provided', async () => {
render(<LinkEditor {...defaultProps} />);
await waitFor(() => {
Expand Down
Loading
Loading