<commit_before>- @angularForm = true
- div_num ||= ""

%form.form-horizontal#form_div{:name => "angularForm", 'ng-controller' => "logCollectionFormController", 'ng-show' => "afterGet", 'data-log-collection-form-fields-url' => "/#{controller_name}/log_collection_form_fields/", 'data-save-url' => "/#{controller_name}/log_depot_edit/", :novalidate => 1}
  = render :partial => "layouts/flash_msg", :locals => {:div_num => div_num}

  %h3
    = _("Editing Log Depot Settings for %{class}: %{display}") % {:class   => Dictionary.gettext(@record.class.name,
                                                                                                   :type     => :model,
                                                                                                   :notfound => :titleize),
                                                                    :display => @record.display_name}
  .form-group
    %label.control-label.col-md-2
      = _("Type")
    .col-md-8
      - default_option = [_("<No Depot>"), nil]
      = select_tag('log_protocol', options_for_select([default_option] + @supported_depots_for_select),
                        "ng-model"       => "logCollectionModel.log_protocol",
                        "ng-change"      => "miqDBBackupService.logProtocolChanged(logCollectionModel)",
                        "checkchange"    => "",
                        :class           => "form-control",
                        )

  = render :partial => "layouts/angular/edit_log_depot_settings_angular",
                       :locals  => {:ng_show             => "miqDBBackupService.logProtocolSelected(logCollectionModel)",
                                    :ng_reqd_depot_name  => "miqDBBackupService.dbRequired(logCollectionModel, logCollectionModel.depot_name)",
                                    :ng_model_depot_name => "logCollectionModel.depot_name",
                                    :ng_reqd_uri         => "miqDBBackupService.dbRequired(logCollectionModel, logCollectionModel.uri)",
                                    :ng_model_uri        => "logCollectionModel.uri",
                                    :ng_model_uri_prefix => "logCollectionModel.uri_prefix",
                                    :ng_readonly         => "logCollectionModel.log_protocol == 'Red Hat Dropbox'",
                                    :uri_prefix_display  =>  "{{logCollectionModel.uri_prefix}}://"}
  = render :partial => "layouts/angular/auth_credentials_angular",
                       :locals  => {:ng_show           => "miqDBBackupService.credsProtocol(logCollectionModel)",
                                    :ng_model          => "logCollectionModel",
                                    :ng_reqd_userid    => "miqDBBackupService.credsRequired(logCollectionModel, logCollectionModel.log_userid)",
                                    :ng_reqd_password  => "miqDBBackupService.credsRequired(logCollectionModel, logCollectionModel.log_password)",
                                    :ng_reqd_verify    => "miqDBBackupService.credsRequired(logCollectionModel, logCollectionModel.log_verify)",
                                    :validate_url      => "log_depot_edit",
                                    :id                => nil,
                                    :valtype           => "log",
                                    :basic_info_needed => true}

  = render :partial => "layouts/angular/x_edit_buttons_angular"

:javascript
  ManageIQ.angularApplication.value('serverId', '#{@record.id || "new"}');
  angular.bootstrap(jQuery('#form_div'), ['ManageIQ.angularApplication'], { strictDi: true });<commit_msg>Corrected styling of log depot form (transferred from ManageIQ/manageiq@04f0ad240aa405b05c6b39aac0be5bf15944ee70)<commit_after>- @angularForm = true
- div_num ||= ""

%form.form-horizontal#form_div{:name => "angularForm", 'ng-controller' => "logCollectionFormController", 'ng-show' => "afterGet", 'data-log-collection-form-fields-url' => "/#{controller_name}/log_collection_form_fields/", 'data-save-url' => "/#{controller_name}/log_depot_edit/", :novalidate => 1}
  = render :partial => "layouts/flash_msg", :locals => {:div_num => div_num}

  %h3
    = _("Editing Log Depot Settings for %{class}: %{display}") % {:class   => Dictionary.gettext(@record.class.name,
                                                                                                   :type     => :model,
                                                                                                   :notfound => :titleize),
                                                                    :display => @record.display_name}
  .form-group
    %label.control-label.col-md-2
      = _("Type")
    .col-md-8
      - default_option = [_("<No Depot>"), nil]
      = select_tag('log_protocol', options_for_select([default_option] + @supported_depots_for_select),
                        "ng-model"       => "logCollectionModel.log_protocol",
                        "ng-change"      => "miqDBBackupService.logProtocolChanged(logCollectionModel)",
                        "checkchange"    => "",
                        :class           => "selectpicker",
                        )
      :javascript
        miqInitSelectPicker();

  = render :partial => "layouts/angular/edit_log_depot_settings_angular",
                       :locals  => {:ng_show             => "miqDBBackupService.logProtocolSelected(logCollectionModel)",
                                    :ng_reqd_depot_name  => "miqDBBackupService.dbRequired(logCollectionModel, logCollectionModel.depot_name)",
                                    :ng_model_depot_name => "logCollectionModel.depot_name",
                                    :ng_reqd_uri         => "miqDBBackupService.dbRequired(logCollectionModel, logCollectionModel.uri)",
                                    :ng_model_uri        => "logCollectionModel.uri",
                                    :ng_model_uri_prefix => "logCollectionModel.uri_prefix",
                                    :ng_readonly         => "logCollectionModel.log_protocol == 'Red Hat Dropbox'",
                                    :uri_prefix_display  =>  "{{logCollectionModel.uri_prefix}}://"}
  = render :partial => "layouts/angular/auth_credentials_angular",
                       :locals  => {:ng_show           => "miqDBBackupService.credsProtocol(logCollectionModel)",
                                    :ng_model          => "logCollectionModel",
                                    :ng_reqd_userid    => "miqDBBackupService.credsRequired(logCollectionModel, logCollectionModel.log_userid)",
                                    :ng_reqd_password  => "<PASSWORD>Service.creds<PASSWORD>(logCollectionModel, logCollectionModel.log_password)",
                                    :ng_reqd_verify    => "miqDBBackupService.credsRequired(logCollectionModel, logCollectionModel.log_verify)",
                                    :validate_url      => "log_depot_edit",
                                    :id                => nil,
                                    :valtype           => "log",
                                    :basic_info_needed => true}

  = render :partial => "layouts/angular/x_edit_buttons_angular"

:javascript
  ManageIQ.angularApplication.value('serverId', '#{@record.id || "new"}');
  angular.bootstrap(jQuery('#form_div'), ['ManageIQ.angularApplication'], { strictDi: true });
{'fraction_non_alphanumeric': 0.11581920903954802, 'fraction_numerical': 0.0041700295937584075, 'mean_word_length': 1.641207815275311, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 52, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5549587', 'n_tokens_mistral': 1930, 'n_tokens_neox': 1858, 'n_words': 244}