Skip to content
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

Opening URLs through automate #5688

Merged
merged 11 commits into from
Jul 22, 2019

Conversation

martinpovolny
Copy link
Member

@martinpovolny martinpovolny commented Jun 11, 2019

RFE BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1550002

Requires:

Doc PR: ManageIQ/guides#355

TODO

  • specs (existing specs are updated, but more tests would be good, will do that in a follow-up PR)
  • pass the targetClass though the form, (needs to be checked)
  • allow the OpenURL checkbox when editing custom buttons for all relevant classes.
  • update the documentation (from here: Fix open_url with dialog #4334) and put it to guides

Tested automate code for User

$evm.log(:info, "Current user_id #{$evm.root['user_id']}")
object = $evm.vmdb($evm.root['vmdb_object_type']).find_by(:id => $evm.root['user_id'])
$evm.log(:info, "Current object #{object}")
object.external_url = "https://www.linkedin.com"

(the vmdb_object_type would work for other entities as well, but the ID is stored elsewhere)

Tested automate code for VM

vm = $evm.root['vm']
$evm.log(:info, "VM to launch SSH for is #{vm.hostnames[0]}")
vm.external_url = "https://www.redhat.com"

A screenshot to help navigate in the UI

(it's best to follow the Guides article in the above PR)

url-example-2019-07-14_13-49

@miq-bot miq-bot added the wip label Jun 11, 2019
@martinpovolny martinpovolny force-pushed the automate_open_url branch 3 times, most recently from 83a8a3d to 4d552fa Compare July 15, 2019 21:35
@martinpovolny martinpovolny requested a review from mzazrivec July 15, 2019 21:35
@martinpovolny martinpovolny changed the title [WIP] Opening URLs through automate Opening URLs through automate Jul 16, 2019
@miq-bot miq-bot added unmergeable and removed wip labels Jul 16, 2019
@martinpovolny
Copy link
Member Author

Fixing conflict, rebasing.

@miq-bot
Copy link
Member

miq-bot commented Jul 22, 2019

Checked commits martinpovolny/manageiq-ui-classic@b81428e~...27cb094 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
5 files checked, 0 offenses detected
Everything looks fine. 👍

@mzazrivec mzazrivec added this to the Sprint 116 Ending Jul 22, 2019 milestone Jul 22, 2019
@mzazrivec mzazrivec merged commit 61a531d into ManageIQ:master Jul 22, 2019
@martinpovolny martinpovolny deleted the automate_open_url branch July 23, 2019 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants