-
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
[WIP] user-management react module #4562
Conversation
@miq-bot add_reviewer @karelhala |
@miq-bot add_label react |
@Hyperkid123 'apagac' is an invalid reviewer, ignoring... |
|
||
listenToRx(function(payload) { | ||
if (payload.type === 'init-react-routing' && !vm.reactRouting) { | ||
vm.reactRouting = !!payload.reactRouting; | ||
vm.$scope.$apply; |
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.
missing ()
?
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.
nice catch!
10a95b7
to
e6f78bd
Compare
|
||
def get_category_entries | ||
x = Classification.find_by_id(params[:cat_id]) | ||
render :json => x.entries.map { |entry| { :value => entry[:id], :label => entry[:description], :name => entry.tag[:name] } } |
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.
entries.includes(:tag)
to avoid N+1 queires and you can use .
notation { :value => entry.id,...` to access attributes.
thanks
app/controllers/ops_controller.rb
Outdated
def get_category_entries_multi | ||
category_entries = {} | ||
params[:ids].map { |category_id| | ||
cat = Classification.find_by_id(category_id) |
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.
I believe that this could be done in query
Classification.where(:ids => params[:ids]).includes(:tags)....
I see similar pattern in such queries so maybe you will find how to unify it to one method and put it on model.
e593edf
to
ac464bf
Compare
ac464bf
to
63836de
Compare
@dclarizio @martinpovolny @lpichler i think it is ready for some clicking in the UI. You just need to add this PR ManageIQ/manageiq-api#464 to your API plugin. |
f4696e3
to
1a84119
Compare
2c5d287
to
27ee4e9
Compare
Checked commits Hyperkid123/manageiq-ui-classic@ad51220~...27ee4e9 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 **
|
@dclarizio @himdel ok after a lot debugging hacking and discussing, we (me and @himdel) have decided that introducing client-side routing at this stage will create more problems than we have right now. Until other major changes are done to the app, adding client side routing to existing parts of the ui is not very beneficial. There is a ton of interactions between trees, toolbars and other that make this unnecessarily complicated (the code shows it) and not very maintainable. I will extract all the components i have made simply put them inside the layout without the routing. |
This should not be included to Hammer release.
This PR replaces the whole user section in access control with React components.
Changes
TO-DO
disable tree navigation while adding/editing/tagging userEDIT: most of the PR are test related files i did not write 3k+ lines of code