-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[Dashboard Navigation] Add horizontal/vertical embeddable rendering + error handling #162285
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
Merged
Heenawter
merged 42 commits into
navigation-embeddable
from
embeddable-rendering-ui_2023-07-18
Aug 16, 2023
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
aabfe0f
First draft of horizontal/vertical layout
Heenawter a5e7909
Reorganize files + remove max width
Heenawter 8b68eca
Doing some clean up
Heenawter e95b2c6
Apply i18n to strings
Heenawter 8c93802
Add first draft of error catching
Heenawter bab2f2c
Fix unique key error
Heenawter 8c2067a
Switch link colours + show custom label even on dashboard error
Heenawter 5f0dd80
Move caching to dashboard service
Heenawter 8ae31fa
Fix truncation bug
Heenawter 95393f0
Make dashboard warning less threatening
Heenawter 235ebaf
Update cache when deleting dashboard(s)
Heenawter e278911
Change rendering of error link + clean up
Heenawter b4838cc
Clean up the cache logic
Heenawter 62f9053
Swap colours back + fix error tooltip location + clean up
Heenawter 07b94ce
Add italics to generic error message
Heenawter 09091ea
Clean up linting
Heenawter c92f589
More code clean up
Heenawter b72f492
Allow error state to be cleared
Heenawter 580f918
Improved a11y
Heenawter f030bdd
Add descriptive tooltip to component for dashboard links
Heenawter 6dad3bd
Fix SASS linting
Heenawter 163037a
Add title to panel editor error tooltip
Heenawter 2c532a9
Switch order of layout options
Heenawter 0217a53
[Dashboard Navigation] Design cleanup (#163223)
andreadelrio 72a3a62
Clean up `scss`
Heenawter 07c5f75
Clean up tooltip logic
Heenawter 9670811
Use `findDashboardById` rather than `findDashboardByIds`
Heenawter 7d3a7ea
Switch to `LRUCache`
Heenawter 2a1b6ed
Fix stub
Heenawter db2439f
Flip order of layout and links in flyout
Heenawter 5882fb3
Change size of cache
Heenawter faa435c
Merge branch 'navigation-embeddable' of github.com:elastic/kibana int…
Heenawter 3eca107
[CI] Auto-commit changed files from 'node scripts/check_mappings_upda…
kibanamachine 40f31b1
Add extra padding to current link
Heenawter 0bc4f49
Fix import
Heenawter 455a555
Address another round of feedback
Heenawter 8cfeb29
Update mappings
Heenawter 1011d65
Add `dynamic: false` to mappings
Heenawter d8cfa36
[CI] Auto-commit changed files from 'node scripts/check_mappings_upda…
kibanamachine 1d3a042
Change to `EuiSwitch` for by-reference saving
Heenawter a13170b
[CI] Auto-commit changed files from 'node scripts/precommit_hook.js -…
kibanamachine d9da2bc
Change "Edit Links" to "Edit links" in config menu
Heenawter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1055,6 +1055,7 @@ | |
| } | ||
| }, | ||
| "navigation_embeddable": { | ||
| "dynamic": false, | ||
| "properties": { | ||
| "id": { | ||
| "type": "text" | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...hboard/public/services/dashboard_content_management/dashboard_content_management_cache.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| /* | ||
| * 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 LRUCache from 'lru-cache'; | ||
| import { DashboardCrudTypes } from '../../../common/content_management'; | ||
| import { DASHBOARD_CACHE_SIZE, DASHBOARD_CACHE_TTL } from '../../dashboard_constants'; | ||
|
|
||
| export class DashboardContentManagementCache { | ||
| private cache: LRUCache<string, DashboardCrudTypes['GetOut']>; | ||
|
|
||
| constructor() { | ||
| this.cache = new LRUCache<string, DashboardCrudTypes['GetOut']>({ | ||
| max: DASHBOARD_CACHE_SIZE, | ||
| maxAge: DASHBOARD_CACHE_TTL, | ||
| }); | ||
| } | ||
|
|
||
| /** Fetch the dashboard with `id` from the cache */ | ||
| public fetchDashboard(id: string) { | ||
| return this.cache.get(id); | ||
| } | ||
|
|
||
| /** Add the fetched dashboard to the cache */ | ||
| public addDashboard({ item: dashboard, meta }: DashboardCrudTypes['GetOut']) { | ||
| this.cache.set(dashboard.id, { | ||
| meta, | ||
| item: dashboard, | ||
| }); | ||
| } | ||
|
|
||
| /** Delete the dashboard with `id` from the cache */ | ||
| public deleteDashboard(id: string) { | ||
| this.cache.del(id); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.