ManageIQ/manageiq-ui-classic

View on GitHub
app/views/miq_policy_rsop/_rsop_results.html.haml

Summary

Maintainability
Test Coverage
- url = url_for_only_path(:action => 'rsop_show_options')
- observe = {:url => url}.to_json
#rsop_results_div
  = render :partial => "layouts/flash_msg"
  - if @rsop_tree
    %fieldset{:style => "margin: 8px;"}
      %h3= _("Display Options")
      .form-horizontal
        .form-group
          %label.control-label.col-md-2
            = _("Show out of scope items:")
          .col-md-8
            = check_box_tag("out_of_scope", "1", @sb[:rsop][:out_of_scope],
              "data-miq_sparkle_on"       => true,
              "data-miq_sparkle_off"      => true,
              "data-miq_observe_checkbox" => observe)
        .form-group
          %label.control-label.col-md-2
            = _("Show policies:")
          .col-md-8
            = check_box_tag("passed", "1", @sb[:rsop][:passed],
              "data-miq_sparkle_on"       => true,
              "data-miq_sparkle_off"      => true,
              "data-miq_observe_checkbox" => observe)
             
            = _("Passed")
             
            = check_box_tag("failed", "1", @sb[:rsop][:failed],
              "data-miq_sparkle_on"       => true,
              "data-miq_sparkle_off"      => true,
              "data-miq_observe_checkbox" => observe)
             
            = _("Failed")
    %fieldset{:style => "margin: 8px;"}
      %h3= _("Policy Simulation Results")
       
      %strong
        = _("* Items in")
        %font{:color => "red"}
          %i
            = _("red italics")
        = _("do not change the outcome of the scope or expression")
      %br{:style => "line-height: 2.5em"}
      .btn.btn-default{:id => "squash_button", :onclick => "miqSquashToggle('#{j_str(@rsop_tree.name.to_s)}')", :title => _('Collapse All')}
        %i{:class => "fa fa-minus-square-o fa-lg"}
      %br{:style => "line-height: 2.5em"}
      = render(:partial => 'shared/tree', :locals => {:tree => @rsop_tree, :name => @rsop_tree.name})
  - else
     
    %strong
      = _("* Enter Policy Simulation options on the left and press Submit")