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

Move VM/Web console toolbar buttons to an Access dropdown #12720

Merged

Conversation

bmclaughlin
Copy link
Contributor

Moved MKS/VNC/VMRC and Cockpit toolbar buttons to an Access dropdown. Additional UX changes per the screenshot in the BZ link below.

https://bugzilla.redhat.com/show_bug.cgi?id=1395382

@bmclaughlin
Copy link
Contributor Author

@miq-bot add_label ui, blocker

@bmclaughlin
Copy link
Contributor Author

bmclaughlin commented Nov 17, 2016

Before:
console-buttons-before

After:
console-buttons-after

@miq-bot
Copy link
Member

miq-bot commented Nov 17, 2016

Checked commits bmclaughlin/manageiq@c34da4e~...0aacd48 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
2 files checked, 6 offenses detected

app/helpers/application_helper/toolbar/x_vm_center.rb

@dclarizio dclarizio merged commit 1bc8a23 into ManageIQ:master Nov 17, 2016
@dclarizio dclarizio deleted the move-console-buttons-to-a-folder branch November 17, 2016 21:38
@dclarizio dclarizio added this to the Sprint 50 Ending Dec 5, 2016 milestone Nov 17, 2016
@dclarizio dclarizio self-assigned this Nov 17, 2016
@chessbyte
Copy link
Member

Euwe Backport conflict:

$ git cherry-pick -e -x -m 1 1bc8a23 
error: could not apply 1bc8a23... Merge pull request #12720 from bmclaughlin/move-console-buttons-to-a-folder
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'

$ git status
On branch euwe
Your branch is up-to-date with 'upstream/euwe'.
You are currently cherry-picking commit 1bc8a23.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:

    modified:   app/helpers/application_helper/toolbar_builder.rb

Unmerged paths:
  (use "git add <file>..." to mark resolution)

    both modified:   app/helpers/application_helper/toolbar/x_vm_center.rb

$ git diff
diff --cc app/helpers/application_helper/toolbar/x_vm_center.rb
index cf6be7d,4055009..0000000
--- a/app/helpers/application_helper/toolbar/x_vm_center.rb
+++ b/app/helpers/application_helper/toolbar/x_vm_center.rb
@@@ -228,34 -228,43 +228,74 @@@ class ApplicationHelper::Toolbar::XVmCe
            :options => {:feature => :reset}),
        ]
      ),
++<<<<<<< HEAD
 +    button(
 +      :vm_console,
 +      'pficon pficon-screen fa-lg',
 +      N_('Open a web-based console for this VM'),
 +      nil,
 +      :url     => "console",
 +      :confirm => N_("Opening a VM web-based console can take a while and requires that the VMware MKS plugin version configured for Management Engine already be installed and working.  Are you sure?")),
 +    button(
 +      :vm_vnc_console,
 +      'fa fa-html5 fa-lg',
 +      N_('Open a web-based VNC or SPICE console for this VM'),
 +      nil,
 +      :url     => "html5_console",
 +      :confirm => N_("Opening a web-based VM VNC or SPICE console requires that the Provider is pre-configured to allow VNC connections.  Are you sure?")),
 +    button(
 +      :vm_vmrc_console,
 +      'pficon pficon-screen fa-lg',
 +      N_('Open a web-based VMRC console for this VM.  This requires that VMRC is pre-configured to work in your browser.'),
 +      nil,
 +      :url     => "vmrc_console",
 +      :confirm => N_("Opening a VM web-based VMRC console requires that VMRC is pre-configured to work in your browser.  Are you sure?")),
 +    button(
 +      :cockpit_console,
 +      nil,
 +      N_('Open a new browser window with Cockpit for this VM.  This requires that Cockpit is pre-configured on the VM.'),
 +      nil,
 +      :image   => "cockpit",
 +      :url     => "launch_cockpit"),
++=======
+   ])
+   button_group('vm_access', [
+     select(
+       :vm_remote_access_choice,
+       'fa pficon-screen fa-lg',
+       N_('VM Remote Access'),
+       N_('Access'),
+       :items => [
+         button(
+           :vm_console,
+           'pficon pficon-screen fa-lg',
+           N_('Open a web-based console for this VM'),
+           N_('VM Console'),
+           :url     => "console",
+           :confirm => N_("Opening a VM web-based console can take a while and requires that the VMware MKS plugin version configured for Management Engine already be installed and working.  Are you sure?")),
+         button(
+           :vm_vnc_console,
+           'pficon pficon-screen fa-lg',
+           N_('Open a web-based VNC or SPICE console for this VM'),
+           N_('VM Console'),
+           :url     => "html5_console"),
+         button(
+           :vm_vmrc_console,
+           'pficon pficon-screen fa-lg',
+           N_('Open a web-based VMRC console for this VM.  This requires that VMRC is pre-configured to work in your browser.'),
+           N_('VM Console'),
+           :url     => "vmrc_console",
+           :confirm => N_("Opening a VM web-based VMRC console requires that VMRC is pre-configured to work in your browser.  Are you sure?")),
+         button(
+           :cockpit_console,
+           'pficon pficon-screen fa-lg',
+           N_('Open a new browser window with Cockpit for this VM.  This requires that Cockpit is pre-configured on the VM.'),
+           N_('Web Console'),
+           # :image   => "cockpit",
+           :url     => "launch_cockpit"),
+       ]
+     ),
++>>>>>>> 1bc8a23... Merge pull request #12720 from bmclaughlin/move-console-buttons-to-a-folder
    ])
    button_group('snapshot_tasks', [
      button(

@serenamarie125
Copy link

@bmclaughlin can we remove the icons from the dropdown?

@bmclaughlin
Copy link
Contributor Author

@serenamarie125, we could in a follow-up pull request, but I don't see an example of that in any other toolbars. Is that a (new?) design pattern when all of the buttons use the same image that they are left off?

@chessbyte
Copy link
Member

@chessbyte
Copy link
Member

Backported to Euwe via #12749

@himdel
Copy link
Contributor

himdel commented Nov 21, 2016

This introduced a bug where the VNC console is never available - fix in #12767 - should we blocker it?

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.

None yet

6 participants