-
Notifications
You must be signed in to change notification settings - Fork 125
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
Open URL through automate for various objects #380
Conversation
Checked commit martinpovolny@8512e5a with ruby 2.3.3, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 db/migrate/20160309144534_create_system_consoles.rb
|
8d2a70f
to
01f4348
Compare
ping @Ladas |
def change | ||
create_table :saved_urls do |t| | ||
t.bigint "refers_to_id", :type => :bigint | ||
t.string "refers_to_type" |
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.
t.references :refers_to, :polymorphic => true, :index => true, :type => :bigint
should create the refers_to_id
and ..._type` and the index
@@ -0,0 +1,12 @@ | |||
class CreateSavedUrls < ActiveRecord::Migration[5.0] | |||
def change | |||
create_table :saved_urls do |t| |
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.
should be create_table :saved_urls, :id => :bigserial
I believe
cc @lpichler what's the rake command to generate the schema? We should still run it, right? (The CI was failing without it in the past) |
01f4348
to
78de544
Compare
@Ladas : PR updated according to your guidance. Please, check again. |
class CreateExternalUrls < ActiveRecord::Migration[5.0] | ||
def change | ||
create_table :external_urls, :id => :bigserial do |t| | ||
t.references :refers_to, :polymorphic => true, :index => true, :type => :bigint |
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.
if the index => true
here does't work, lets remove it (it should create external_urls
for you, but it's not implemented in all migration methods)
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.
refers_to
maybe just resource
?
def change | ||
create_table :external_urls, :id => :bigserial do |t| | ||
t.references :refers_to, :polymorphic => true, :index => true, :type => :bigint | ||
t.string "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.
nitpick: but we are using symbols:
t.string "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.
Agree with @lpichler here, can we use all symbols for the column names?
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 missed that. Fixed now.
t.belongs_to :user, :type => :bigint | ||
end | ||
|
||
add_index "external_urls", ["refers_to_id", "refers_to_type"], :name => "saved_urls_on_refers_to_id_and_refers_to_type" |
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.
same here
looks like it was removed: http://talk.manageiq.org/t/new-schema-specs-for-new-replication/1404/4 |
78de544
to
96b077f
Compare
@Ladas : fixed. @lpichler : renamed and also renamed in the core PR here: ManageIQ/manageiq#18849 |
@martinpovolny I think the BZ link should be https://bugzilla.redhat.com/show_bug.cgi?id=1643331, right? The one in the initial PR comment is closed. |
Also, what objects are going to be referenced by this url and if it's temporary, why do we need a table? |
@martinpovolny If the goal is to show the vm summary page why a new table and not an attribute on the vm like we do with topology? Also, the URL for vsphere is going to be different depending on version, if you have the html5 UI or just the old flash UI, etc... so I'm curious who would be generating this URL. E.g. for vSphere 6.7 it looks like this |
@carbonin : the link is correct.
No that is not the goal. The goal is in the BZ. If the goal is not clear from the BZ, then, please, read the (partial) documentation in this PR: ManageIQ/guides#355 This PR has nothing to do with the VM consoles although it can be used to replace a VM console with a custom one. |
How else do we pass data from a worker running on one appliance to a different appliance? |
The bz you have linked to in the description is closed as a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1643331 The goal of the BZ is pretty clear:
Also important that this also isn't the VM's console, but the VM's summary page. |
96b077f
to
3669477
Compare
@NickLaMuro, @agrare: this is about extending an existing mechanism (mentioned for example here: I have implemented that mechanism several years ago, and at that time I did put the URL in the Here I am trying to do the same in a more universal way. I do not know how else to explain it to you. Above I have linked a PR to a guides PR where the mechanism is explained: https://github.com/martinpovolny/guides/blob/automate_url_opener/automate_url_open.md. Do you need any further explanation? Shall we schedule a video chat? |
@martinpovolny Wrong "Nick" I think... cc @carbonin |
I have linked the one that contains a better explanation of the issue. On purpose. You are linking the one that only mentiones one usecase and very shortly. Please, read the BZ that I linked. |
Okay sounds like this bz https://bugzilla.redhat.com/show_bug.cgi?id=1643331 should have actually been marked as a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1550002 then? We shouldn't be pointing PRs to closed BZs so lets either reopen the original one or add enough description to the current BZ. |
Adding a table for temporary storing URL returned from automate.
BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1550002
UI PR: ManageIQ/manageiq-ui-classic#5688
Guides article: https://github.com/martinpovolny/guides/blob/automate_url_opener/automate_url_open.md (from PR: ManageIQ/guides#355)
Core PR: ManageIQ/manageiq#18849
Automate PR: ManageIQ/manageiq-automation_engine#328