-
Notifications
You must be signed in to change notification settings - Fork 356
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
ops_rbac - group detail - don't render trees that are not visible #68
ops_rbac - group detail - don't render trees that are not visible #68
Conversation
since ManageIQ/manageiq#3859 (comment), `miq_tab_header` would put ng-click (hardcoded to call `changeAuthTab`) on every tab header, even though it makes no sense for most tabs Fixed by moving the ng-click value explicitly to options, and passing it from where `ng-click` is actually needed Also added :onclick to options, so that custom functionality can be added in non-angular tabs too. miq_tab_content now also takes a :lazy option, which causes the tab content to render only if the tab is currently active
plus some cleanup
…edit @filters were unused in TreeBuilderBelongsTo*
…detail this is used to keep track of the current tab in rbac_group detail not using `@sb[:active_tab]` because technically, the whole rbac detail is a tab (of one), aand there's code that assumes a `#{@sb[:active_tab]}_tab` partial exists
..and enable the tabs to be lazy
only loaded once, then it's kept in the browser (so only the first time one switches to a tab, a round trip is needed)
a long line, and a trailing _ in array assignment
…r lazy loading the tab otherwise, ManageIQ.record.recordId gets overwritten with null, causing the toolbar to generate an url without an id
Also cc @kbrock :) (because you're on the BZ too..) |
Checked commits https://github.com/himdel/manageiq-ui-classic/compare/2b1da75e4d389b1212f3db1b2885016a047846ee~...c99485e1eda37bfd8c34908833f4874ace1eab5b with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1 **
app/controllers/ops_controller/ops_rbac.rb
spec/views/ops/_rbac_group_details.html.haml_spec.rb
|
euwe PR in ManageIQ/manageiq#13399 |
Backported to Euwe via ManageIQ/manageiq#13399 |
Backported to Darga via ManageIQ/manageiq#13471 |
Go to Configuration > Access Control > Groups - select a group
On the right side, there are 3 tabs: my company tags, h&c and v&t - each of these contains a tree.
Right now, all 3 trees are instantiated and rendered at the same time, which is unfortunate because the first tab's tree takes only about 10% of the time.
This enables the tabs to be lazy-loaded, causing the right tree to get rendered the first time a tab is opened. (Then it's cached in the browser.)
(No visible UI changes, except you get a spinner when loading the tab.)
Cc @ZitaNemeckova
https://bugzilla.redhat.com/show_bug.cgi?id=1399345