Skip to content

Commit

Permalink
Merge pull request #5223 from skateman/worker-checkbox
Browse files Browse the repository at this point in the history
Display missing checkboxes for workers under Diagnostics

(cherry picked from commit ade69c2)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1673747
  • Loading branch information
mzazrivec authored and simaishi committed Feb 7, 2019
1 parent 5135d0b commit cf628f8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/ops_controller/diagnostics.rb
Expand Up @@ -540,7 +540,7 @@ def refresh_server_summary
def pm_get_workers
@lastaction = "pm_workers_list"
@force_no_grid_xml = true
@no_checkboxes = true
@no_checkboxes = false
@gtl_type = "list"
@embedded = @pages = false
@showlinks = true
Expand Down
26 changes: 26 additions & 0 deletions spec/controllers/ops_controller/diagnostics_spec.rb
Expand Up @@ -57,6 +57,32 @@

describe OpsController do
render_views

describe '#report_data' do
before do
stub_user(:features => :all)
EvmSpecHelper.create_guid_miq_server_zone
FactoryBot.create(:miq_worker, :miq_server => server)
end

let(:server) { FactoryBot.create(:miq_server) }

it 'returns workers with checkboxes' do
report_data_request(
:model => 'MiqWorker',
:parent_id => nil,
:named_scope => [['with_miq_server_id', server.id]],
:explorer => true,
:gtl_dbname => nil,
:gtl_type => 'list'
)
results = assert_report_data_response
expect(results['data']['rows'].length).to eq(1)
expect(results['data']['rows'][0]["cells"][0]).to have_key("is_checkbox")
expect(results['data']['rows'][0]["cells"][0]["is_checkbox"]).to be_truthy
end
end

context "#tree_select" do
it "renders zone list for diagnostics_tree root node" do
stub_user(:features => :all)
Expand Down

0 comments on commit cf628f8

Please sign in to comment.