diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-13 06:10:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-13 06:10:13 +0300 |
commit | cbc45b28c02f7e610dfa478e3a2b4d4bf6f4c7a4 (patch) | |
tree | dc417daf072a896efb5def2f1ba1fff7a348b673 /app | |
parent | 3827baae078970c1027461f01df090b885370c55 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/fontawesome_custom.scss | 4 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/feature_highlight.scss | 6 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/merge_requests.scss | 5 | ||||
-rw-r--r-- | app/controllers/projects/environments_controller.rb | 12 | ||||
-rw-r--r-- | app/controllers/projects/metrics_dashboard_controller.rb | 2 | ||||
-rw-r--r-- | app/helpers/projects_helper.rb | 1 | ||||
-rw-r--r-- | app/helpers/user_callouts_helper.rb | 3 | ||||
-rw-r--r-- | app/models/note.rb | 2 | ||||
-rw-r--r-- | app/services/notes/update_service.rb | 2 | ||||
-rw-r--r-- | app/views/instance_statistics/dev_ops_score/_card.html.haml | 8 | ||||
-rw-r--r-- | app/views/layouts/nav/sidebar/_project.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/blob/viewers/_readme.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/commit/_commit_box.html.haml | 2 |
13 files changed, 18 insertions, 35 deletions
diff --git a/app/assets/stylesheets/fontawesome_custom.scss b/app/assets/stylesheets/fontawesome_custom.scss index da5fdfc3cca..9b490491ee4 100644 --- a/app/assets/stylesheets/fontawesome_custom.scss +++ b/app/assets/stylesheets/fontawesome_custom.scss @@ -151,10 +151,6 @@ content: '\f0da'; } -.fa-info-circle::before { - content: '\f05a'; -} - .fa-refresh::before { content: '\f021'; } diff --git a/app/assets/stylesheets/framework/feature_highlight.scss b/app/assets/stylesheets/framework/feature_highlight.scss index f9b167669a6..8d411747b28 100644 --- a/app/assets/stylesheets/framework/feature_highlight.scss +++ b/app/assets/stylesheets/framework/feature_highlight.scss @@ -29,12 +29,6 @@ } } -.is-showing-fly-out { - .feature-highlight { - display: none; - } -} - .feature-highlight-popover-content { display: none; diff --git a/app/assets/stylesheets/pages/merge_requests.scss b/app/assets/stylesheets/pages/merge_requests.scss index 5cf2d847405..deba3fe8fd0 100644 --- a/app/assets/stylesheets/pages/merge_requests.scss +++ b/app/assets/stylesheets/pages/merge_requests.scss @@ -760,11 +760,6 @@ $mr-widget-min-height: 69px; color: $gl-text-color; } - .fa-info-circle { - color: $orange-500; - padding-right: 5px; - } - // Shortening button height by 1px to make compare-versions // header 56px and fit into our 8px design grid button { diff --git a/app/controllers/projects/environments_controller.rb b/app/controllers/projects/environments_controller.rb index 8d498af8de9..e7818489e99 100644 --- a/app/controllers/projects/environments_controller.rb +++ b/app/controllers/projects/environments_controller.rb @@ -161,18 +161,14 @@ class Projects::EnvironmentsController < Projects::ApplicationController end def metrics_redirect - environment = project.default_environment - - if environment - redirect_to environment_metrics_path(environment) - else - render :empty_metrics - end + redirect_to project_metrics_dashboard_path(project) end def metrics respond_to do |format| - format.html + format.html do + redirect_to project_metrics_dashboard_path(project, environment: environment ) + end format.json do # Currently, this acts as a hint to load the metrics details into the cache # if they aren't there already diff --git a/app/controllers/projects/metrics_dashboard_controller.rb b/app/controllers/projects/metrics_dashboard_controller.rb index 595db86c5fe..3f045456fe4 100644 --- a/app/controllers/projects/metrics_dashboard_controller.rb +++ b/app/controllers/projects/metrics_dashboard_controller.rb @@ -22,7 +22,7 @@ module Projects if environment render 'projects/environments/metrics' else - render_404 + render 'projects/environments/empty_metrics' end end diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index 3eae744e6ec..cab7ee6bc6b 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -748,6 +748,7 @@ module ProjectsHelper gcp logs product_analytics + metrics_dashboard ] end diff --git a/app/helpers/user_callouts_helper.rb b/app/helpers/user_callouts_helper.rb index 34c8ce51df0..f1ecba6e68a 100644 --- a/app/helpers/user_callouts_helper.rb +++ b/app/helpers/user_callouts_helper.rb @@ -13,7 +13,8 @@ module UserCalloutsHelper end def show_gke_cluster_integration_callout?(project) - can?(current_user, :create_cluster, project) && + active_nav_link?(controller: sidebar_operations_paths) && + can?(current_user, :create_cluster, project) && !user_dismissed?(GKE_CLUSTER_INTEGRATION) end diff --git a/app/models/note.rb b/app/models/note.rb index ae5cb82f093..e06df816b2e 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -417,7 +417,7 @@ class Note < ApplicationRecord end def can_create_todo? - # Skip system notes, and notes on project snippet + # Skip system notes, and notes on snippets !system? && !for_snippet? end diff --git a/app/services/notes/update_service.rb b/app/services/notes/update_service.rb index 047848fd1a3..193d3080078 100644 --- a/app/services/notes/update_service.rb +++ b/app/services/notes/update_service.rb @@ -25,7 +25,7 @@ module Notes note.note = content end - unless only_commands + unless only_commands || note.for_personal_snippet? note.create_new_cross_references!(current_user) update_todos(note, old_mentioned_users) diff --git a/app/views/instance_statistics/dev_ops_score/_card.html.haml b/app/views/instance_statistics/dev_ops_score/_card.html.haml index c63bd96a175..dd6e5c0f108 100644 --- a/app/views/instance_statistics/dev_ops_score/_card.html.haml +++ b/app/views/instance_statistics/dev_ops_score/_card.html.haml @@ -18,8 +18,8 @@ = number_to_percentage(card.percentage_score, precision: 1) .board-card-buttons - if card.blog - %a{ href: card.blog } - = icon('info-circle', 'aria-hidden' => 'true') + %a.btn-svg{ href: card.blog } + = sprite_icon('information-o') - if card.docs - %a{ href: card.docs } - = icon('question-circle', 'aria-hidden' => 'true') + %a.btn-svg{ href: card.docs } + = sprite_icon('question-o') diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index bf1becd18d5..5f01e403275 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -223,8 +223,8 @@ %li.divider.fly-out-top-item - if project_nav_tab? :metrics_dashboards - = nav_link(controller: :environments, action: [:metrics, :metrics_redirect]) do - = link_to metrics_project_environments_path(@project), title: _('Metrics'), class: 'shortcuts-metrics', data: { qa_selector: 'operations_metrics_link' } do + = nav_link(controller: :metrics_dashboard, action: [:show]) do + = link_to project_metrics_dashboard_path(@project), title: _('Metrics'), class: 'shortcuts-metrics', data: { qa_selector: 'operations_metrics_link' } do %span = _('Metrics') diff --git a/app/views/projects/blob/viewers/_readme.html.haml b/app/views/projects/blob/viewers/_readme.html.haml index 6cbd26e2271..86f59146cda 100644 --- a/app/views/projects/blob/viewers/_readme.html.haml +++ b/app/views/projects/blob/viewers/_readme.html.haml @@ -1,4 +1,4 @@ -= icon('info-circle fw') += sprite_icon('information-o', css_class: 'gl-vertical-align-middle! gl-mr-2') = succeed '.' do To learn more about this project, read = link_to "the wiki", wiki_path(viewer.project.wiki) diff --git a/app/views/projects/commit/_commit_box.html.haml b/app/views/projects/commit/_commit_box.html.haml index 71cf6ca6922..29ee4a69e83 100644 --- a/app/views/projects/commit/_commit_box.html.haml +++ b/app/views/projects/commit/_commit_box.html.haml @@ -93,7 +93,7 @@ - if @merge_request .well-segment - = icon('info-circle fw') + = sprite_icon('information-o', css_class: 'gl-vertical-align-middle! gl-mr-2') - link_to_merge_request = link_to(@merge_request.to_reference, diffs_project_merge_request_path(@project, @merge_request, commit_id: @commit.id)) = _('This commit is part of merge request %{link_to_merge_request}. Comments created here will be created in the context of that merge request.').html_safe % { link_to_merge_request: link_to_merge_request } |