-
Notifications
You must be signed in to change notification settings - Fork 357
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
Add reload button to Ansible Repositories #1366
Conversation
@mzazrivec please review, thanks :) |
Checked commit ZitaNemeckova@cd5a144 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 app/helpers/application_helper/toolbar/ansible_repositories_center.rb
app/helpers/application_helper/toolbar/ansible_repository_center.rb
|
|
||
def check_button_rbac | ||
# Allow reload to skip RBAC check | ||
if %w(ansible_repository_reload ansible_repositories_reload).include?(params[:pressed]) |
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.
Cc @martinpovolny , @PanSpagetka , @romanblanco ... it looks like we have to do this for any ButtonWithoutRbacCheck
because the default check_button_rbac
doesn't read the toolbar def and doesn't know a check is not needed.
But it feels like this should be easier...
Waiting on #1378 |
So for post-fine the GTL reload button should be javascript based, right? Is there something needed from the GTL component (@karelhala) to make that happen or do we have all the bits? |
I also wonder about TextualSummary reload being javascript based. We can quickly add such functionality to the GenericShowMixin or shall we better have a TextualSummary Angular component first? What do you think @himdel ? |
@miq-bot remove_label wip |
JS refresh would be really great for both textualSummary and for GTL components. I guess moving TextualSummary to angular would be the first step. @ZitaNemeckova if you want to refresh GTL via JS you can use this diff diff --git a/app/assets/javascripts/controllers/report_data_controller.js b/app/assets/javascripts/controllers/report_data_controller.js
index e3a3712..57421a3 100644
--- a/app/assets/javascripts/controllers/report_data_controller.js
+++ b/app/assets/javascripts/controllers/report_data_controller.js
@@ -86,6 +86,8 @@
this.onUnsubscribe();
} else if (event.tollbarEvent && (event.tollbarEvent === 'itemClicked')) {
this.setExtraClasses();
+ } else if (event.refreshController && event.refreshController.name === COTNROLLER_NAME) {
+ this.initController(this.initObject);
}
if (event.controller === COTNROLLER_NAME && this.apiFunctions && this.apiFunctions[event.action]) { And then call it: sendDatawithRx({refreshController: {name: 'reportDataController'}}); No need to follow the exact API, just proposition, however we could use |
Maybe we should move that discussion to the relevant issue: #1365 . (So, Karel, agreed, pretty much what I proposed there :).) |
https://bugzilla.redhat.com/show_bug.cgi?id=1448601
Ansible Repositories:
Ansible Repository:
@miq-bot add_label bug, automation/ansible