-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[LogsUI] [InfraUI] Turn source configuration into a tab and standardize the main navigation #42243
[LogsUI] [InfraUI] Turn source configuration into a tab and standardize the main navigation #42243
Conversation
* Adds nested routing for logs * Adds an index page to handle shared concerns * Adds the Stream page at /logs/stream
* Introduces shared/settings page * Adds shared/settings page as a tab in the Logs routes * Removes previous source configuration flyout traces from Logs pages
* Implements use of EUI Panels * Centers page content
* Add discard button to allow resetting the form
* Align Apply and Discard buttons to the right * Align Loading button to the right
* Add EuiDescribedFormGroup for name panel * Add EuiDescribedFormGroup for indices panel * Add EuiDescribedFormGroup for fields panel
* Adds a ViewSourceConfigurationButton component that will route to the /settings page * Replace all instances of "View Configuration" buttons that were opening the flyout with the new button
* Introduces an AppNavigation component * Amends styling / handling of RoutedTabs to match SIEM implementation * Adds new AppNavigation component to Infrastructure and Logs indexe pages
Pinging @elastic/infra-logs-ui |
💔 Build Failed |
💔 Build Failed |
* Ensure outline isn't cut off * Ensure only the react-router instance is hit for performance * Ensure links still have href attributes for things like "Open in a new tab" even if history.push ultimately navigates
@Zacqary I've addressed your feedback so far: The navigation is now more performant when switching, and the visual discrepencies are cleaned up. |
💚 Build Succeeded |
@Kerry350 Looks great! Are you able to take it a step further and prevent the logs stream from having to reload data when switching away from the Settings tab? If it's very complicated to fix, that might not be the biggest issue. Users will probably be changing settings when they switch to the Settings tab which would require a stream reload anyway. Unless persisting the logs data when you switch to the Settings tab would also allow it to start loading new data before you even switch away from the tab? |
Can we also get some kind of "Are you sure?" prompt if you make changes, then click the Stream tab instead of clicking Apply? Otherwise those changes are lost |
This would be a very involved and non-trivial change, and I doubt we want to focus time in that direction at the moment given the feature priorities. I realise that comes with an air of negativity so I wanted to highlight architecturally why it's not a simple improvement:
If this was something we wanted to look at long term - now that we have more "pages" coming in and more navigation needs - I'd say we need to look at this as a whole team and agree upon an approach for the whole of infrastructure + logs. Which, I personally feel, wouldn't make sense until we've got everything moved over to the "simple HTTP API" approach. Even in that scenario, for caching, we can't make use of something simple like regular HTTP cache headers as we use |
This would be a nice addition, I'll look at this now 👍 |
💔 Build Failed |
@Zacqary I've added in a prompt for when changes are about to be lost. I've used the |
💚 Build Succeeded |
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.
All looks good to me! Great work!
Awesome, thanks for the reviews. Just a note to say I've got a small followup PR that will come with a fix for the breadcrumbs being incorrect sometimes. It wasn't broken by this work, it exists in Master, but I spotted it as part of the navigation work. But I don't want to block this big ol' chunk getting merged. |
…ze the main navigation (elastic#42243) * Setup Logs routing for multiple pages * Adds nested routing for logs * Adds an index page to handle shared concerns * Adds the Stream page at /logs/stream * Introduce shared settings page * Introduces shared/settings page * Adds shared/settings page as a tab in the Logs routes * Removes previous source configuration flyout traces from Logs pages * Begin styling adjustments to settings page * Implements use of EUI Panels * Centers page content * Add discard button * Add discard button to allow resetting the form * Fix button alignment * Align Apply and Discard buttons to the right * Align Loading button to the right * Add EuiDescribedFormGroup for all form fields * Add EuiDescribedFormGroup for name panel * Add EuiDescribedFormGroup for indices panel * Add EuiDescribedFormGroup for fields panel * Remove all SourceConfigurationFlyout traces from the Infrastructure UI * Add a ViewSourceConfigurationButton * Adds a ViewSourceConfigurationButton component that will route to the /settings page * Replace all instances of "View Configuration" buttons that were opening the flyout with the new button * Enable settings tab amongst Infrastructure routes * Change navigation to mimic SIEM * Introduces an AppNavigation component * Amends styling / handling of RoutedTabs to match SIEM implementation * Adds new AppNavigation component to Infrastructure and Logs indexe pages * Functional test amendments (WIP) * Temporarily disable certain functional tests * Remove unused imports * Disable imports so build can pass * Amend I18N errors * I18N * Automatically fix issues with i18n (node scripts/i18n_check --fix result) * Functional tests * Amend tests so they pass locally. Pending CI test. * Amend RoutedTabs (without link focus style) * Tweak RoutedTabs and AppNavigation for better performance / visuals * Ensure outline isn't cut off * Ensure only the react-router instance is hit for performance * Ensure links still have href attributes for things like "Open in a new tab" even if history.push ultimately navigates * Fix i18n usages * node scripts/i18n_check --fix * Amend functional test config (post Master merge fix) * Remove unused function and fix unused import * Add a Prompt to notify users when form changes will be lost * Add aria-label to Button
…ze the main navigation (#42243) (#42887) * Setup Logs routing for multiple pages * Adds nested routing for logs * Adds an index page to handle shared concerns * Adds the Stream page at /logs/stream * Introduce shared settings page * Introduces shared/settings page * Adds shared/settings page as a tab in the Logs routes * Removes previous source configuration flyout traces from Logs pages * Begin styling adjustments to settings page * Implements use of EUI Panels * Centers page content * Add discard button * Add discard button to allow resetting the form * Fix button alignment * Align Apply and Discard buttons to the right * Align Loading button to the right * Add EuiDescribedFormGroup for all form fields * Add EuiDescribedFormGroup for name panel * Add EuiDescribedFormGroup for indices panel * Add EuiDescribedFormGroup for fields panel * Remove all SourceConfigurationFlyout traces from the Infrastructure UI * Add a ViewSourceConfigurationButton * Adds a ViewSourceConfigurationButton component that will route to the /settings page * Replace all instances of "View Configuration" buttons that were opening the flyout with the new button * Enable settings tab amongst Infrastructure routes * Change navigation to mimic SIEM * Introduces an AppNavigation component * Amends styling / handling of RoutedTabs to match SIEM implementation * Adds new AppNavigation component to Infrastructure and Logs indexe pages * Functional test amendments (WIP) * Temporarily disable certain functional tests * Remove unused imports * Disable imports so build can pass * Amend I18N errors * I18N * Automatically fix issues with i18n (node scripts/i18n_check --fix result) * Functional tests * Amend tests so they pass locally. Pending CI test. * Amend RoutedTabs (without link focus style) * Tweak RoutedTabs and AppNavigation for better performance / visuals * Ensure outline isn't cut off * Ensure only the react-router instance is hit for performance * Ensure links still have href attributes for things like "Open in a new tab" even if history.push ultimately navigates * Fix i18n usages * node scripts/i18n_check --fix * Amend functional test config (post Master merge fix) * Remove unused function and fix unused import * Add a Prompt to notify users when form changes will be lost * Add aria-label to Button
Summary
This ticket implements #39071, and also implements the Infra focussed concerns of #150 by changing the main navigation to align with SIEM / APM.
This implements all of the outlined acceptance criteria, there's also one extra addition in that the locations we had a "Change configuration" button that used to open the flyout (no data states for example) now navigate to the settings page. Those changes are all in this commit.
One thing to note is that I've had to disable some functional tests for now. I am still currently looking in to those, but as that was the only thing blocking this PR being opened and reviewed I thought it best to disable them. **
===============================================
** The issues I'm seeing in the functional tests are very odd. For example, in one of the tests this assertion fails:
As
logStreamEntries.length
returns with a length of0
. However, when I check the screenshot output in the failures folder the elements are rendered in full. Similarly, if I check the HTML output in thefailure_debug
folder the DOM elements with the correctdata-test-subj
all exist. So I can't possibly see how they're0
.Even more curious if I add a
console.log
(and nothing else), e.g.:then there's no longer a length of
0
, the items exist, and the test passes.It's very weird, and very flaky 🙈
===============================================
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.