diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/images/ci_favicons/canary/favicon_status_preparing.ico | bin | 0 -> 34494 bytes | |||
-rwxr-xr-x | app/assets/images/ci_favicons/favicon_status_preparing.png | bin | 0 -> 11341 bytes | |||
-rw-r--r-- | app/assets/stylesheets/framework/icons.scss | 11 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/lists.scss | 2 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/status.scss | 5 | ||||
-rw-r--r-- | app/controllers/admin/application_settings_controller.rb | 11 | ||||
-rw-r--r-- | app/controllers/concerns/cycle_analytics_params.rb | 25 | ||||
-rw-r--r-- | app/controllers/projects/cycle_analytics/events_controller.rb | 10 | ||||
-rw-r--r-- | app/controllers/projects/cycle_analytics_controller.rb | 8 | ||||
-rw-r--r-- | app/helpers/ci_status_helper.rb | 2 | ||||
-rw-r--r-- | app/models/cycle_analytics/project_level.rb | 1 | ||||
-rw-r--r-- | app/views/projects/registry/repositories/index.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/tags/_tag.html.haml | 12 |
13 files changed, 64 insertions, 25 deletions
diff --git a/app/assets/images/ci_favicons/canary/favicon_status_preparing.ico b/app/assets/images/ci_favicons/canary/favicon_status_preparing.ico Binary files differnew file mode 100644 index 00000000000..6cdf3ae2e36 --- /dev/null +++ b/app/assets/images/ci_favicons/canary/favicon_status_preparing.ico diff --git a/app/assets/images/ci_favicons/favicon_status_preparing.png b/app/assets/images/ci_favicons/favicon_status_preparing.png Binary files differnew file mode 100755 index 00000000000..f81baa0ece3 --- /dev/null +++ b/app/assets/images/ci_favicons/favicon_status_preparing.png diff --git a/app/assets/stylesheets/framework/icons.scss b/app/assets/stylesheets/framework/icons.scss index 7332c4981d2..a53f5d85949 100644 --- a/app/assets/stylesheets/framework/icons.scss +++ b/app/assets/stylesheets/framework/icons.scss @@ -31,7 +31,16 @@ } } -.ci-status-icon-preparing, +.ci-status-icon-preparing { + svg { + fill: $gray-500; + } + + &.add-border { + @include borderless-status-icon($gray-500); + } +} + .ci-status-icon-running { svg { fill: $blue-400; diff --git a/app/assets/stylesheets/framework/lists.scss b/app/assets/stylesheets/framework/lists.scss index ecd32dcd0ce..c73db2668ec 100644 --- a/app/assets/stylesheets/framework/lists.scss +++ b/app/assets/stylesheets/framework/lists.scss @@ -123,7 +123,7 @@ ul.content-list { font-weight: $gl-font-weight-bold; } - a { + a:not(.default-link-color) { color: $gl-text-color; } diff --git a/app/assets/stylesheets/pages/status.scss b/app/assets/stylesheets/pages/status.scss index 613f643af3a..5d6a4b7cd13 100644 --- a/app/assets/stylesheets/pages/status.scss +++ b/app/assets/stylesheets/pages/status.scss @@ -37,6 +37,10 @@ } } + &.ci-preparing { + @include status-color($gray-100, $gray-500, $gray-600); + } + &.ci-pending, &.ci-failed-with-warnings, &.ci-success-with-warnings { @@ -44,7 +48,6 @@ } &.ci-info, - &.ci-preparing, &.ci-running { @include status-color($blue-100, $blue-500, $blue-600); } diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb index fbf63997b15..f7e33c09928 100644 --- a/app/controllers/admin/application_settings_controller.rb +++ b/app/controllers/admin/application_settings_controller.rb @@ -6,9 +6,9 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController before_action :set_application_setting before_action :whitelist_query_limiting, only: [:usage_data] - VALID_SETTING_PANELS = %w(general integrations repository templates + VALID_SETTING_PANELS = %w(general integrations repository ci_cd reporting metrics_and_profiling - network geo preferences).freeze + network preferences).freeze VALID_SETTING_PANELS.each do |action| define_method(action) { perform_update if submitted? } @@ -145,10 +145,15 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController end def render_update_error - action = VALID_SETTING_PANELS.include?(action_name) ? action_name : :general + action = valid_setting_panels.include?(action_name) ? action_name : :general render action end + + # overridden in EE + def valid_setting_panels + VALID_SETTING_PANELS + end end Admin::ApplicationSettingsController.prepend_if_ee('EE::Admin::ApplicationSettingsController') diff --git a/app/controllers/concerns/cycle_analytics_params.rb b/app/controllers/concerns/cycle_analytics_params.rb index b970bdc544e..1645af695be 100644 --- a/app/controllers/concerns/cycle_analytics_params.rb +++ b/app/controllers/concerns/cycle_analytics_params.rb @@ -3,8 +3,20 @@ module CycleAnalyticsParams extend ActiveSupport::Concern + def cycle_analytics_project_params + return {} unless params[:cycle_analytics].present? + + params[:cycle_analytics].permit(:start_date, :created_after, :created_before, :branch_name) + end + + def cycle_analytics_group_params + return {} unless params[:cycle_analytics].present? + + params[:cycle_analytics].permit(:start_date, :created_after, :created_before, project_ids: []) + end + def options(params) - @options ||= { from: start_date(params), current_user: current_user } + @options ||= { from: start_date(params), current_user: current_user }.merge(date_range(params)) end def start_date(params) @@ -17,6 +29,17 @@ module CycleAnalyticsParams 90.days.ago end end + + def date_range(params) + {}.tap do |date_range_params| + date_range_params[:from] = to_utc_time(params[:created_after]).beginning_of_day if params[:created_after] + date_range_params[:to] = to_utc_time(params[:created_before]).end_of_day if params[:created_before] + end.compact + end + + def to_utc_time(field) + Date.parse(field).to_time.utc + end end CycleAnalyticsParams.prepend_if_ee('EE::CycleAnalyticsParams') diff --git a/app/controllers/projects/cycle_analytics/events_controller.rb b/app/controllers/projects/cycle_analytics/events_controller.rb index 926592b9681..673f53c221b 100644 --- a/app/controllers/projects/cycle_analytics/events_controller.rb +++ b/app/controllers/projects/cycle_analytics/events_controller.rb @@ -23,7 +23,7 @@ module Projects end def test - options(cycle_analytics_params)[:branch] = cycle_analytics_params[:branch_name] + options(cycle_analytics_project_params)[:branch] = cycle_analytics_project_params[:branch_name] render_events(cycle_analytics[:test].events) end @@ -50,13 +50,7 @@ module Projects end def cycle_analytics - @cycle_analytics ||= ::CycleAnalytics::ProjectLevel.new(project, options: options(cycle_analytics_params)) - end - - def cycle_analytics_params - return {} unless params[:cycle_analytics].present? - - params[:cycle_analytics].permit(:start_date, :branch_name) + @cycle_analytics ||= ::CycleAnalytics::ProjectLevel.new(project, options: options(cycle_analytics_project_params)) end end end diff --git a/app/controllers/projects/cycle_analytics_controller.rb b/app/controllers/projects/cycle_analytics_controller.rb index b9d7dbd37be..f13c75ac4cc 100644 --- a/app/controllers/projects/cycle_analytics_controller.rb +++ b/app/controllers/projects/cycle_analytics_controller.rb @@ -9,7 +9,7 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController before_action :authorize_read_cycle_analytics! def show - @cycle_analytics = ::CycleAnalytics::ProjectLevel.new(@project, options: options(cycle_analytics_params)) + @cycle_analytics = ::CycleAnalytics::ProjectLevel.new(@project, options: options(cycle_analytics_project_params)) @cycle_analytics_no_data = @cycle_analytics.no_stats? @@ -27,12 +27,6 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController private - def cycle_analytics_params - return {} unless params[:cycle_analytics].present? - - params[:cycle_analytics].permit(:start_date) - end - def cycle_analytics_json { summary: @cycle_analytics.summary, diff --git a/app/helpers/ci_status_helper.rb b/app/helpers/ci_status_helper.rb index 1f34a483071..4471d5b64b2 100644 --- a/app/helpers/ci_status_helper.rb +++ b/app/helpers/ci_status_helper.rb @@ -77,6 +77,8 @@ module CiStatusHelper 'status_failed' when 'pending' 'status_pending' + when 'preparing' + 'status_preparing' when 'running' 'status_running' when 'play' diff --git a/app/models/cycle_analytics/project_level.rb b/app/models/cycle_analytics/project_level.rb index 4aa426c58a1..591435baf34 100644 --- a/app/models/cycle_analytics/project_level.rb +++ b/app/models/cycle_analytics/project_level.rb @@ -13,6 +13,7 @@ module CycleAnalytics def summary @summary ||= ::Gitlab::CycleAnalytics::StageSummary.new(project, from: options[:from], + to: options[:to], current_user: options[:current_user]).data end diff --git a/app/views/projects/registry/repositories/index.html.haml b/app/views/projects/registry/repositories/index.html.haml index d0d06a0df7e..ddb19cb6b65 100644 --- a/app/views/projects/registry/repositories/index.html.haml +++ b/app/views/projects/registry/repositories/index.html.haml @@ -1,3 +1,5 @@ +- page_title _("Container Registry") + %section .row.registry-placeholder.prepend-bottom-10 .col-12 diff --git a/app/views/projects/tags/_tag.html.haml b/app/views/projects/tags/_tag.html.haml index b1432917f1d..3f6cd628d64 100644 --- a/app/views/projects/tags/_tag.html.haml +++ b/app/views/projects/tags/_tag.html.haml @@ -19,9 +19,15 @@ - else %p = s_("TagsPage|Can't find HEAD commit for this tag") - - if release && release.description.present? - .description.md.prepend-top-default - = markdown_field(release, :description) + + - if release + .text-secondary + = icon('rocket') + = _("Release") + = link_to release.name, project_releases_path(@project, anchor: release.tag), class: 'default-link-color' + - if release.description.present? + .description.md.prepend-top-default + = markdown_field(release, :description) .row-fixed-content.controls.flex-row = render 'projects/buttons/download', project: @project, ref: tag.name, pipeline: @tags_pipelines[tag.name] |