-
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
Fix open_url with dialog #4334
Fix open_url with dialog #4334
Conversation
7be26fd
to
93dfcd3
Compare
73e211b
to
c21cf0c
Compare
@miq-bot add_label pending core |
@miq-bot add_label gaprindashvili/yes, automation/automate, blocker, bug |
bba0e1c
to
39bea79
Compare
a651121
to
7e04682
Compare
@miq-bot remove_label wip |
@@ -248,6 +248,12 @@ def ab_group_delete | |||
end | |||
end | |||
|
|||
def open_url_after_dialog | |||
url = SystemConsole.find_by(:vm_id => params[:targetId]).url | |||
# url = "www.redhat.com" |
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.
forgotten comment?
Checked commits ZitaNemeckova/manageiq-ui-classic@fce0833~...171214d with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@ZitaNemeckova What page am I expecting after submitting the dialog following your steps in the description? Could you add a screenshot? Thanks. |
@lfu I updated the description. Let me know if you need more info :) |
@lfu: I suppose you are testing this one. Thanks! Ping me, please, once you verify that this works in the UI. |
@ZitaNemeckova Thanks for the update. |
Pop-ups unblocked in the browser? |
@martinpovolny Of course it is blocked! And now I got: |
what about an url starting with 'http://' or 'https://" ? might be anything else is considered relative? |
@martinpovolny 👍 Worked with |
@martinpovolny Two related PRs aren't merged yet. ManageIQ/manageiq#17802 and ManageIQ/manageiq-api#444 Is it ok, it's merged without them? |
@ZitaNemeckova : tests pass --> no breakage. Also I pinged both the core and API PRs. We need to move! |
@miq-bot remove_label pending core |
@@ -50,4 +50,5 @@ | |||
:finish_submit_endpoint => finish_submit_endpoint, | |||
:api_submit_endpoint => api_submit_endpoint, | |||
:api_action => api_action, | |||
:cancel_endpoint => cancel_endpoint} | |||
:cancel_endpoint => cancel_endpoint, | |||
:open_url => open_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.
@ZitaNemeckova is causing an error on upstream, please take a look
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.
Fixed in #4521
@ZitaNemeckova As discussed, I tried to backport #4036 as well but that's conflicting too. I think it's best that you create a separate PR for gaprindashvili for this and #4036 combined. Feel free to include #4521 as well, since that's a follow up to this PR. |
Backported to Gaprindashvili via #4691 |
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1602023
Create custom button with Automate method:
Automation -> Automate -> Explorer:
a) create a new domain with a name
b) select ManageIQ/System/Request
c) Configuration -> Copy this Class (copy it to your new domain from step 1a)
d) select Request Class in your new domain -> Configuration -> Add a new Instance
TestOpenUrl
meth1
writetest_open_url
e) Select Request class in your new domain, click Methods -> Configuration -> Add a new Method
vm.remote_console_url
to something):important: use URL including the protocol (https) or the browser will ignore the request
also disable URL pop-up blocking in your browser to make this work
Automation -> Automate -> Customization -> Buttons
Create a new button for VMs with Open Url checked and with a Dialog(doesn't matter which one) and Request has to be
TestOpenUrl
Go to VM summary page and click the new button
After submitting the dialog you should be redirected to VM summary page and a new page should be open in a tab.
@miq-bot add_label wip
Related PRs: ManageIQ/manageiq#17802 (MERGED) and ManageIQ/manageiq-automation_engine#205 (MERGED) and ManageIQ/manageiq-api#444 (MERGED)