diff options
author | Sean McGivern <sean@gitlab.com> | 2019-06-10 10:56:25 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2019-06-10 10:56:25 +0300 |
commit | 51713627f61b5897c0697f7574d8c3d7c3e93c41 (patch) | |
tree | 21cf681e4c976bd2012af21ba749f952624de9b5 /app/views/admin | |
parent | 6a4aa3f9be8b31e5d76750d40f15f5fef2c792af (diff) | |
parent | e3072811475dcd563911a78fce85263b693d3fd6 (diff) |
Merge remote-tracking branch 'origin/master' into patch-56
Diffstat (limited to 'app/views/admin')
-rw-r--r-- | app/views/admin/application_settings/_external_authorization_service_form.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/application_settings/_outbound.html.haml | 8 | ||||
-rw-r--r-- | app/views/admin/application_settings/_pages.html.haml | 5 | ||||
-rw-r--r-- | app/views/admin/applications/_form.html.haml | 12 | ||||
-rw-r--r-- | app/views/admin/broadcast_messages/_form.html.haml | 15 | ||||
-rw-r--r-- | app/views/admin/broadcast_messages/index.html.haml | 4 | ||||
-rw-r--r-- | app/views/admin/groups/_form.html.haml | 5 | ||||
-rw-r--r-- | app/views/admin/health_check/show.html.haml | 2 | ||||
-rw-r--r-- | app/views/admin/identities/_form.html.haml | 6 | ||||
-rw-r--r-- | app/views/admin/labels/_form.html.haml | 14 | ||||
-rw-r--r-- | app/views/admin/projects/_projects.html.haml | 6 | ||||
-rw-r--r-- | app/views/admin/projects/show.html.haml | 11 | ||||
-rw-r--r-- | app/views/admin/users/_access_levels.html.haml | 24 | ||||
-rw-r--r-- | app/views/admin/users/_form.html.haml | 68 | ||||
-rw-r--r-- | app/views/admin/users/_head.html.haml | 1 | ||||
-rw-r--r-- | app/views/admin/users/show.html.haml | 2 |
16 files changed, 112 insertions, 73 deletions
diff --git a/app/views/admin/application_settings/_external_authorization_service_form.html.haml b/app/views/admin/application_settings/_external_authorization_service_form.html.haml index 01f6c7afe61..7587ecbf9d3 100644 --- a/app/views/admin/application_settings/_external_authorization_service_form.html.haml +++ b/app/views/admin/application_settings/_external_authorization_service_form.html.haml @@ -5,7 +5,7 @@ %button.btn.js-settings-toggle{ type: 'button' } = expanded ? 'Collapse' : 'Expand' %p - = _('External Classification Policy Authorization') + = _('External Classification Policy Authorization') .settings-content = form_for @application_setting, url: admin_application_settings_path(anchor: 'js-external-auth-settings'), html: { class: 'fieldset-form' } do |f| diff --git a/app/views/admin/application_settings/_outbound.html.haml b/app/views/admin/application_settings/_outbound.html.haml index f4bfb5af385..dd56bb99a06 100644 --- a/app/views/admin/application_settings/_outbound.html.haml +++ b/app/views/admin/application_settings/_outbound.html.haml @@ -8,4 +8,12 @@ = f.label :allow_local_requests_from_hooks_and_services, class: 'form-check-label' do Allow requests to the local network from hooks and services + .form-group + .form-check + = f.check_box :dns_rebinding_protection_enabled, class: 'form-check-input' + = f.label :dns_rebinding_protection_enabled, class: 'form-check-label' do + = _('Enforce DNS rebinding attack protection') + %span.form-text.text-muted + = _('Resolves IP addresses once and uses them to submit requests') + = f.submit 'Save changes', class: "btn btn-success" diff --git a/app/views/admin/application_settings/_pages.html.haml b/app/views/admin/application_settings/_pages.html.haml index 64e01fa2d00..77795dbf913 100644 --- a/app/views/admin/application_settings/_pages.html.haml +++ b/app/views/admin/application_settings/_pages.html.haml @@ -30,8 +30,7 @@ .form-check = f.check_box :lets_encrypt_terms_of_service_accepted, class: 'form-check-input' = f.label :lets_encrypt_terms_of_service_accepted, class: 'form-check-label' do - // Terms of Service should actually be a link, but the best way to get the url is using API - // So it will be done in later MR - = _("I have read and agree to the Let's Encrypt Terms of Service") + - terms_of_service_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: lets_encrypt_terms_of_service_admin_application_settings_path } + = _("I have read and agree to the Let's Encrypt %{link_start}Terms of Service%{link_end}").html_safe % { link_start: terms_of_service_link_start, link_end: '</a>'.html_safe } = f.submit _('Save changes'), class: "btn btn-success" diff --git a/app/views/admin/applications/_form.html.haml b/app/views/admin/applications/_form.html.haml index 12690343f6e..21e84016c66 100644 --- a/app/views/admin/applications/_form.html.haml +++ b/app/views/admin/applications/_form.html.haml @@ -2,13 +2,15 @@ = form_errors(application) = content_tag :div, class: 'form-group row' do - = f.label :name, class: 'col-sm-2 col-form-label' + .col-sm-2.col-form-label + = f.label :name .col-sm-10 = f.text_field :name, class: 'form-control' = doorkeeper_errors_for application, :name = content_tag :div, class: 'form-group row' do - = f.label :redirect_uri, class: 'col-sm-2 col-form-label' + .col-sm-2.col-form-label + = f.label :redirect_uri .col-sm-10 = f.text_area :redirect_uri, class: 'form-control' = doorkeeper_errors_for application, :redirect_uri @@ -21,14 +23,16 @@ for local tests = content_tag :div, class: 'form-group row' do - = f.label :trusted, class: 'col-sm-2 col-form-label pt-0' + .col-sm-2.col-form-label.pt-0 + = f.label :trusted .col-sm-10 = f.check_box :trusted %span.form-text.text-muted Trusted applications are automatically authorized on GitLab OAuth flow. .form-group.row - = f.label :scopes, class: 'col-sm-2 col-form-label pt-0' + .col-sm-2.col-form-label.pt-0 + = f.label :scopes .col-sm-10 = render 'shared/tokens/scopes_form', prefix: 'doorkeeper_application', token: application, scopes: @scopes diff --git a/app/views/admin/broadcast_messages/_form.html.haml b/app/views/admin/broadcast_messages/_form.html.haml index 46beca0465e..c8ee87c6212 100644 --- a/app/views/admin/broadcast_messages/_form.html.haml +++ b/app/views/admin/broadcast_messages/_form.html.haml @@ -10,7 +10,8 @@ = form_errors(@broadcast_message) .form-group.row - = f.label :message, class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :message .col-sm-10 = f.text_area :message, class: "form-control js-autosize", required: true, @@ -20,19 +21,23 @@ .col-sm-10.offset-sm-2 = link_to 'Customize colors', '#', class: 'js-toggle-colors-link' .form-group.row.js-toggle-colors-container.toggle-colors.hide - = f.label :color, "Background Color", class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :color, "Background Color" .col-sm-10 = f.color_field :color, class: "form-control" .form-group.row.js-toggle-colors-container.toggle-colors.hide - = f.label :font, "Font Color", class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :font, "Font Color" .col-sm-10 = f.color_field :font, class: "form-control" .form-group.row - = f.label :starts_at, _("Starts at (UTC)"), class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :starts_at, _("Starts at (UTC)") .col-sm-10.datetime-controls = f.datetime_select :starts_at, {}, class: 'form-control form-control-inline' .form-group.row - = f.label :ends_at, _("Ends at (UTC)"), class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :ends_at, _("Ends at (UTC)") .col-sm-10.datetime-controls = f.datetime_select :ends_at, {}, class: 'form-control form-control-inline' .form-actions diff --git a/app/views/admin/broadcast_messages/index.html.haml b/app/views/admin/broadcast_messages/index.html.haml index 9ef58faf8cc..eb4dfdf2858 100644 --- a/app/views/admin/broadcast_messages/index.html.haml +++ b/app/views/admin/broadcast_messages/index.html.haml @@ -32,7 +32,7 @@ %td = message.ends_at %td - = link_to icon('pencil-square-o'), edit_admin_broadcast_message_path(message), title: 'Edit', class: 'btn btn-sm' - = link_to icon('times'), admin_broadcast_message_path(message), method: :delete, remote: true, title: 'Remove', class: 'js-remove-tr btn btn-sm btn-danger' + = link_to sprite_icon('pencil-square'), edit_admin_broadcast_message_path(message), title: 'Edit', class: 'btn' + = link_to sprite_icon('remove'), admin_broadcast_message_path(message), method: :delete, remote: true, title: 'Remove', class: 'js-remove-tr btn btn-danger' = paginate @broadcast_messages, theme: 'gitlab' diff --git a/app/views/admin/groups/_form.html.haml b/app/views/admin/groups/_form.html.haml index 8fb38f6a690..dd01ef8a29f 100644 --- a/app/views/admin/groups/_form.html.haml +++ b/app/views/admin/groups/_form.html.haml @@ -2,11 +2,12 @@ = form_errors(@group) = render 'shared/group_form', f: f - = render_if_exists 'shared/repository_size_limit_setting', form: f, type: :group + = render_if_exists 'shared/old_repository_size_limit_setting', form: f, type: :group = render_if_exists 'admin/namespace_plan', f: f .form-group.row.group-description-holder - = f.label :avatar, _("Group avatar"), class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :avatar, _("Group avatar") .col-sm-10 = render 'shared/choose_avatar_button', f: f diff --git a/app/views/admin/health_check/show.html.haml b/app/views/admin/health_check/show.html.haml index 0f5e97e288a..ac56e354a4d 100644 --- a/app/views/admin/health_check/show.html.haml +++ b/app/views/admin/health_check/show.html.haml @@ -23,7 +23,7 @@ %code= liveness_url(token: Gitlab::CurrentSettings.health_check_access_token) %li %code= metrics_url(token: Gitlab::CurrentSettings.health_check_access_token) - + = render_if_exists 'admin/health_check/health_check_url' %hr .card .card-header diff --git a/app/views/admin/identities/_form.html.haml b/app/views/admin/identities/_form.html.haml index 3ab7990d9e2..40a7014e143 100644 --- a/app/views/admin/identities/_form.html.haml +++ b/app/views/admin/identities/_form.html.haml @@ -2,12 +2,14 @@ = form_errors(@identity) .form-group.row - = f.label :provider, class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :provider .col-sm-10 - values = Gitlab::Auth::OAuth::Provider.providers.map { |name| ["#{Gitlab::Auth::OAuth::Provider.label_for(name)} (#{name})", name] } = f.select :provider, values, { allow_blank: false }, class: 'form-control' .form-group.row - = f.label :extern_uid, _("Identifier"), class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :extern_uid, _("Identifier") .col-sm-10 = f.text_field :extern_uid, class: 'form-control', required: true diff --git a/app/views/admin/labels/_form.html.haml b/app/views/admin/labels/_form.html.haml index 5e7b4817461..299d0a12e6c 100644 --- a/app/views/admin/labels/_form.html.haml +++ b/app/views/admin/labels/_form.html.haml @@ -2,15 +2,18 @@ = form_errors(@label) .form-group.row - = f.label :title, class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :title .col-sm-10 = f.text_field :title, class: "form-control", required: true .form-group.row - = f.label :description, class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :description .col-sm-10 = f.text_field :description, class: "form-control js-quick-submit" .form-group.row - = f.label :color, _("Background color"), class: 'col-form-label col-sm-2' + .col-sm-2.col-form-label + = f.label :color, _("Background color") .col-sm-10 .input-group .input-group-prepend @@ -21,10 +24,7 @@ %br = _("Or you can choose one of the suggested colors below") - .suggest-colors - - suggested_colors.each do |color| - = link_to '#', style: "background-color: #{color}", data: { color: color } do - + = render_suggested_colors .form-actions = f.submit _('Save'), class: 'btn btn-success js-save-button' diff --git a/app/views/admin/projects/_projects.html.haml b/app/views/admin/projects/_projects.html.haml index 5bc695aa7b5..2f7ad35eb3e 100644 --- a/app/views/admin/projects/_projects.html.haml +++ b/app/views/admin/projects/_projects.html.haml @@ -7,17 +7,17 @@ = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn" %button.delete-project-button.btn.btn-danger{ data: { toggle: 'modal', target: '#delete-project-modal', - delete_project_url: project_path(project), + delete_project_url: admin_project_path(project), project_name: project.name }, type: 'button' } = s_('AdminProjects|Delete') .stats %span.badge.badge-pill - = storage_counter(project.statistics.storage_size) + = storage_counter(project.statistics&.storage_size) - if project.archived %span.badge.badge-warning archived .title - = link_to(admin_namespace_project_path(project.namespace, project)) do + = link_to(admin_project_path(project)) do .dash-project-avatar .avatar-container.rect-avatar.s40 = project_icon(project, alt: '', class: 'avatar project-avatar s40', width: 40, height: 40) diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index f016a157daf..e23accc1ea9 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -74,10 +74,10 @@ %li %span.light= _('Storage:') - %strong= storage_counter(@project.statistics.storage_size) - ( - = storage_counters_details(@project.statistics) - ) + %strong= storage_counter(@project.statistics&.storage_size) + - if @project.statistics + = surround '(', ')' do + = storage_counters_details(@project.statistics) %li %span.light last commit: @@ -117,7 +117,8 @@ .card-body = form_for @project, url: transfer_admin_project_path(@project), method: :put do |f| .form-group.row - = f.label :new_namespace_id, "Namespace", class: 'col-form-label col-sm-3' + .col-sm-3.col-form-label + = f.label :new_namespace_id, "Namespace" .col-sm-9 .dropdown = dropdown_toggle('Search for Namespace', { toggle: 'dropdown', field_name: 'new_namespace_id' }, { toggle_class: 'js-namespace-select large' }) diff --git a/app/views/admin/users/_access_levels.html.haml b/app/views/admin/users/_access_levels.html.haml index 12e24ddef02..77729636f9d 100644 --- a/app/views/admin/users/_access_levels.html.haml +++ b/app/views/admin/users/_access_levels.html.haml @@ -1,18 +1,20 @@ %fieldset %legend Access .form-group.row - .col-sm-2.text-right - = f.label :projects_limit, class: 'col-form-label' - .col-sm-10= f.number_field :projects_limit, min: 0, max: Gitlab::Database::MAX_INT_VALUE, class: 'form-control' + .col-sm-2.col-form-label + = f.label :projects_limit + .col-sm-10 + = f.number_field :projects_limit, min: 0, max: Gitlab::Database::MAX_INT_VALUE, class: 'form-control' .form-group.row - .col-sm-2.text-right - = f.label :can_create_group, class: 'col-form-label' - .col-sm-10= f.check_box :can_create_group + .col-sm-2.col-form-label + = f.label :can_create_group + .col-sm-10 + = f.check_box :can_create_group .form-group.row - .col-sm-2.text-right - = f.label :access_level, class: 'col-form-label' + .col-sm-2.col-form-label + = f.label :access_level .col-sm-10 - editing_current_user = (current_user == @user) @@ -22,6 +24,8 @@ %p.light Regular users have access to their groups and projects + = render_if_exists 'admin/users/auditor_access_level_radio', f: f, disabled: editing_current_user + = f.radio_button :access_level, :admin, disabled: editing_current_user = label_tag :admin, class: 'font-weight-bold' do Admin @@ -32,8 +36,8 @@ You cannot remove your own admin rights. .form-group.row - .col-sm-2.text-right - = f.label :external, class: 'col-form-label' + .col-sm-2.col-form-label + = f.label :external .hidden{ data: user_internal_regex_data } .col-sm-10 = f.check_box :external do diff --git a/app/views/admin/users/_form.html.haml b/app/views/admin/users/_form.html.haml index 296ef073144..3281718071c 100644 --- a/app/views/admin/users/_form.html.haml +++ b/app/views/admin/users/_form.html.haml @@ -5,20 +5,20 @@ %fieldset %legend Account .form-group.row - .col-sm-2.text-right - = f.label :name, class: 'col-form-label' + .col-sm-2.col-form-label + = f.label :name .col-sm-10 = f.text_field :name, required: true, autocomplete: 'off', class: 'form-control' %span.help-inline * required .form-group.row - .col-sm-2.text-right - = f.label :username, class: 'col-form-label' + .col-sm-2.col-form-label + = f.label :username .col-sm-10 = f.text_field :username, required: true, autocomplete: 'off', autocorrect: 'off', autocapitalize: 'off', spellcheck: false, class: 'form-control' %span.help-inline * required .form-group.row - .col-sm-2.text-right - = f.label :email, class: 'col-form-label' + .col-sm-2.col-form-label + = f.label :email .col-sm-10 = f.text_field :email, required: true, autocomplete: 'off', class: 'form-control' %span.help-inline * required @@ -27,8 +27,8 @@ %fieldset %legend Password .form-group.row - .col-sm-2.text-right - = f.label :password, class: 'col-form-label' + .col-sm-2.col-form-label + = f.label :password .col-sm-10 %strong Reset link will be generated and sent to the user. @@ -38,40 +38,52 @@ %fieldset %legend Password .form-group.row - .col-sm-2.text-right - = f.label :password, class: 'col-form-label' - .col-sm-10= f.password_field :password, disabled: f.object.force_random_password, class: 'form-control' + .col-sm-2.col-form-label + = f.label :password + .col-sm-10 + = f.password_field :password, disabled: f.object.force_random_password, class: 'form-control' .form-group.row - .col-sm-2.text-right - = f.label :password_confirmation, class: 'col-form-label' - .col-sm-10= f.password_field :password_confirmation, disabled: f.object.force_random_password, class: 'form-control' + .col-sm-2.col-form-label + = f.label :password_confirmation + .col-sm-10 + = f.password_field :password_confirmation, disabled: f.object.force_random_password, class: 'form-control' = render partial: 'access_levels', locals: { f: f } + = render_if_exists 'admin/users/namespace_plan_fieldset', f: f + + = render_if_exists 'admin/users/limits', f: f + %fieldset %legend Profile .form-group.row - .col-sm-2.text-right - = f.label :avatar, class: 'col-form-label' + .col-sm-2.col-form-label + = f.label :avatar .col-sm-10 = f.file_field :avatar .form-group.row - .col-sm-2.text-right - = f.label :skype, class: 'col-form-label' - .col-sm-10= f.text_field :skype, class: 'form-control' + .col-sm-2.col-form-label + = f.label :skype + .col-sm-10 + = f.text_field :skype, class: 'form-control' .form-group.row - .col-sm-2.text-right - = f.label :linkedin, class: 'col-form-label' - .col-sm-10= f.text_field :linkedin, class: 'form-control' + .col-sm-2.col-form-label + = f.label :linkedin + .col-sm-10 + = f.text_field :linkedin, class: 'form-control' .form-group.row - .col-sm-2.text-right - = f.label :twitter, class: 'col-form-label' - .col-sm-10= f.text_field :twitter, class: 'form-control' + .col-sm-2.col-form-label + = f.label :twitter + .col-sm-10 + = f.text_field :twitter, class: 'form-control' .form-group.row - .col-sm-2.text-right - = f.label :website_url, 'Website', class: 'col-form-label' - .col-sm-10= f.text_field :website_url, class: 'form-control' + .col-sm-2.col-form-label + = f.label :website_url + .col-sm-10 + = f.text_field :website_url, class: 'form-control' + + = render_if_exists 'admin/users/admin_notes', f: f .form-actions - if @user.new_record? diff --git a/app/views/admin/users/_head.html.haml b/app/views/admin/users/_head.html.haml index a733f420d11..e7dde7985fd 100644 --- a/app/views/admin/users/_head.html.haml +++ b/app/views/admin/users/_head.html.haml @@ -6,6 +6,7 @@ %span.cred (Internal) - if @user.admin %span.cred (Admin) + = render_if_exists 'admin/users/audtior_user_badge' .float-right - if impersonation_enabled? && @user != current_user && @user.can?(:log_in) diff --git a/app/views/admin/users/show.html.haml b/app/views/admin/users/show.html.haml index c4178296e67..dcd6f7c8078 100644 --- a/app/views/admin/users/show.html.haml +++ b/app/views/admin/users/show.html.haml @@ -124,6 +124,8 @@ %strong = Gitlab::Access.human_access_with_none(@user.highest_role) + = render_if_exists 'admin/users/using_license_seat', user: @user + - if @user.ldap_user? %li %span.light LDAP uid: |