-
Notifications
You must be signed in to change notification settings - Fork 57
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
[Navigation] Register all plugins to NavGroups #1926
Conversation
Signed-off-by: Adam Tackett <[email protected]>
|
Signed-off-by: Adam Tackett <[email protected]>
common/constants/shared.ts
Outdated
@@ -58,7 +58,7 @@ export const observabilityNotebookTitle = 'Notebooks'; | |||
export const observabilityNotebookPluginOrder = 5094; | |||
|
|||
export const observabilityPanelsID = 'observability-dashboards'; | |||
export const observabilityPanelsTitle = 'Dashboards'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't change this here as it also changes in the name existing side-nav
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Signed-off-by: Adam Tackett <[email protected]>
common/constants/shared.ts
Outdated
@@ -58,7 +58,7 @@ export const observabilityNotebookTitle = 'Notebooks'; | |||
export const observabilityNotebookPluginOrder = 5094; | |||
|
|||
export const observabilityPanelsID = 'observability-dashboards'; | |||
export const observabilityPanelsTitle = 'Dashboards'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
order: observabilityPanelsPluginOrder, | ||
mount: appMountWithStartPage('dashboards'), | ||
}); | ||
if (core.chrome.navGroup.getNavGroupEnabled()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for my knowledge, is this like a feature flag?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the navigation change can be toggled, and the UI plan currently list regular dashboards as going into the same category. Until it is depreciated the idea was to rename ours for clarity while using the new navigation.
Signed-off-by: SuZhou-Joe <[email protected]>
feat: enable default route
Signed-off-by: Adam Tackett <[email protected]>
@@ -364,6 +366,7 @@ export const Home = (props: HomeProps) => { | |||
/> | |||
)} | |||
/> | |||
<Route path="/" render={() => <Redirect to={defaultRoute} />} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we need to remove in-app navigation when the new navigation is enabled. In such case, different apps registered to new left navigation will have difference landing pages.
Signed-off-by: Adam Tackett <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Signed-off-by: SuZhou-Joe <[email protected]>
Add some features to all use cases
Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]>
Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]>
Signed-off-by: Adam Tackett <[email protected]>
…s while new navigation is active Signed-off-by: Adam Tackett <[email protected]>
Signed-off-by: Adam Tackett <[email protected]>
…from kevin Signed-off-by: Adam Tackett <[email protected]>
href: '#/', | ||
}, | ||
]); | ||
const isNavGroupEnabled = coreRefs?.chrome?.navGroup.getNavGroupEnabled(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to account for Logs being removed in the new navigation.
render={(_routerProps) => ( | ||
<TraceSideBar> | ||
render={(_routerProps) => | ||
!isNavGroupEnabled ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevents in app navigation from rendering while the new left hand navigation is enabled
public/components/application_analytics/components/application.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Adam Tackett <[email protected]>
The backport to
To backport manually, run these commands in your terminal: # Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/dashboards-observability/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/dashboards-observability/backport-2.x
# Create a new branch
git switch --create backport/backport-1926-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 09090a6d5ec0dc968de7493e6c8371b2dbbaa9cf
# Push it to GitHub
git push --set-upstream origin backport/backport-1926-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/dashboards-observability/backport-2.x Then, create a pull request where the |
* Add a function to register all plugin Nav groups and categories Signed-off-by: Adam Tackett <[email protected]> * Updated addNavLinkGroups path rename dashboards Signed-off-by: Adam Tackett <[email protected]> * Fixing Naming Signed-off-by: Adam Tackett <[email protected]> * feat: enable default route Signed-off-by: SuZhou-Joe <[email protected]> * Update breadcrumb for Trace to default to service page Signed-off-by: Adam Tackett <[email protected]> * Update snapshots Signed-off-by: Adam Tackett <[email protected]> * feat: update Signed-off-by: SuZhou-Joe <[email protected]> * feat: add some features to all use case Signed-off-by: SuZhou-Joe <[email protected]> * Depreciated logs, application. Dashboards/Traces adjusted Signed-off-by: Adam Tackett <[email protected]> * Not registering logs/applications/dashboards when left nav used Signed-off-by: Adam Tackett <[email protected]> * Update snapshots Signed-off-by: Adam Tackett <[email protected]> * fixing lint errors Signed-off-by: Adam Tackett <[email protected]> * Put applications back Signed-off-by: Adam Tackett <[email protected]> * update snapshots Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Removed applications from new nav Signed-off-by: Adam Tackett <[email protected]> * Add applications back, remove in app nav for trace, remove breadcrumbs while new navigation is active Signed-off-by: Adam Tackett <[email protected]> * update snapshots Signed-off-by: Adam Tackett <[email protected]> * Adjust order of metrics/traces/services/applications as per guidance from kevin Signed-off-by: Adam Tackett <[email protected]> * function for nav breadcrumbs added Signed-off-by: Adam Tackett <[email protected]> --------- Signed-off-by: Adam Tackett <[email protected]> Signed-off-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> Co-authored-by: Adam Tackett <[email protected]> Co-authored-by: SuZhou-Joe <[email protected]> Co-authored-by: Sumukh Swamy <[email protected]> (cherry picked from commit 09090a6)
…1948) * [Navigation] Register all plugins to NavGroups (#1926) * Add a function to register all plugin Nav groups and categories Signed-off-by: Adam Tackett <[email protected]> * Updated addNavLinkGroups path rename dashboards Signed-off-by: Adam Tackett <[email protected]> * Fixing Naming Signed-off-by: Adam Tackett <[email protected]> * feat: enable default route Signed-off-by: SuZhou-Joe <[email protected]> * Update breadcrumb for Trace to default to service page Signed-off-by: Adam Tackett <[email protected]> * Update snapshots Signed-off-by: Adam Tackett <[email protected]> * feat: update Signed-off-by: SuZhou-Joe <[email protected]> * feat: add some features to all use case Signed-off-by: SuZhou-Joe <[email protected]> * Depreciated logs, application. Dashboards/Traces adjusted Signed-off-by: Adam Tackett <[email protected]> * Not registering logs/applications/dashboards when left nav used Signed-off-by: Adam Tackett <[email protected]> * Update snapshots Signed-off-by: Adam Tackett <[email protected]> * fixing lint errors Signed-off-by: Adam Tackett <[email protected]> * Put applications back Signed-off-by: Adam Tackett <[email protected]> * update snapshots Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin_nav.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Update public/plugin.tsx Co-authored-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> * Removed applications from new nav Signed-off-by: Adam Tackett <[email protected]> * Add applications back, remove in app nav for trace, remove breadcrumbs while new navigation is active Signed-off-by: Adam Tackett <[email protected]> * update snapshots Signed-off-by: Adam Tackett <[email protected]> * Adjust order of metrics/traces/services/applications as per guidance from kevin Signed-off-by: Adam Tackett <[email protected]> * function for nav breadcrumbs added Signed-off-by: Adam Tackett <[email protected]> --------- Signed-off-by: Adam Tackett <[email protected]> Signed-off-by: SuZhou-Joe <[email protected]> Signed-off-by: Adam Tackett <[email protected]> Co-authored-by: Adam Tackett <[email protected]> Co-authored-by: SuZhou-Joe <[email protected]> Co-authored-by: Sumukh Swamy <[email protected]> (cherry picked from commit 09090a6) * remove error Signed-off-by: Adam Tackett <[email protected]> --------- Signed-off-by: Adam Tackett <[email protected]> Co-authored-by: Adam Tackett <[email protected]>
Description
Demo.mov.zip
This change adds a function that registers all the plugins to their corresponding NavGroups and NavCategories:
Issues Resolved
opensearch-project/OpenSearch-Dashboards#7029
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.