Skip to content
Snippets Groups Projects
Commit 8c8b94e7 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent eadb77d8
No related branches found
No related tags found
No related merge requests found
Showing
with 165 additions and 26 deletions
app/assets/images/ci_favicons/canary/favicon_status_preparing.ico

33.7 KiB

app/assets/images/ci_favicons/favicon_status_preparing.png

11.1 KiB

Loading
Loading
@@ -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;
Loading
Loading
Loading
Loading
@@ -123,7 +123,7 @@ ul.content-list {
font-weight: $gl-font-weight-bold;
}
 
a {
a:not(.default-link-color) {
color: $gl-text-color;
}
 
Loading
Loading
Loading
Loading
@@ -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 {
Loading
Loading
@@ -44,7 +48,6 @@
}
 
&.ci-info,
&.ci-preparing,
&.ci-running {
@include status-color($blue-100, $blue-500, $blue-600);
}
Loading
Loading
Loading
Loading
@@ -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? }
Loading
Loading
@@ -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')
Loading
Loading
@@ -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)
Loading
Loading
@@ -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')
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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?
 
Loading
Loading
@@ -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,
Loading
Loading
Loading
Loading
@@ -77,6 +77,8 @@ module CiStatusHelper
'status_failed'
when 'pending'
'status_pending'
when 'preparing'
'status_preparing'
when 'running'
'status_running'
when 'play'
Loading
Loading
Loading
Loading
@@ -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
 
Loading
Loading
- page_title _("Container Registry")
%section
.row.registry-placeholder.prepend-bottom-10
.col-12
Loading
Loading
Loading
Loading
@@ -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]
Loading
Loading
---
title: Add missing page title to projects/container-registry
merge_request: 18114
author:
type: changed
---
title: Add pipeline preparing status icons
merge_request: 17923
author:
type: added
Loading
Loading
@@ -491,6 +491,9 @@ Gitlab.ee do
Settings.cron_jobs['historical_data_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['historical_data_worker']['cron'] ||= '0 12 * * *'
Settings.cron_jobs['historical_data_worker']['job_class'] = 'HistoricalDataWorker'
Settings.cron_jobs['import_software_licenses_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['import_software_licenses_worker']['cron'] ||= '0 3 * * 0'
Settings.cron_jobs['import_software_licenses_worker']['job_class'] = 'ImportSoftwareLicensesWorker'
Settings.cron_jobs['ldap_group_sync_worker'] ||= Settingslogic.new({})
Settings.cron_jobs['ldap_group_sync_worker']['cron'] ||= '0 * * * *'
Settings.cron_jobs['ldap_group_sync_worker']['job_class'] = 'LdapAllGroupsSyncWorker'
Loading
Loading
Loading
Loading
@@ -114,7 +114,7 @@ namespace :admin do
put :reset_registration_token
put :reset_health_check_token
put :clear_repository_check_states
match :general, :integrations, :repository, :templates, :ci_cd, :reporting, :metrics_and_profiling, :network, :geo, :preferences, via: [:get, :patch]
match :general, :integrations, :repository, :ci_cd, :reporting, :metrics_and_profiling, :network, :preferences, via: [:get, :patch]
get :lets_encrypt_terms_of_service
end
 
Loading
Loading
# frozen_string_literal: true
class AddSpdxIdToSoftwareLicenses < ActiveRecord::Migration[5.2]
DOWNTIME = false
def up
add_column :software_licenses, :spdx_identifier, :string, limit: 255
end
def down
remove_column :software_licenses, :spdx_identifier
end
end
# frozen_string_literal: true
class AddIndexToSoftwareLicensesOnSpdxId < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :software_licenses, :spdx_identifier
end
def down
remove_concurrent_index :software_licenses, :spdx_identifier
end
end
# frozen_string_literal: true
class BackfillSoftwareLicensesSpdxIdentifiers < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
CURRENT_LICENSES = {
'AGPL-1.0' => 'AGPL-1.0',
'AGPL-3.0' => 'AGPL-3.0',
'Apache 2.0' => 'Apache-2.0',
'Artistic-2.0' => 'Artistic-2.0',
'BSD' => 'BSD-4-Clause',
'CC0 1.0 Universal' => 'CC0-1.0',
'CDDL-1.0' => 'CDDL-1.0',
'CDDL-1.1' => 'CDDL-1.1',
'EPL-1.0' => 'EPL-1.0',
'EPL-2.0' => 'EPL-2.0',
'GPLv2' => 'GPL-2.0',
'GPLv3' => 'GPL-3.0',
'ISC' => 'ISC',
'LGPL' => 'LGPL-3.0-only',
'LGPL-2.1' => 'LGPL-2.1',
'MIT' => 'MIT',
'Mozilla Public License 2.0' => 'MPL-2.0',
'MS-PL' => 'MS-PL',
'MS-RL' => 'MS-RL',
'New BSD' => 'BSD-3-Clause',
'Python Software Foundation License' => 'Python-2.0',
'ruby' => 'Ruby',
'Simplified BSD' => 'BSD-2-Clause',
'WTFPL' => 'WTFPL',
'Zlib' => 'Zlib'
}.freeze
disable_ddl_transaction!
# 25 records to be updated on GitLab.com
def up
return unless Gitlab.ee?
say "Expect #{CURRENT_LICENSES.count} updates to the software_licenses table to occur"
CURRENT_LICENSES.each do |name, spdx_identifier|
# The following cop is disabled because of https://gitlab.com/gitlab-org/gitlab/issues/33470
# For more context see https://gitlab.com/gitlab-org/gitlab/merge_requests/17004#note_226264823
# rubocop:disable Migration/UpdateColumnInBatches
update_column_in_batches(:software_licenses, :spdx_identifier, spdx_identifier) do |table, query|
query.where(table[:name].eq(name))
end
end
end
def down
return unless Gitlab.ee?
update_column_in_batches(:software_licenses, :spdx_identifier, nil)
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment