Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Event annotations] Individual annotation editing from library #163346

Merged
merged 102 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
de49649
event annotation application
drewdaemon Aug 7, 2023
1b4f5b0
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Aug 7, 2023
b4e0861
chart and time picker
drewdaemon Aug 8, 2023
8368131
Merge branch 'add-individual-annotation-editing' of github.com:drewda…
drewdaemon Aug 8, 2023
183a263
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Aug 8, 2023
e30f4f9
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine Aug 8, 2023
b3caa20
[CI] Auto-commit changed files from 'node scripts/build_plugin_list_d…
kibanamachine Aug 8, 2023
6ce5d63
fix scrolling issue
drewdaemon Aug 8, 2023
5af3ec9
use correct data view
drewdaemon Aug 10, 2023
9cf3cb1
support ad-hoc data views
drewdaemon Aug 10, 2023
ae187f8
add time field picker
drewdaemon Aug 10, 2023
da8d260
Restructure component directory
drewdaemon Aug 10, 2023
5a75eff
Separate preview component
drewdaemon Aug 11, 2023
36bc171
increase preview tests
drewdaemon Aug 11, 2023
bba4b71
reset user-event version
drewdaemon Aug 11, 2023
dc04e97
test time field picker
drewdaemon Aug 11, 2023
5526343
Add refresh button
drewdaemon Aug 11, 2023
5903320
Merge branch 'main' of github.com:elastic/kibana into add-individual-…
drewdaemon Aug 14, 2023
7fe30ac
fix preview rendering bug
drewdaemon Aug 15, 2023
e72a50c
move ad-hoc data view logic to flyout
drewdaemon Aug 15, 2023
e06c540
missing data view state
drewdaemon Aug 15, 2023
59b2719
clean up test
drewdaemon Aug 15, 2023
f60870a
update temporal unit test
drewdaemon Aug 16, 2023
88b07c2
move table list components to plugin
drewdaemon Aug 16, 2023
36136e4
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Aug 16, 2023
d9408e0
update i18n ids
drewdaemon Aug 16, 2023
597fcb4
Merge branch 'add-individual-annotation-editing' of github.com:drewda…
drewdaemon Aug 16, 2023
be3d5d4
add limit
drewdaemon Sep 5, 2023
0e5e8b3
Merge branch 'main' of github.com:elastic/kibana into add-individual-…
drewdaemon Sep 5, 2023
0673ae4
update lens doc to include library annotations
drewdaemon Sep 6, 2023
f486898
Merge branch 'main' into add-individual-annotation-editing
stratoula Sep 7, 2023
7f8eb5d
remove user message caching
drewdaemon Sep 7, 2023
82c8cfe
Merge branch 'add-individual-annotation-editing' of github.com:drewda…
drewdaemon Sep 7, 2023
477ec67
refactor embeddable root
drewdaemon Sep 8, 2023
4596a42
event_annotation_application => event_annotation_listing
drewdaemon Sep 8, 2023
8819522
Merge branch 'main' of github.com:elastic/kibana into add-individual-…
drewdaemon Sep 8, 2023
d8c2418
fix image in docs
drewdaemon Sep 8, 2023
bc8de0e
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine Sep 8, 2023
76a06aa
[CI] Auto-commit changed files from 'node scripts/build_plugin_list_d…
kibanamachine Sep 8, 2023
c9b59a6
embeddable: respect getExplicitInputIsEqual
drewdaemon Sep 11, 2023
c5b700a
Merge branch 'add-individual-annotation-editing' of github.com:drewda…
drewdaemon Sep 11, 2023
a6e0150
general design updates
drewdaemon Sep 11, 2023
e2c21d9
some group controls design fixes
drewdaemon Sep 11, 2023
c031a5c
add missing dimension form error message
drewdaemon Sep 11, 2023
89c195b
annotation list improvements
drewdaemon Sep 11, 2023
4652eb8
fix button sizes
drewdaemon Sep 11, 2023
c4744ca
improve border
drewdaemon Sep 11, 2023
b87db1e
remove color clear button
drewdaemon Sep 11, 2023
47a9ae6
fix back button styling
drewdaemon Sep 11, 2023
ef4b306
turn off annotation editing when data view missing
drewdaemon Sep 11, 2023
6a80e61
compress field pickers
drewdaemon Sep 11, 2023
ff4358b
add background color to preview section
drewdaemon Sep 11, 2023
924d362
center preview visualization vertically
drewdaemon Sep 11, 2023
eff1c78
change missing data view message
drewdaemon Sep 11, 2023
b1751ab
use quick ranges from Kibana settings
drewdaemon Sep 11, 2023
8f70726
improve missing data view message on listing page
drewdaemon Sep 11, 2023
88291b4
update event annotation bundle
drewdaemon Sep 11, 2023
a7bbfcd
empty state improvements
drewdaemon Sep 11, 2023
bb84ee3
Merge branch 'main' into add-individual-annotation-editing
kibanamachine Sep 11, 2023
c6299e9
improve mobile experience
drewdaemon Sep 11, 2023
a27e112
Merge branch 'add-individual-annotation-editing' of github.com:drewda…
drewdaemon Sep 11, 2023
f98ebbe
remove embeddable root gating
drewdaemon Sep 11, 2023
25e8b40
Merge branch 'main' into add-individual-annotation-editing
kibanamachine Sep 12, 2023
1effe31
fix margin on annotation dimension buttons
drewdaemon Sep 12, 2023
f3a32e8
Merge branch 'add-individual-annotation-editing' of github.com:drewda…
drewdaemon Sep 12, 2023
b984483
listing page search and delete tests
drewdaemon Sep 12, 2023
72c9a16
listing page search and delete tests
drewdaemon Sep 12, 2023
b1c3263
test editing group metadata
drewdaemon Sep 12, 2023
07cf5e0
update limit
drewdaemon Sep 12, 2023
c24dbf7
edits adds and removes individual annotations
drewdaemon Sep 12, 2023
5e23ffa
correct expected count
drewdaemon Sep 13, 2023
34cc97a
correct test state
drewdaemon Sep 13, 2023
391fd59
missing data view test
drewdaemon Sep 13, 2023
d12de41
improve missing data view column behavior
drewdaemon Sep 13, 2023
153d74a
improve annotation list styling
drewdaemon Sep 13, 2023
a26d256
style ghost to fill container
drewdaemon Sep 13, 2023
9914bd9
remove panel styles from table list empty state
drewdaemon Sep 13, 2023
209dd97
Revert "annotation list improvements"
drewdaemon Sep 13, 2023
c108f54
hide preview for small screens
drewdaemon Sep 13, 2023
de0c1d4
restore correct dimension button top margin
drewdaemon Sep 13, 2023
82b30f8
set colorpicker color to default on blur with empty input
drewdaemon Sep 13, 2023
26828ee
add back button to header
drewdaemon Sep 13, 2023
4fd0dd4
update date picker width
drewdaemon Sep 13, 2023
b0cfbac
revert inadvertent drag-drop change
drewdaemon Sep 14, 2023
38b58e7
synchronize embeddable render with attributes update in missing data …
drewdaemon Sep 14, 2023
dd381dc
Merge branch 'main' into add-individual-annotation-editing
kibanamachine Sep 14, 2023
5cdf2ec
wait for render
drewdaemon Sep 14, 2023
504ba21
Merge branch 'add-individual-annotation-editing' of github.com:drewda…
drewdaemon Sep 14, 2023
027f586
forgot an await
drewdaemon Sep 14, 2023
b6e9717
try something new
drewdaemon Sep 14, 2023
8fe5a47
skip data view switching test
drewdaemon Sep 14, 2023
276ef86
don't delete index in test
drewdaemon Sep 14, 2023
2c07844
Merge branch 'main' into add-individual-annotation-editing
stratoula Sep 19, 2023
90f83a8
Merge branch 'main' of github.com:elastic/kibana into add-individual-…
drewdaemon Sep 19, 2023
daeaf86
Merge branch 'add-individual-annotation-editing' of github.com:drewda…
drewdaemon Sep 19, 2023
b31d9b1
remove unused var
drewdaemon Sep 19, 2023
50ea86e
update time field on data view switch
drewdaemon Sep 19, 2023
b06c809
fix margin when no annotations
drewdaemon Sep 19, 2023
90c8f9c
remove color picker placeholder text
drewdaemon Sep 19, 2023
48e01ec
small markup / styling enhancements
drewdaemon Sep 19, 2023
b35f445
remove unused translations
drewdaemon Sep 20, 2023
888a8ff
Merge branch 'main' into add-individual-annotation-editing
stratoula Sep 20, 2023
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ packages/kbn-eslint-plugin-telemetry @elastic/actionable-observability
x-pack/test/encrypted_saved_objects_api_integration/plugins/api_consumer_plugin @elastic/kibana-security
packages/kbn-event-annotation-common @elastic/kibana-visualizations
drewdaemon marked this conversation as resolved.
Show resolved Hide resolved
packages/kbn-event-annotation-components @elastic/kibana-visualizations
src/plugins/event_annotation_listing @elastic/kibana-visualizations
src/plugins/event_annotation @elastic/kibana-visualizations
x-pack/test/plugin_api_integration/plugins/event_log @elastic/response-ops
x-pack/plugins/event_log @elastic/response-ops
Expand Down
34 changes: 8 additions & 26 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,12 @@
"apmOss": "src/plugins/apm_oss",
"autocomplete": "packages/kbn-securitysolution-autocomplete/src",
"bfetch": "src/plugins/bfetch",
"cases": [
"packages/kbn-cases-components"
],
"cases": ["packages/kbn-cases-components"],
"cellActions": "packages/kbn-cell-actions",
"charts": "src/plugins/charts",
"console": "src/plugins/console",
"contentManagement": "packages/content-management",
"core": [
"src/core",
"packages/core"
],
"core": ["src/core", "packages/core"],
"customIntegrations": "src/plugins/custom_integrations",
"customIntegrationsPackage": "packages/kbn-custom-integrations",
"dashboard": "src/plugins/dashboard",
Expand All @@ -27,10 +22,7 @@
"dataViews": "src/plugins/data_views",
"defaultNavigation": "packages/default-nav",
"devTools": "src/plugins/dev_tools",
"discover": [
"src/plugins/discover",
"packages/kbn-discover-utils"
],
"discover": ["src/plugins/discover", "packages/kbn-discover-utils"],
"savedSearch": "src/plugins/saved_search",
"embeddableApi": "src/plugins/embeddable",
"embeddableExamples": "examples/embeddable_examples",
Expand All @@ -52,6 +44,7 @@
"expressionShape": "src/plugins/expression_shape",
"expressionTagcloud": "src/plugins/chart_expressions/expression_tagcloud",
"eventAnnotation": "src/plugins/event_annotation",
"eventAnnotationListing": "src/plugins/event_annotation_listing",
"eventAnnotationCommon": "packages/kbn-event-annotation-common",
"eventAnnotationComponents": "packages/kbn-event-annotation-components",
"fieldFormats": "src/plugins/field_formats",
Expand Down Expand Up @@ -110,17 +103,9 @@
"languageDocumentationPopover": "packages/kbn-language-documentation-popover/src",
"textBasedLanguages": "src/plugins/text_based_languages",
"statusPage": "src/legacy/core_plugins/status_page",
"telemetry": [
"src/plugins/telemetry",
"src/plugins/telemetry_management_section"
],
"timelion": [
"src/plugins/vis_types/timelion"
],
"uiActions": [
"src/plugins/ui_actions",
"packages/kbn-ui-actions-browser"
],
"telemetry": ["src/plugins/telemetry", "src/plugins/telemetry_management_section"],
"timelion": ["src/plugins/vis_types/timelion"],
"uiActions": ["src/plugins/ui_actions", "packages/kbn-ui-actions-browser"],
"uiActionsEnhanced": "src/plugins/ui_actions_enhanced",
"uiActionsExamples": "examples/ui_action_examples",
"usageCollection": "src/plugins/usage_collection",
Expand All @@ -140,10 +125,7 @@
"visTypeXy": "src/plugins/vis_types/xy",
"visualizations": "src/plugins/visualizations",
"visualizationUiComponents": "packages/kbn-visualization-ui-components",
"unifiedDocViewer": [
"src/plugins/unified_doc_viewer",
"packages/kbn-unified-doc-viewer"
],
"unifiedDocViewer": ["src/plugins/unified_doc_viewer", "packages/kbn-unified-doc-viewer"],
"unifiedSearch": "src/plugins/unified_search",
"unifiedFieldList": "packages/kbn-unified-field-list",
"unifiedHistogram": "src/plugins/unified_histogram",
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 @@ -102,6 +102,10 @@ This API doesn't support angular, for registering angular dev tools, bootstrap a
|The Event Annotation service contains expressions for event annotations
|{kib-repo}blob/{branch}/src/plugins/event_annotation_listing/README.md[eventAnnotationListing]
|This plugin contains the library listing page for event annotation groups.
|{kib-repo}blob/{branch}/src/plugins/expression_error/README.md[expressionError]
|Expression Error plugin adds an error renderer to the expression plugin. The renderer will display the error image.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 18 additions & 2 deletions docs/user/dashboard/lens.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,11 @@ Annotations support two placement types:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amyjtechwriter any feedback on this documentation?

* *Custom query* &mdash; Displays annotations based on custom {es} queries. For detailed information about queries, check <<semi-structured-search>>.

Create the annotation layer.
Any annotation layer can be saved as an annotation group to the *Visualize Library* in order to reuse it in other visualizations. Any changes made to the annotation group will be reflected in all visualizations to which it is added.

. In the layer pane, click *Add layer > Annotations*.
Create a new annotation layer.

. In the layer pane, click *Add layer > Annotations > New annotation*.

. Select the {data-source} for the annotation.

Expand Down Expand Up @@ -263,6 +265,20 @@ Specify the annotation appearance.

. To close, click *X*.

Save the annotation group to the library.

. In the layer pane, on your annotation layer, click image:images/lens_saveAnnotationLayerButton_8.9.0.png[Save button on annotations layer].

drewdaemon marked this conversation as resolved.
Show resolved Hide resolved
. Enter the *Title*, *Description*, and add any applicable <<managing-tags,*Tags*>>.

. Click *Save group*.

Add a library annotation group to a visualization.

. In the layer pane, click *Add layer > Annotations > Load from library*.

. Select the annotation group you want to use.

[float]
[[add-reference-lines]]
==== Add reference lines
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,7 @@
"@kbn/eso-plugin": "link:x-pack/test/encrypted_saved_objects_api_integration/plugins/api_consumer_plugin",
"@kbn/event-annotation-common": "link:packages/kbn-event-annotation-common",
"@kbn/event-annotation-components": "link:packages/kbn-event-annotation-components",
"@kbn/event-annotation-listing-plugin": "link:src/plugins/event_annotation_listing",
"@kbn/event-annotation-plugin": "link:src/plugins/event_annotation",
"@kbn/event-log-fixture-plugin": "link:x-pack/test/plugin_api_integration/plugins/event_log",
"@kbn/event-log-plugin": "link:x-pack/plugins/event_log",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ function TableListViewTableComp<T extends UserContentCommonSchema>({

if (!showFetchError && hasNoItems) {
return (
<PageTemplate panelled isEmptyState={true}>
<PageTemplate isEmptyState={true}>
<KibanaPageTemplate.Section
aria-labelledby={hasInitialFetchReturned ? headingId : undefined}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ const AnnotationEditorControls = ({
)}

<ColorPicker
overwriteColor={currentAnnotation.color}
defaultColor={isRange ? defaultAnnotationRangeColor : defaultAnnotationColor}
showAlpha={isRange}
setConfig={update}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export const ConfigPanelQueryAnnotation = ({
})}
>
<FieldPicker
compressed
options={options}
selectedOptions={
selectedField
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export function TooltipSection({
data-test-subj={`lnsXY-annotation-tooltip-${index}`}
>
<FieldPicker
compressed
selectedOptions={
value
? [
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,4 @@
// TODO - is this file needed?
export { AnnotationEditorControls, annotationsIconSet } from './annotation_editor_controls';

export * from './group_editor_controls';

export * from './get_annotation_accessor';

export * from './table_list';
2 changes: 1 addition & 1 deletion packages/kbn-event-annotation-components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export {
AnnotationEditorControls,
annotationsIconSet,
} from './components/annotation_editor_controls';
export { EventAnnotationGroupTableList, getAnnotationAccessor } from './components';
export { getAnnotationAccessor } from './components';
export {
defaultAnnotationColor,
defaultAnnotationRangeColor,
Expand Down
1 change: 1 addition & 0 deletions packages/kbn-event-annotation-components/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ module.exports = {
preset: '@kbn/test',
rootDir: '../..',
roots: ['<rootDir>/packages/kbn-event-annotation-components'],
setupFiles: ['jest-canvas-mock'],
};
10 changes: 1 addition & 9 deletions packages/kbn-event-annotation-components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,11 @@
"@kbn/unified-field-list",
"@kbn/data-views-plugin",
"@kbn/data-plugin",
"@kbn/test-jest-helpers",
"@kbn/saved-objects-tagging-oss-plugin",
"@kbn/core-ui-settings-browser",
"@kbn/dom-drag-drop",
"@kbn/content-management-table-list-view-table",
"@kbn/content-management-tabbed-table-list-view",
"@kbn/content-management-plugin",
"@kbn/event-annotation-common",
"@kbn/i18n-react",
"@kbn/saved-objects-finder-plugin",
"@kbn/core-notifications-browser-mocks",
"@kbn/core-notifications-browser",
"@kbn/core-saved-objects-api-browser",
"@kbn/expressions-plugin",
"@kbn/content-management-plugin",
]
}
3 changes: 2 additions & 1 deletion packages/kbn-optimizer/limits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ pageLoadAssetSize:
embeddableEnhanced: 22107
enterpriseSearch: 50858
esUiShared: 326654
eventAnnotation: 48565
eventAnnotation: 30000
eventAnnotationListing: 25841
exploratoryView: 74673
expressionError: 22127
expressionGauge: 25000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ export const ColorPicker = ({
onChange={handleColor}
color={isDisabled ? '' : colorText}
disabled={isDisabled}
placeholder={
defaultColor?.toUpperCase() ||
i18n.translate('visualizationUiComponents.colorPicker.seriesColor.auto', {
defaultMessage: 'Auto',
})
}
placeholder={' '}
onBlur={() => {
if (!colorText) {
setColorText(overwriteColor ?? defaultColor);
}
}}
aria-label={inputLabel}
showAlpha={showAlpha}
swatches={
Expand Down
Loading
Loading