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

Don't render table header for empty automate domain and namespace #4401

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 25 additions & 21 deletions app/views/miq_ae_class/_ns_details.html.haml
@@ -1,24 +1,28 @@
#ns_details_div
- unless @in_a_form
= render :partial => 'layouts/info_msg', :locals => {:message => @version_message} if @version_message
%table#ns_details_grid.table.table-striped.table-bordered.table-hover.table-clickable.table-checkable
%thead
%th.table-view-pf-select
%input.checkall{:type => 'checkbox', :title => _('Check All')}
%th
%th
%tbody{'data-click-url' => '/miq_ae_class/tree_select/'}
- @records.each do |record|
- next if record.name == '$'
- cls_cid = "#{class_prefix(record.class)}-#{record.id}"
%tr{'data-click-id' => cls_cid}
%td.table-view-pf-select.noclick
%input{:type => 'checkbox', :value => cls_cid}
%td.table-view-pf-select
%i{:class => record.decorate.fonticon}
%td
= record_name(record)
:javascript
$(function () {
$('#ns_details_grid').miqGrid();
});
- if @records.length.zero?
- info_message = @record.class.to_s == 'MiqAeDomain' ? _("The selected domain is empty") : _("The selected Namespace is empty")
= render :partial => 'layouts/info_msg', :locals => {:message => info_message}
- else
%table#ns_details_grid.table.table-striped.table-bordered.table-hover.table-clickable.table-checkable
%thead
%th.table-view-pf-select
%input.checkall{:type => 'checkbox', :title => _('Check All')}
%th
%th
%tbody{'data-click-url' => '/miq_ae_class/tree_select/'}
- @records.each do |record|
- next if record.name == '$'
- cls_cid = "#{class_prefix(record.class)}-#{record.id}"
%tr{'data-click-id' => cls_cid}
%td.table-view-pf-select.noclick
%input{:type => 'checkbox', :value => cls_cid}
%td.table-view-pf-select
%i{:class => record.decorate.fonticon}
%td
= record_name(record)
:javascript
$(function () {
$('#ns_details_grid').miqGrid();
});