Skip to content

Commit

Permalink
[Observability] Copy Exploratory View into a separate app (#153852)
Browse files Browse the repository at this point in the history
  • Loading branch information
CoenWarmer authored Mar 29, 2023
1 parent c48098d commit 6b6a8df
Show file tree
Hide file tree
Showing 347 changed files with 29,163 additions and 6 deletions.
1 change: 1 addition & 0 deletions .buildkite/ftr_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ disabled:
- x-pack/plugins/synthetics/e2e/synthetics_run.ts
- x-pack/plugins/ux/e2e/synthetics_run.ts
- x-pack/plugins/observability/e2e/synthetics_run.ts
- x-pack/plugins/exploratory_view/e2e/synthetics_run.ts

# Configs that exist but weren't running in CI when this file was introduced
- x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/config.ts
Expand Down
15 changes: 15 additions & 0 deletions .buildkite/pipelines/pull_request/exploratory_view_plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
steps:
- command: .buildkite/scripts/steps/functional/observability_plugin.sh
label: 'Exploratory View @elastic/synthetics Tests'
agents:
queue: n2-4-spot
depends_on: build
timeout_in_minutes: 120
artifact_paths:
- 'x-pack/plugins/exploratory_view/e2e/.journeys/**/*'
retry:
automatic:
- exit_status: '-1'
limit: 3
- exit_status: '*'
limit: 1
6 changes: 6 additions & 0 deletions .buildkite/scripts/pipelines/pull_request/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,15 @@ const uploadPipeline = (pipelineContent: string | object) => {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/observability_plugin.yml'));
}

if (await doAnyChangesMatch([/^x-pack\/plugins\/exploratory_view/])) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/exploratory_view_plugin.yml'));
}

if (
await doAnyChangesMatch([
/^x-pack\/plugins\/synthetics/,
/^x-pack\/plugins\/observability\/public\/components\/shared\/exploratory_view/,
/^x-pack\/plugins\/exploratory_view/,
])
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/synthetics_plugin.yml'));
Expand All @@ -154,6 +159,7 @@ const uploadPipeline = (pipelineContent: string | object) => {
await doAnyChangesMatch([
/^x-pack\/plugins\/ux/,
/^x-pack\/plugins\/observability\/public\/components\/shared\/exploratory_view/,
/^x-pack\/plugins\/exploratory_view/,
])
) {
pipeline.push(getPipeline('.buildkite/pipelines/pull_request/ux_plugin_e2e.yml'));
Expand Down
8 changes: 7 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -867,6 +867,7 @@ module.exports = {
files: [
'x-pack/plugins/apm/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/observability/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/exploratory_view/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/ux/**/*.{js,mjs,ts,tsx}',
],
rules: {
Expand All @@ -886,7 +887,11 @@ module.exports = {
},
},
{
files: ['x-pack/plugins/apm/**/*.stories.*', 'x-pack/plugins/observability/**/*.stories.*'],
files: [
'x-pack/plugins/apm/**/*.stories.*',
'x-pack/plugins/observability/**/*.stories.*',
'x-pack/plugins/exploratory_view/**/*.stories.*',
],
rules: {
'react/function-component-definition': [
'off',
Expand All @@ -901,6 +906,7 @@ module.exports = {
files: [
'x-pack/plugins/apm/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/observability/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/exploratory_view/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/ux/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/synthetics/**/*.{js,mjs,ts,tsx}',
'x-pack/plugins/infra/**/*.{js,mjs,ts,tsx}',
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ x-pack/plugins/event_log @elastic/response-ops
packages/kbn-expandable-flyout @elastic/security-threat-hunting-investigations
packages/kbn-expect @elastic/kibana-operations
x-pack/examples/exploratory_view_example @elastic/uptime
x-pack/plugins/exploratory_view @elastic/uptime
src/plugins/expression_error @elastic/kibana-presentation
src/plugins/chart_expressions/expression_gauge @elastic/kibana-visualizations
src/plugins/chart_expressions/expression_heatmap @elastic/kibana-visualizations
Expand Down
4 changes: 4 additions & 0 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,10 @@ security and spaces filtering.
activities.
|{kib-repo}blob/{branch}/x-pack/plugins/exploratory_view/README.md[exploratoryView]
|A shared component for visualizing observability data types via lens embeddable. For further details.
|{kib-repo}blob/{branch}/x-pack/plugins/features/README.md[features]
|The features plugin enhance Kibana with a per-feature privilege system.
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@
"@kbn/event-log-plugin": "link:x-pack/plugins/event_log",
"@kbn/expandable-flyout": "link:packages/kbn-expandable-flyout",
"@kbn/exploratory-view-example-plugin": "link:x-pack/examples/exploratory_view_example",
"@kbn/exploratory-view-plugin": "link:x-pack/plugins/exploratory_view",
"@kbn/expression-error-plugin": "link:src/plugins/expression_error",
"@kbn/expression-gauge-plugin": "link:src/plugins/chart_expressions/expression_gauge",
"@kbn/expression-heatmap-plugin": "link:src/plugins/chart_expressions/expression_heatmap",
Expand Down
2 changes: 1 addition & 1 deletion packages/kbn-babel-preset/styled_components_files.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
USES_STYLED_COMPONENTS: [
/packages[\/\\](kbn-ui-shared-deps-(npm|src)|kbn-ecs-data-quality-dashboard)[\/\\]/,
/src[\/\\]plugins[\/\\](kibana_react)[\/\\]/,
/x-pack[\/\\]plugins[\/\\](apm|beats_management|cases|fleet|infra|lists|observability|osquery|security_solution|timelines|synthetics|ux)[\/\\]/,
/x-pack[\/\\]plugins[\/\\](apm|beats_management|cases|fleet|infra|lists|observability|exploratory_view|osquery|security_solution|timelines|synthetics|ux)[\/\\]/,
/x-pack[\/\\]test[\/\\]plugin_functional[\/\\]plugins[\/\\]resolver_test[\/\\]/,
],
};
1 change: 1 addition & 0 deletions packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pageLoadAssetSize:
enterpriseSearch: 35741
esUiShared: 326654
eventAnnotation: 20500
exploratoryView: 74673
expressionError: 22127
expressionGauge: 25000
expressionHeatmap: 27505
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-ts-projects/ts_projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const TS_PROJECTS = TsProject.loadAll({
'x-pack/plugins/synthetics/e2e/tsconfig.json',
'x-pack/plugins/ux/e2e/tsconfig.json',
'x-pack/plugins/observability/e2e/tsconfig.json',
'x-pack/plugins/exploratory_view/e2e/tsconfig.json',
'x-pack/plugins/threat_intelligence/cypress/tsconfig.json',
],
});
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ export const applicationUsageSchema = {
ml: commonSchema,
monitoring: commonSchema,
'observability-overview': commonSchema,
'exploratory-view': commonSchema,
osquery: commonSchema,
profiling: commonSchema,
security_account: commonSchema,
Expand Down
131 changes: 131 additions & 0 deletions src/plugins/telemetry/schema/oss_plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -4325,6 +4325,137 @@
}
}
},
"exploratory-view": {
"properties": {
"appId": {
"type": "keyword",
"_meta": {
"description": "The application being tracked"
}
},
"viewId": {
"type": "keyword",
"_meta": {
"description": "Always `main`"
}
},
"clicks_total": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application since we started counting them"
}
},
"clicks_7_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 7 days"
}
},
"clicks_30_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 30 days"
}
},
"clicks_90_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application over the last 90 days"
}
},
"minutes_on_screen_total": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen since we started counting them."
}
},
"minutes_on_screen_7_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 7 days"
}
},
"minutes_on_screen_30_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 30 days"
}
},
"minutes_on_screen_90_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen over the last 90 days"
}
},
"views": {
"type": "array",
"items": {
"properties": {
"appId": {
"type": "keyword",
"_meta": {
"description": "The application being tracked"
}
},
"viewId": {
"type": "keyword",
"_meta": {
"description": "The application view being tracked"
}
},
"clicks_total": {
"type": "long",
"_meta": {
"description": "General number of clicks in the application sub view since we started counting them"
}
},
"clicks_7_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 7 days"
}
},
"clicks_30_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 30 days"
}
},
"clicks_90_days": {
"type": "long",
"_meta": {
"description": "General number of clicks in the active application sub view over the last 90 days"
}
},
"minutes_on_screen_total": {
"type": "float",
"_meta": {
"description": "Minutes the application sub view is active and on-screen since we started counting them."
}
},
"minutes_on_screen_7_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 7 days"
}
},
"minutes_on_screen_30_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 30 days"
}
},
"minutes_on_screen_90_days": {
"type": "float",
"_meta": {
"description": "Minutes the application is active and on-screen active application sub view over the last 90 days"
}
}
}
}
}
}
},
"osquery": {
"properties": {
"appId": {
Expand Down
2 changes: 2 additions & 0 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,8 @@
"@kbn/expect/*": ["packages/kbn-expect/*"],
"@kbn/exploratory-view-example-plugin": ["x-pack/examples/exploratory_view_example"],
"@kbn/exploratory-view-example-plugin/*": ["x-pack/examples/exploratory_view_example/*"],
"@kbn/exploratory-view-plugin": ["x-pack/plugins/exploratory_view"],
"@kbn/exploratory-view-plugin/*": ["x-pack/plugins/exploratory_view/*"],
"@kbn/expression-error-plugin": ["src/plugins/expression_error"],
"@kbn/expression-error-plugin/*": ["src/plugins/expression_error/*"],
"@kbn/expression-gauge-plugin": ["src/plugins/chart_expressions/expression_gauge"],
Expand Down
1 change: 1 addition & 0 deletions x-pack/.i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"xpack.enterpriseSearch": "plugins/enterprise_search",
"xpack.features": "plugins/features",
"xpack.dataVisualizer": "plugins/data_visualizer",
"xpack.exploratoryView": "plugins/exploratory_view",
"xpack.fileUpload": "plugins/file_upload",
"xpack.globalSearch": ["plugins/global_search"],
"xpack.globalSearchBar": ["plugins/global_search_bar"],
Expand Down
11 changes: 11 additions & 0 deletions x-pack/plugins/exploratory_view/.storybook/jest_setup.js
Original file line number Diff line number Diff line change
@@ -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; you may not use this file except in compliance with the Elastic License
* 2.0.
*/

import { setGlobalConfig } from '@storybook/testing-react';
import * as globalStorybookConfig from './preview';

setGlobalConfig(globalStorybookConfig);
8 changes: 8 additions & 0 deletions x-pack/plugins/exploratory_view/.storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*
* 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.
*/

module.exports = require('@kbn/storybook').defaultConfig;
10 changes: 10 additions & 0 deletions x-pack/plugins/exploratory_view/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/*
* 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.
*/

import { EuiThemeProviderDecorator } from '@kbn/kibana-react-plugin/common';

export const decorators = [EuiThemeProviderDecorator];
27 changes: 27 additions & 0 deletions x-pack/plugins/exploratory_view/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Exploratory View plugin

A shared component for visualizing observability data types via lens embeddable. [For further details.](./public/components/exploratory_view/README.md)

## Unit testing

Note: Run the following commands from `kibana/x-pack/plugins/exploratory_view`.

### Run unit tests

```bash
npx jest --watch
```

### Update snapshots

```bash
npx jest --updateSnapshot
```

### Coverage

HTML coverage report can be found in target/coverage/jest after tests have run.

```bash
open target/coverage/jest/index.html
```
Loading

0 comments on commit 6b6a8df

Please sign in to comment.