-
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
Native viewer #6574
Native viewer #6574
Conversation
@miq_bot add_label wip |
|
||
def disabled? | ||
begin | ||
@record.validate_native_viewer_support |
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.
Is this calling something from the provider's API, because then it can heavily affect the performance. cc @agrare
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.
Oh sorry, didn't see the wip 😕
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.
@skateman this call is similar to the one that is doing vmware VRMC button, it's only to test if ems is not nil and state is 'on'. No call to external provider.
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.
please feel free to suggest modifications
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.
BTW Merry Christmas 'cause I realized that midnight has passed
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.
Okkay, I'm gonna dig into these. Happy new year!
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.
Many thanks and Happy new year also to you and the team
@miq-bot add_label wip |
What about naming it a more universal |
Hi @skateman, yes absolutely. I have to admit that I tried several namings, and before it was Native Console. So yes, no problem to change to that. When I'll back to work I'll change to |
@skateman, may I ask also to check where I manage the task_complete? I'm passing the task_id to the method that is executing the send_data The price is to execute two times a |
Show native viewer button for redhat providers and allow connection file (usually named console.vv) to be dowloaded after requiring via task
4cc30e5
to
4503228
Compare
Checked commit gekorob@4503228 with ruby 2.5.5, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0 |
@skateman I changed from Native Viewer Console to Native Console as you suggested. Also changed in manageiq core and in the provider. |
@miq-bot remove_label wip |
end | ||
|
||
def native_console_task_complete | ||
miq_task = MiqTask.find(params[:task_id]) |
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.
Do we really need to search for the MiqTask
here, as far as I see, it's just "validation" which could be done in the next step when opening the window.
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.
Yes it's only to test if the task has results. You're right I'll try to move it in the launch_native_console so we can remove the first find.
), | ||
button( | ||
:vm_native_console, | ||
'pficon pficon-screen fa-lg', |
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.
@epwinchell maybe we need a different icon for this, your call.
For the first look, the code looks fine, with some minor things. Maybe we want to extend this into the Service UI, cc @martinpovolny and @himdel if we want that (but my guess is yes). I can help you with that. |
@skateman do you have suggestions for the i18n messages? |
Which messages are we talking about here? |
I was thinking at strings related to the button: button(
:vm_native_console,
'pficon pficon-screen fa-lg',
N_('Open a native console for this VM'),
N_('Native Console'),
:keepSpinner => true,
:url => "native_console",
:klass => ApplicationHelper::Button::VmNativeConsole
), 'cause Native Console didn't exists before as a button. |
AFAIK you don't have to do more than you did, the |
Great thx a lot, so I'll leave it like this |
@gekorob Could you post a screenshot? Thanks |
|
||
def disabled? | ||
begin | ||
@record.validate_native_console_support |
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.
Can you confirm that thisvalidate_native_console_support
only talks to the database? (it does not do any time consuming operation and does to try to access the VM or talk to a provider).
Thx!
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.
Hi @martinpovolny, yes, it's testing only if the ext_management_system is nil and the state is on.
https://github.com/ManageIQ/manageiq-providers-ovirt/blob/c544028e4aea14910c0a9ebacb02107dd4156f98/app/models/manageiq/providers/redhat/infra_manager/vm/remote_console.rb#L43-L49
Sure @epwinchell, in the drop down list, native console has the same icon of the other console. I thought it was ok, but if you have another one I can refer to that. Tell me if is it ok for 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.
@gekorob Thanks. It looks good. We'll keep it simple.
Gonna test this |
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 there is a pending core PR |
Backported to ivanchuk via #7372 |
Show native viewer button for redhat providers and allow
connection file to be downloaded after requiring it via task
related to BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=1451594
Depends on: