Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
ed32a44fcb
commit
82b4999167
|
|
@ -71,8 +71,6 @@ class EnvironmentEntity < Grape::Entity
|
|||
can?(current_user, :destroy_environment, environment)
|
||||
end
|
||||
|
||||
expose :has_opened_alert?, if: -> (*) { can_read_alert_management_alert? }, expose_nil: false, as: :has_opened_alert
|
||||
|
||||
private
|
||||
|
||||
alias_method :environment, :object
|
||||
|
|
@ -93,10 +91,6 @@ class EnvironmentEntity < Grape::Entity
|
|||
can?(current_user, :read_pod_logs, environment.project)
|
||||
end
|
||||
|
||||
def can_read_alert_management_alert?
|
||||
can?(current_user, :read_alert_management_alert, environment.project)
|
||||
end
|
||||
|
||||
def cluster_platform_kubernetes?
|
||||
deployment_platform && deployment_platform.is_a?(Clusters::Platforms::Kubernetes)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
= icon('check')
|
||||
= _('Done')
|
||||
- when 'started'
|
||||
= icon("spinner spin")
|
||||
= loading_icon
|
||||
= _('Started')
|
||||
- when 'failed'
|
||||
= _('Failed')
|
||||
|
|
|
|||
|
|
@ -15,11 +15,11 @@
|
|||
- if @incompatible_repos.any?
|
||||
= button_tag class: "btn btn-import btn-success js-import-all" do
|
||||
= _("Import all compatible projects")
|
||||
= icon("spinner spin", class: "loading-icon")
|
||||
= loading_icon(css_class: 'loading-icon')
|
||||
- else
|
||||
= button_tag class: "btn btn-import btn-success js-import-all" do
|
||||
= _("Import all projects")
|
||||
= icon("spinner spin", class: "loading-icon")
|
||||
= loading_icon(css_class: 'loading-icon')
|
||||
|
||||
.table-responsive
|
||||
%table.table.import-jobs
|
||||
|
|
@ -45,7 +45,7 @@
|
|||
%i.fa.fa-check
|
||||
= _("done")
|
||||
- when 'started'
|
||||
%i.fa.fa-spinner.fa-spin
|
||||
= loading_icon
|
||||
= _("started")
|
||||
- else
|
||||
= project.human_import_status_name
|
||||
|
|
@ -59,7 +59,7 @@
|
|||
%td.import-actions.job-status
|
||||
= button_tag class: "btn btn-import js-add-to-import" do
|
||||
= _("Import")
|
||||
= icon("spinner spin", class: "loading-icon")
|
||||
= loading_icon(css_class: 'loading-icon')
|
||||
- @incompatible_repos.each do |repo|
|
||||
%tr{ id: "repo_#{repo.id}" }
|
||||
%td
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
.save-project-loader
|
||||
.center
|
||||
%h2
|
||||
%i.loading.spinner.spinner-sm
|
||||
= loading_icon
|
||||
= import_in_progress_title
|
||||
- if !has_ci_cd_only_params? && @project.external_import?
|
||||
%p.monospace git clone --bare #{@project.safe_import_url}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
- if cookies[:hide_project_limit_message].blank? && !current_user.hide_project_limit && !current_user.can_create_project? && current_user.projects_limit > 0
|
||||
.project-limit-message.alert.alert-warning.d-none.d-sm-block
|
||||
.project-limit-message.gl-alert.gl-alert-warning.gl-display-none.gl-display-sm-block
|
||||
= _("You won't be able to create new projects because you have reached your project limit.")
|
||||
|
||||
.float-right
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Migrate '.fa-spinner' to '.spinner' for 'app/views/imports'
|
||||
merge_request: 41153
|
||||
author: Gilang Gumilar
|
||||
type: changed
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Migrate '.fa-spinner' to '.spinner' for 'app/views/projects/imports'
|
||||
merge_request: 41151
|
||||
author: Gilang Gumilar
|
||||
type: changed
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Migration to cleanup after partitioned audit_events backfill
|
||||
merge_request: 41605
|
||||
author:
|
||||
type: added
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Replace bootstrap alerts in app/views/shared/_project_limit.html.haml
|
||||
merge_request: 41335
|
||||
author: Gilang Gumilar
|
||||
type: changed
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix the tier of environment alerts feature
|
||||
merge_request: 41855
|
||||
author:
|
||||
type: fixed
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class BackfillCleanupForPartitionedAuditEvents < ActiveRecord::Migration[6.0]
|
||||
include Gitlab::Database::PartitioningMigrationHelpers
|
||||
|
||||
DOWNTIME = false
|
||||
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
finalize_backfilling_partitioned_table :audit_events
|
||||
end
|
||||
|
||||
def down
|
||||
# no op
|
||||
end
|
||||
end
|
||||
|
|
@ -0,0 +1 @@
|
|||
739a4d5374ae2be419c5a2f8c1427f85a0b76c90233918b7b43f1c166ab06cec
|
||||
|
|
@ -82,26 +82,6 @@ RSpec.describe EnvironmentEntity do
|
|||
end
|
||||
end
|
||||
|
||||
context 'with alert' do
|
||||
let!(:environment) { create(:environment, project: project) }
|
||||
let!(:prometheus_alert) { create(:prometheus_alert, project: project, environment: environment) }
|
||||
let!(:alert) { create(:alert_management_alert, :triggered, :prometheus, project: project, environment: environment, prometheus_alert: prometheus_alert) }
|
||||
|
||||
it 'exposes active alert flag' do
|
||||
project.add_maintainer(user)
|
||||
|
||||
expect(subject[:has_opened_alert]).to eq(true)
|
||||
end
|
||||
|
||||
context 'when user does not have permission to read alert' do
|
||||
it 'does not expose active alert flag' do
|
||||
project.add_reporter(user)
|
||||
|
||||
expect(subject[:has_opened_alert]).to be_nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'pod_logs' do
|
||||
context 'with reporter access' do
|
||||
before do
|
||||
|
|
|
|||
Loading…
Reference in New Issue