-
Notifications
You must be signed in to change notification settings - Fork 74
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
Support for opening URL from the UI through automate. #328
Conversation
Pull Request Test Coverage Report for Build 2611
💛 - Coveralls |
Pull Request Test Coverage Report for Build 2732
💛 - Coveralls |
@martinpovolny Please include the BZ in the PR description. Thanks. |
@@ -0,0 +1,7 @@ | |||
module MiqAeSavedUrlMixin | |||
extend ActiveSupport::Concern | |||
def saved_url=(url) |
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.
@martinpovolny If we are specifically using this for the custom button URL it would be better if that name reflected that. The method name exposed here does not have to match the backend model method, but that usually makes things easier so we should seriously consider naming at each level.
c3d74b4
to
3523047
Compare
@martinpovolny Is this ready to merge? |
@gmcculloug : I need to add the mixin for the provider classes too. Looking into that now. |
I wonder if I need to add the mixin to |
Based on the It would get added here to support Providers: |
3523047
to
a578b82
Compare
a578b82
to
364c8cc
Compare
Checked commit martinpovolny@364c8cc with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
@@ -1,5 +1,8 @@ | |||
module MiqAeMethodService | |||
class MiqAeServiceVm < MiqAeServiceVmOrTemplate | |||
require_relative "mixins/miq_ae_external_url_mixin" | |||
include MiqAeExternalUrlMixin |
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.
@martinpovolny VM was not in the list provided in https://bugzilla.redhat.com/show_bug.cgi?id=1550002#c6.
If a user can set both remote_console_url=
and external_url=
what happens?
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.
@gmcculloug : in the UI I want to look for the external_url
first and then as a fallback for the remote_console_url
(SystemConsole entity). So that backwards compatibility is kept.
I do not think that we should do things differently for different entities. So moving forward I'd like to deprecate the remote_console_url
.
Does that make sense to you?
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.
Alternatively I'd change the remote_console_url
method to assign to the same place as external_url
and add a migration to remove the column. But again, it can be done as a next step.
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.
My understand is the remote_console_url
has a lot more support today for the specific task of setting up a proxy to support VM consoles, but it can also support what external_url
is trying to do. As long as a combined field can support the two use-cases then I'm good.
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.
When I added this it was used for this single purpose.
The entity, that it writes to, the SystemConsole
, that is used for the proxies.
But not this particular column or the particular method remote_console_url=
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.
Got it, let's create an issue to track the follow items, otherwise I'm good with this change. 👍
https://bugzilla.redhat.com/show_bug.cgi?id=1643331
(
https://bugzilla.redhat.com/show_bug.cgi?id=1550002)requires ManageIQ/manageiq-schema#380 (merged)
ManageIQ/manageiq#18849 (merged)
docs PR: ManageIQ/guides#355