-
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
Adding UI support for Pod to PersistentVolume relationship. #3299
Adding UI support for Pod to PersistentVolume relationship. #3299
Conversation
@himdel @kbrock the reason I had to add Credit to @kbrock for finding this and saving my life 🥇 |
@miq-bot add_label gaprindashvili/yes, providers/containers, bug |
940bb69
to
812e779
Compare
@@ -16,7 +16,7 @@ def textual_group_relationships | |||
_("Relationships"), | |||
%i( | |||
ems container_project container_services container_replicator containers container_node | |||
lives_on container_images | |||
lives_on container_images pod_to_persistent_volume_relationship |
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.
How about persistent_volumes
instead 😅
812e779
to
9167739
Compare
@zeari fixed. 👍 |
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.
Looks good.
Glad you found the hash that was causing havoc on the search.rb
code. very good find.
I don't know too much about the ui code - so I'm not sure if my 👍 means anything
@@ -171,7 +171,8 @@ def textual_persistent_volume | |||
end | |||
|
|||
def textual_persistent_volumes | |||
textual_link(@record.persistent_volumes) | |||
link = url_for_only_path(:id => @record.id, :action => "show", :display => "persistent_volumes") |
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.
did you still need to use url_for_only_path
now that you taught the system how to deal with persistent_volumes
? um, did you test if the url "just works"?
9167739
to
5a9ce8f
Compare
@@ -36,3 +36,10 @@ | |||
= multiple_relationship_link(@record, :container) | |||
= multiple_relationship_link(@record, :container_image) | |||
= single_relationship_link(@record, :container_node) | |||
- if @record.number_of(:persistent_volumes).zero? |
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 is wrong, you need to use one of the *relationship_link
functions (those also check the user is allowed to see the thing..)
Any reason you can't do that?
5a9ce8f
to
f586d16
Compare
@himdel fixed - |
@@ -36,3 +36,4 @@ | |||
= multiple_relationship_link(@record, :container) | |||
= multiple_relationship_link(@record, :container_image) | |||
= single_relationship_link(@record, :container_node) | |||
= multiple_relationship_link(@record, :persistent_volumes) |
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.
:persistent_volume
.. this should make multiple_relationship_link
use the right rbac feature, while still accessing the right data (as it does call table_name.pluralize
for that).
(so no need for the other pr after all, I think)
Adding UI support for pv to pod relationship adding PersistentVolume to HAS_ASSOCATION refactor code adding relationship to navbar refactoring textual_persistent_volumes works without the link fixed listnav fixing listanv
f586d16
to
909739e
Compare
@himdel thanks mate! |
Checked commit nimrodshn@909739e with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0 |
@himdel PTAL? |
LGTM, verified in the UI :) |
Adding UI support for Pod to PersistentVolume relationship. (cherry picked from commit 2341a39) https://bugzilla.redhat.com/show_bug.cgi?id=1552889
Gaprindashvili backport details:
|
Adding UI support for
Pod
toPersistentVolume
relationship.BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1435235
GIF:
cc: @himdel @kbrock @zeari