Skip to content

Commit

Permalink
Remove VMware MKS consoles and the old VMRC plugin support
Browse files Browse the repository at this point in the history
  • Loading branch information
skateman committed Apr 13, 2017
1 parent 96dc625 commit 0ac89d7
Show file tree
Hide file tree
Showing 13 changed files with 30 additions and 833 deletions.
139 changes: 0 additions & 139 deletions app/assets/stylesheets/vmrc.css

This file was deleted.

2 changes: 1 addition & 1 deletion app/controllers/ops_controller/settings/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ def settings_set_form_vars
@edit[:current].config[:server][:role] = @edit[:current].config[:server][:role] ? @edit[:current].config[:server][:role].split(",").sort.join(",") : ""
@edit[:current].config[:server][:timezone] = "UTC" if @edit[:current].config[:server][:timezone].blank?
@edit[:current].config[:server][:locale] = "default" if @edit[:current].config[:server][:locale].blank?
@edit[:current].config[:server][:remote_console_type] ||= "MKS"
@edit[:current].config[:server][:remote_console_type] ||= "VNC"
@edit[:current].config[:smtp][:enable_starttls_auto] = GenericMailer.default_for_enable_starttls_auto if @edit[:current].config[:smtp][:enable_starttls_auto].nil?
@edit[:current].config[:smtp][:openssl_verify_mode] ||= nil
@edit[:current].config[:ntp] ||= {}
Expand Down
7 changes: 1 addition & 6 deletions app/controllers/vm_remote.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ def launch_vmware_console
console_type = ::Settings.server.remote_console_type.downcase
@vm = @record = identify_record(params[:id], VmOrTemplate)
options = case console_type
when "mks"
@sb[:mks].update(
:version => ::Settings.server.mks_version,
:mks_classid => ::Settings.server.mks_classid
)
when "webmks"
override_content_security_policy_directives(
:connect_src => ["'self'", "wss://#{params[:host]}"]
Expand Down Expand Up @@ -113,7 +108,7 @@ def console_before_task(console_type)
end
end

# Task complete, show error or launch console using VNC/MKS/VMRC task info
# Task complete, show error or launch console using VNC/WebMKS/VMRC task info
def console_after_task(console_type)
miq_task = MiqTask.find(params[:task_id])
unless miq_task.results_ready?
Expand Down
25 changes: 0 additions & 25 deletions app/helpers/application_helper/button/vm_console.rb
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
class ApplicationHelper::Button::VmConsole < ApplicationHelper::Button::Basic
needs :@record

def visible?
console_supports_type?('MKS')
end

def disabled?
unless supported_browser? && supported_os?
@error_message = _('The web-based console is only available on IE, Firefox or Chrome (Windows/Linux)')
return true
end

yield if block_given?
return true if @error_message.present?

@error_message = _('The web-based console is not available because the VM is not powered on') unless on?
@error_message.present?
end

private

def vmware?
Expand All @@ -35,12 +18,4 @@ def console_supports_type?(supported_type)
def on?
@record.current_state == 'on'
end

def supported_browser?
@view_context.is_browser?(%w(explorer firefox mozilla chrome))
end

def supported_os?
@view_context.is_browser_os?(%w(windows linux))
end
end
15 changes: 6 additions & 9 deletions app/helpers/application_helper/button/vm_vmrc_console.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@ def visible?
end

def disabled?
super { remote_control_supported? }
end

private

def remote_control_supported?
@record.validate_remote_console_vmrc_support
rescue MiqException::RemoteConsoleNotSupportedError => err
@error_message = _('VM VMRC Console error: %{error}') % {:error => err}
begin
@record.validate_remote_console_vmrc_support
rescue MiqException::RemoteConsoleNotSupportedError => err
@error_message = _('VM VMRC Console error: %{error}') % {:error => err}
end
@error_message.present?
end
end
8 changes: 0 additions & 8 deletions app/helpers/application_helper/toolbar/x_vm_center.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,6 @@ class ApplicationHelper::Toolbar::XVmCenter < ApplicationHelper::Toolbar::Basic
N_('VM Remote Access'),
N_('Access'),
:items => [
button(
:vm_console,
'pficon pficon-screen fa-lg',
N_('Open a web-based MKS 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?"),
:klass => ApplicationHelper::Button::VmConsole),
button(
:vm_webmks_console,
'pficon pficon-screen fa-lg',
Expand Down
3 changes: 0 additions & 3 deletions app/helpers/ui_constants.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ module UiConstants
TOP_TABLES_BY_WASTED_SPACE_COUNT = 5
GIGABYTE = 1024 * 1024 * 1024

# VMware MKS version choices
MKS_VERSIONS = ["2.0.1.0", "2.0.2.0", "2.1.0.0"]

# PDF page sizes
PDF_PAGE_SIZES = {
"a0" => N_("A0 - 841mm x 1189mm"),
Expand Down
14 changes: 1 addition & 13 deletions app/views/ops/_settings_server_tab.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -127,23 +127,11 @@
= _("Use")
.col-md-8
= select_tag('console_type',
options_for_select([[_("VMware MKS Plugin"), "MKS"], [_("VMware WebMKS"), "WebMKS"], [_("VNC"), "VNC"], [_("VMware VMRC Plugin"), "VMRC"]],
options_for_select([[_("VMware WebMKS"), "WebMKS"], [_("VNC"), "VNC"], [_("VMware VMRC Plugin"), "VMRC"]],
@edit[:new][:server][:remote_console_type]),
:class => "selectpicker")
:javascript
miqSelectPickerEvent('console_type', "#{url}")

- if @edit[:new][:server][:remote_console_type] == "MKS"
.form-group
%label.col-md-2.control-label
= _("VMware MKS Plugin Version")
.col-md-8
= select_tag('server_mks_version',
options_for_select(MKS_VERSIONS,
@edit[:new][:server][:mks_version]),
:class => "selectpicker")
:javascript
miqSelectPickerEvent('server_mks_version', "#{url}")
%hr
%h3
= _("NTP Servers")
Expand Down
Loading

0 comments on commit 0ac89d7

Please sign in to comment.