-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Dashboard: Load a default rather than starting new - Against master - Closing #5820 #7626
Dashboard: Load a default rather than starting new - Against master - Closing #5820 #7626
Conversation
Conflicts: src/plugins/kibana/public/dashboard/index.js src/ui/public/config/defaults.js
…encies Conflicts: src/plugins/kibana/public/dashboard/index.js
Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'. |
Can one of the admins verify this patch? |
Sorry @LuudJanssen, we just had a change that got merged to master that fixed our CI builds. Can you rebase? |
Conflicts: src/core_plugins/kibana/public/dashboard/index.js
@epixa I rebased again and fixed some minor bugs! :) |
jenkins, test this |
}, | ||
resolve: { | ||
dash: function (savedDashboards, config, kbnUrl, Notifier, $location, $route) { | ||
let defaultDashboard = config.get('dashboard:defaultDashboard', ''); |
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 should be const
since the reference is never mutated.
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 bother with the empty string fallback?
@LuudJanssen I did a preliminary code review and added some inline comments. In general, I don't really like how this muddies the water between new and existing dashboards, so whenever you want to make a decision about templates and such, you need to also do a check on the What do you think about this instead:
|
Can one of the admins verify this patch? |
Hey @epixa, Thanks for your comments. I'll take a look at the inline comments and fix them. For your comment on the routes, I initially had this approach in #5851 but @spalger commented saying:
Either way is fine by me, but since you're on the core Kibana team you'll have to decide, haha! :) |
I just don't like the ambiguity of |
Spencer, thanks for your quick response. The ideal situation as I see it is:
This means that the user will always be redirected when going to @epixa & @spalger Is this something you both agree on? I remember having trouble doing redirecting, without triggering any errors. What is the best way to implement redirecting? |
I suppose that works for me! We just need to make sure people can't save dashboards with the name "new" :) What should we do if someone already has a dashboard with the name "new"? Re redirecting: I suggest doing it in a route resolve function and using the |
@spalger That's a good point! The solution I came up with is using a It's not the prettiest solution, but it is a solution. Any other ideas are welcome. EDIT: FYI, when creating a dashboard called |
That's a great idea, I support doing |
@LuudJanssen Do you still plan to work on this, or should I throw an "adoptme" label on this in case someone else has time to pull it over the line? |
I'm going to close this out due to inactivity. Please feel free to resubmit if you pick this back up again! |
`v93.5.1` ⏩ `v93.5.2` --- ## [`v93.5.2`](https://github.com/elastic/eui/releases/v93.5.2) **Dependency updates** - Updated `react-virtualized-auto-sizer` to 1.0.24 ([#7598](elastic/eui#7598)) - Updated `react-window` to 1.8.10 ([#7600](elastic/eui#7600)) **CSS-in-JS conversions** - Updated EUI's internal style memoization/performance utility to have configurable error/warning levels via `setEuiDevProviderWarning` ([#7626](elastic/eui#7626))
This is a pull request closing #5820 against master. I wasn't able to run the tests locally. Could someone test it for me? It implements the default dashboard setup in the config options in the dashboard:
It does not use the suggestion from @dotfold to use a 'star' icon in the toolbar to set the dashboard as default, but this can be easily implemented since the logic is already there.
I'm doing this pull request against 4.5 since that is the version we're running at our company, but I might do a pull request against master as well (or someone else can rewrite / merge it, if they have the time).