diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-20 09:08:32 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-20 09:08:32 +0000 |
commit | 2ee5991b42717969af93cb30d863aafab04dff8a (patch) | |
tree | c09c0b7b4d02ceb9d6ac090c1ccfb93effb8a368 /app | |
parent | 6b1ba27ef7373815ea29dc5b80eab846c8acd022 (diff) | |
download | gitlab-ce-2ee5991b42717969af93cb30d863aafab04dff8a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/vue_shared/components/markdown/suggestion_diff_row.vue | 7 | ||||
-rw-r--r-- | app/assets/stylesheets/utilities.scss | 2 | ||||
-rw-r--r-- | app/models/user.rb | 8 | ||||
-rw-r--r-- | app/views/admin/application_settings/_usage.html.haml | 4 | ||||
-rw-r--r-- | app/views/clusters/clusters/_advanced_settings.html.haml | 28 | ||||
-rw-r--r-- | app/views/instance_statistics/cohorts/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/_ping_consent.html.haml | 2 |
7 files changed, 26 insertions, 27 deletions
diff --git a/app/assets/javascripts/vue_shared/components/markdown/suggestion_diff_row.vue b/app/assets/javascripts/vue_shared/components/markdown/suggestion_diff_row.vue index 97d93eaaf3f..112bd03b49b 100644 --- a/app/assets/javascripts/vue_shared/components/markdown/suggestion_diff_row.vue +++ b/app/assets/javascripts/vue_shared/components/markdown/suggestion_diff_row.vue @@ -8,6 +8,9 @@ export default { }, }, computed: { + displayAsCell() { + return !(this.line.rich_text || this.line.text); + }, lineType() { return this.line.type; }, @@ -23,11 +26,9 @@ export default { <td class="diff-line-num new_line border-top-0 border-bottom-0" :class="lineType"> {{ line.new_line }} </td> - <td class="line_content" :class="lineType"> + <td class="line_content" :class="[{ 'd-table-cell': displayAsCell }, lineType]"> <span v-if="line.rich_text" v-html="line.rich_text"></span> <span v-else-if="line.text">{{ line.text }}</span> - <!-- TODO: replace this hack with zero-width whitespace when we have rich_text from BE --> - <span v-else>​</span> </td> </tr> </template> diff --git a/app/assets/stylesheets/utilities.scss b/app/assets/stylesheets/utilities.scss index 1517015dda0..1358b3aa6dd 100644 --- a/app/assets/stylesheets/utilities.scss +++ b/app/assets/stylesheets/utilities.scss @@ -41,6 +41,7 @@ .mh-50vh { max-height: 50vh; } .gl-w-64 { width: px-to-rem($grid-size * 8); } +.gl-h-32 { height: px-to-rem($grid-size * 4); } .gl-h-64 { height: px-to-rem($grid-size * 8); } .gl-text-purple { color: $purple; } @@ -59,4 +60,3 @@ .gl-text-red-700 { @include gl-text-red-700; } .gl-text-orange-700 { @include gl-text-orange-700; } .gl-text-green-700 { @include gl-text-green-700; } - diff --git a/app/models/user.rb b/app/models/user.rb index df54f358ffa..be9f528e1bd 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -223,19 +223,19 @@ class User < ApplicationRecord after_initialize :set_projects_limit # User's Layout preference - enum layout: [:fixed, :fluid] + enum layout: { fixed: 0, fluid: 1 } # User's Dashboard preference # Note: When adding an option, it MUST go on the end of the array. - enum dashboard: [:projects, :stars, :project_activity, :starred_project_activity, :groups, :todos, :issues, :merge_requests, :operations] + enum dashboard: { projects: 0, stars: 1, project_activity: 2, starred_project_activity: 3, groups: 4, todos: 5, issues: 6, merge_requests: 7, operations: 8 } # User's Project preference # Note: When adding an option, it MUST go on the end of the array. - enum project_view: [:readme, :activity, :files] + enum project_view: { readme: 0, activity: 1, files: 2 } # User's role # Note: When adding an option, it MUST go on the end of the array. - enum role: [:software_developer, :development_team_lead, :devops_engineer, :systems_administrator, :security_analyst, :data_analyst, :product_manager, :product_designer, :other], _suffix: true + enum role: { software_developer: 0, development_team_lead: 1, devops_engineer: 2, systems_administrator: 3, security_analyst: 4, data_analyst: 5, product_manager: 6, product_designer: 7, other: 8 }, _suffix: true delegate :path, to: :namespace, allow_nil: true, prefix: true delegate :notes_filter_for, to: :user_preference diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml index d716b52be05..b4fe1bbf028 100644 --- a/app/views/admin/application_settings/_usage.html.haml +++ b/app/views/admin/application_settings/_usage.html.haml @@ -9,7 +9,7 @@ Enable version check .form-text.text-muted GitLab will inform you if a new version is available. - = link_to 'Learn more', help_page_path("user/admin_area/settings/usage_statistics", anchor: "version-check") + = link_to 'Learn more', help_page_path('user/admin_area/settings/usage_statistics', anchor: 'version-check-core-only') about what information is shared with GitLab Inc. .form-group - can_be_configured = @application_setting.usage_ping_can_be_configured? @@ -21,7 +21,7 @@ - if can_be_configured %p.mb-2= _('To help improve GitLab and its user experience, GitLab will periodically collect usage information.') - - usage_ping_path = help_page_path('user/admin_area/settings/usage_statistics', anchor: 'usage-ping') + - usage_ping_path = help_page_path('user/admin_area/settings/usage_statistics', anchor: 'usage-ping-core-only') - usage_ping_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: usage_ping_path } %p.mb-2= s_('%{usage_ping_link_start}Learn more%{usage_ping_link_end} about what information is shared with GitLab Inc.').html_safe % { usage_ping_link_start: usage_ping_link_start, usage_ping_link_end: '</a>'.html_safe } diff --git a/app/views/clusters/clusters/_advanced_settings.html.haml b/app/views/clusters/clusters/_advanced_settings.html.haml index 77f7c478ffa..d823cd0412b 100644 --- a/app/views/clusters/clusters/_advanced_settings.html.haml +++ b/app/views/clusters/clusters/_advanced_settings.html.haml @@ -6,27 +6,25 @@ - if can?(current_user, :admin_cluster, @cluster) - unless @cluster.provided_by_user? - .append-bottom-20 - %label.append-bottom-10 + .sub-section.form-group + %h4 = @cluster.provider_label %p - provider_link = link_to(@cluster.provider_label, @cluster.provider_management_url, target: '_blank', rel: 'noopener noreferrer') = s_('ClusterIntegration|Manage your Kubernetes cluster by visiting %{provider_link}').html_safe % { provider_link: provider_link } - = form_for @cluster, url: clusterable.cluster_path(@cluster), as: :cluster, html: { class: 'cluster_management_form' } do |field| - - %h5 - = s_('ClusterIntegration|Cluster management project (alpha)') + .sub-section.form-group + = form_for @cluster, url: clusterable.cluster_path(@cluster), as: :cluster, html: { class: 'cluster_management_form' } do |field| + %h4 + = s_('ClusterIntegration|Cluster management project (alpha)') - .form-group - .form-text.text-muted - = project_select_tag('cluster[management_project_id]', class: 'hidden-filter-value', toggle_class: 'js-project-search js-project-filter js-filter-submit', dropdown_class: 'dropdown-menu-selectable dropdown-menu-project js-filter-submit', - placeholder: _('Select project'), idAttribute: 'id', data: { order_by: 'last_activity_at', idattribute: 'id', simple_filter: true, allow_clear: true, include_groups: false, include_projects_in_subgroups: true, group_id: group_id, user_id: user_id }, value: @cluster.management_project_id) - .text-muted - = s_('ClusterIntegration|A cluster management project can be used to run deployment jobs with Kubernetes <code>cluster-admin</code> privileges.').html_safe - = link_to _('More information'), help_page_path('user/clusters/management_project.md'), target: '_blank' - .form-group - = field.submit _('Save changes'), class: 'btn btn-success qa-save-domain' + %p + = project_select_tag('cluster[management_project_id]', class: 'hidden-filter-value', toggle_class: 'js-project-search js-project-filter js-filter-submit', dropdown_class: 'dropdown-menu-selectable dropdown-menu-project js-filter-submit', + placeholder: _('Select project'), idAttribute: 'id', data: { order_by: 'last_activity_at', idattribute: 'id', simple_filter: true, allow_clear: true, include_groups: false, include_projects_in_subgroups: true, group_id: group_id, user_id: user_id }, value: @cluster.management_project_id) + .text-muted + = s_('ClusterIntegration|A cluster management project can be used to run deployment jobs with Kubernetes <code>cluster-admin</code> privileges.').html_safe + = link_to _('More information'), help_page_path('user/clusters/management_project.md'), target: '_blank' + = field.submit _('Save changes'), class: 'btn btn-success' - if @cluster.managed? .sub-section.form-group diff --git a/app/views/instance_statistics/cohorts/index.html.haml b/app/views/instance_statistics/cohorts/index.html.haml index c438566cb05..5333f8b7a1f 100644 --- a/app/views/instance_statistics/cohorts/index.html.haml +++ b/app/views/instance_statistics/cohorts/index.html.haml @@ -9,6 +9,6 @@ - usage_ping_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: usage_ping_path } = s_('User Cohorts are only shown when the %{usage_ping_link_start}usage ping%{usage_ping_link_end} is enabled.').html_safe % { usage_ping_link_start: usage_ping_link_start, usage_ping_link_end: '</a>'.html_safe } - if current_user.admin? - - application_settings_path = admin_application_settings_path(anchor: 'usage-statistics') + - application_settings_path = metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings') - application_settings_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: application_settings_path } = s_('To enable it and see User Cohorts, visit %{application_settings_link_start}application settings%{application_settings_link_end}.').html_safe % { application_settings_link_start: application_settings_link_start, application_settings_link_end: '</a>'.html_safe } diff --git a/app/views/shared/_ping_consent.html.haml b/app/views/shared/_ping_consent.html.haml index f8eb2b2833b..ded9b55056a 100644 --- a/app/views/shared/_ping_consent.html.haml +++ b/app/views/shared/_ping_consent.html.haml @@ -1,6 +1,6 @@ - if session[:ask_for_usage_stats_consent] .ping-consent-message.alert.alert-warning.flex-alert - - settings_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer" class="alert-link">'.html_safe % { url: admin_application_settings_path(anchor: 'js-usage-settings') } + - settings_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer" class="alert-link">'.html_safe % { url: metrics_and_profiling_admin_application_settings_path(anchor: 'js-usage-settings') } - info_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer" class="alert-link">'.html_safe % { url: help_page_path('user/admin_area/settings/usage_statistics.md') } .alert-message = s_('To help improve GitLab, we would like to periodically collect usage information. This can be changed at any time in %{settings_link_start}Settings%{link_end}. %{info_link_start}More Information%{link_end}').html_safe % { settings_link_start: settings_link_start, info_link_start: info_link_start, link_end: '</a>'.html_safe } |