ManageIQ/manageiq-ui-classic

View on GitHub
app/views/ops/_diagnostics_cu_repair_tab.html.haml

Summary

Maintainability
Test Coverage
- if @sb[:active_tab] == "diagnostics_cu_repair"
  - url = url_for_only_path(:action => 'cu_repair_field_changed')
  - url_json = {:url => url}.to_json
  -# Create from/to date JS vars to limit calendar starting from
  :javascript
    ManageIQ.calendar.calDateFrom = null;
    ManageIQ.calendar.calDateTo = new Date();
  = render :partial => "layouts/flash_msg"

  %h3= _("Collection Options")
  .form-horizontal
    .form-group
      %label.col-md-2.control-label
        = _("Timezone")
      .col-md-8
        = select_tag('cu_repair_tz',                                                       |
                    options_for_select(ViewHelper::ALL_TIMEZONES, @edit[:new][:timezone]), |
                    :class    => "selectpicker")                                           |
      :javascript
        miqInitSelectPicker();
        miqSelectPickerEvent('cu_repair_tz', "#{url}")
    .form-group
      %label.col-md-2.control-label
        = _("Start Date")
      .col-md-8
        = datepicker_input_tag("miq_date_1",   |
          @edit[:new][:start_date],            |
          :readonly               => true,     |
          "data-date-orientation" => "bottom", |
          "data-miq_observe_date" => url_json) |
    .form-group
      %label.col-md-2.control-label
        = _("End Date")
      .col-md-8
        = datepicker_input_tag("miq_date_2",   |
          @edit[:new][:end_date],              |
          :readonly               => true,     |
          "data-date-orientation" => "bottom", |
          "data-miq_observe_date" => url_json) |

  .note= _("Note: Gap Collection is only available for VMware vSphere Infrastructures")