提交 1d5ae049 编写于 作者: G GitLab Bot

Add latest changes from gitlab-org/gitlab@master

上级 374cf04c
......@@ -225,6 +225,7 @@ Gitlab/Json:
- 'scripts/**/*'
- 'lib/rspec_flaky/**/*'
- 'lib/quality/**/*'
- 'lib/gitlab/danger/**/*'
GitlabSecurity/PublicSend:
Enabled: true
......
......@@ -26,7 +26,6 @@ const bodyTrClass =
'gl-border-1 gl-border-t-solid gl-border-gray-100 hover-bg-blue-50 hover-gl-cursor-pointer hover-gl-border-b-solid hover-gl-border-blue-200';
export default {
bodyTrClass,
i18n: {
noAlertsMsg: s__(
"AlertManagement|No alerts available to display. If you think you're seeing this message in error, refresh the page.",
......@@ -132,7 +131,6 @@ export default {
},
data() {
return {
alerts: null,
errored: false,
isAlertDismissed: false,
isErrorAlertDismissed: false,
......@@ -149,6 +147,12 @@ export default {
loading() {
return this.$apollo.queries.alerts.loading;
},
hasAlerts() {
return this.alerts?.length;
},
tbodyTrClass() {
return !this.loading && this.hasAlerts ? bodyTrClass : '';
},
},
methods: {
filterAlertsByStatus(tabIndex) {
......@@ -210,7 +214,7 @@ export default {
:show-empty="true"
:busy="loading"
stacked="md"
:tbody-tr-class="$options.bodyTrClass"
:tbody-tr-class="tbodyTrClass"
@row-clicked="navigateToAlertDetails"
>
<template #cell(severity)="{ item }">
......
......@@ -3,7 +3,7 @@
module Clusters
module Applications
class Runner < ApplicationRecord
VERSION = '0.16.1'
VERSION = '0.17.0'
self.table_name = 'clusters_applications_runners'
......
---
title: Fix loading and empty state styling for alerts list
merge_request: 32531
author:
type: fixed
---
title: Update GitLab Runner Helm Chart to 0.17.0
merge_request: 32634
author:
type: other
# frozen_string_literal: true
class CreateTestReports < ActiveRecord::Migration[6.0]
DOWNTIME = false
def change
create_table :requirements_management_test_reports do |t|
t.datetime_with_timezone :created_at, null: false
t.references :requirement, null: false, foreign_key: { on_delete: :cascade }
t.bigint :pipeline_id
t.bigint :author_id
t.integer :state, null: false, limit: 2
t.index :pipeline_id
t.index :author_id
end
end
end
# frozen_string_literal: true
class AddAuthorForeignKeyToTestReports < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
with_lock_retries do
add_foreign_key :requirements_management_test_reports, :users, column: :author_id, on_delete: :nullify # rubocop:disable Migration/AddConcurrentForeignKey
end
end
def down
with_lock_retries do
remove_foreign_key :requirements_management_test_reports, column: :author_id
end
end
end
# frozen_string_literal: true
class AddPipelineForeignKeyToTestReports < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
with_lock_retries do
add_foreign_key :requirements_management_test_reports, :ci_pipelines, column: :pipeline_id, on_delete: :nullify # rubocop:disable Migration/AddConcurrentForeignKey
end
end
def down
with_lock_retries do
remove_foreign_key :requirements_management_test_reports, column: :pipeline_id
end
end
end
......@@ -5773,6 +5773,24 @@ CREATE SEQUENCE public.requirements_id_seq
ALTER SEQUENCE public.requirements_id_seq OWNED BY public.requirements.id;
CREATE TABLE public.requirements_management_test_reports (
id bigint NOT NULL,
created_at timestamp with time zone NOT NULL,
requirement_id bigint NOT NULL,
pipeline_id bigint,
author_id bigint,
state smallint NOT NULL
);
CREATE SEQUENCE public.requirements_management_test_reports_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER SEQUENCE public.requirements_management_test_reports_id_seq OWNED BY public.requirements_management_test_reports.id;
CREATE TABLE public.resource_label_events (
id bigint NOT NULL,
action integer NOT NULL,
......@@ -7777,6 +7795,8 @@ ALTER TABLE ONLY public.remote_mirrors ALTER COLUMN id SET DEFAULT nextval('publ
ALTER TABLE ONLY public.requirements ALTER COLUMN id SET DEFAULT nextval('public.requirements_id_seq'::regclass);
ALTER TABLE ONLY public.requirements_management_test_reports ALTER COLUMN id SET DEFAULT nextval('public.requirements_management_test_reports_id_seq'::regclass);
ALTER TABLE ONLY public.resource_label_events ALTER COLUMN id SET DEFAULT nextval('public.resource_label_events_id_seq'::regclass);
ALTER TABLE ONLY public.resource_milestone_events ALTER COLUMN id SET DEFAULT nextval('public.resource_milestone_events_id_seq'::regclass);
......@@ -8709,6 +8729,9 @@ ALTER TABLE ONLY public.releases
ALTER TABLE ONLY public.remote_mirrors
ADD CONSTRAINT remote_mirrors_pkey PRIMARY KEY (id);
ALTER TABLE ONLY public.requirements_management_test_reports
ADD CONSTRAINT requirements_management_test_reports_pkey PRIMARY KEY (id);
ALTER TABLE ONLY public.requirements
ADD CONSTRAINT requirements_pkey PRIMARY KEY (id);
......@@ -10506,6 +10529,12 @@ CREATE INDEX index_remote_mirrors_on_project_id ON public.remote_mirrors USING b
CREATE UNIQUE INDEX index_repository_languages_on_project_and_languages_id ON public.repository_languages USING btree (project_id, programming_language_id);
CREATE INDEX index_requirements_management_test_reports_on_author_id ON public.requirements_management_test_reports USING btree (author_id);
CREATE INDEX index_requirements_management_test_reports_on_pipeline_id ON public.requirements_management_test_reports USING btree (pipeline_id);
CREATE INDEX index_requirements_management_test_reports_on_requirement_id ON public.requirements_management_test_reports USING btree (requirement_id);
CREATE INDEX index_requirements_on_author_id ON public.requirements USING btree (author_id);
CREATE INDEX index_requirements_on_created_at ON public.requirements USING btree (created_at);
......@@ -11731,6 +11760,9 @@ ALTER TABLE ONLY public.service_desk_settings
ALTER TABLE ONLY public.group_custom_attributes
ADD CONSTRAINT fk_rails_246e0db83a FOREIGN KEY (group_id) REFERENCES public.namespaces(id) ON DELETE CASCADE;
ALTER TABLE ONLY public.requirements_management_test_reports
ADD CONSTRAINT fk_rails_24cecc1e68 FOREIGN KEY (pipeline_id) REFERENCES public.ci_pipelines(id) ON DELETE SET NULL;
ALTER TABLE ONLY public.group_wiki_repositories
ADD CONSTRAINT fk_rails_26f867598c FOREIGN KEY (group_id) REFERENCES public.namespaces(id) ON DELETE CASCADE;
......@@ -12472,6 +12504,9 @@ ALTER TABLE ONLY public.subscriptions
ALTER TABLE ONLY public.operations_strategies
ADD CONSTRAINT fk_rails_d183b6e6dd FOREIGN KEY (feature_flag_id) REFERENCES public.operations_feature_flags(id) ON DELETE CASCADE;
ALTER TABLE ONLY public.requirements_management_test_reports
ADD CONSTRAINT fk_rails_d1e8b498bf FOREIGN KEY (author_id) REFERENCES public.users(id) ON DELETE SET NULL;
ALTER TABLE ONLY public.pool_repositories
ADD CONSTRAINT fk_rails_d2711daad4 FOREIGN KEY (source_project_id) REFERENCES public.projects(id) ON DELETE SET NULL;
......@@ -12616,6 +12651,9 @@ ALTER TABLE ONLY public.merge_trains
ALTER TABLE ONLY public.ci_runner_namespaces
ADD CONSTRAINT fk_rails_f9d9ed3308 FOREIGN KEY (namespace_id) REFERENCES public.namespaces(id) ON DELETE CASCADE;
ALTER TABLE ONLY public.requirements_management_test_reports
ADD CONSTRAINT fk_rails_fb3308ad55 FOREIGN KEY (requirement_id) REFERENCES public.requirements(id) ON DELETE CASCADE;
ALTER TABLE ONLY public.board_project_recent_visits
ADD CONSTRAINT fk_rails_fb6fc419cb FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;
......@@ -13856,6 +13894,9 @@ COPY "schema_migrations" (version) FROM STDIN;
20200511145545
20200511162057
20200511162115
20200511181027
20200511191027
20200511208012
20200511220023
20200512085150
20200512164334
......
# frozen_string_literal: true
require_relative '../json'
require 'json'
module Gitlab
module Danger
......@@ -25,8 +25,8 @@ module Gitlab
)}x.freeze
def initialize
names = Gitlab::Json.parse(File.read(DIGESTS)).keys +
Gitlab::Json.parse(File.read(ALIASES)).keys
names = JSON.parse(File.read(DIGESTS)).keys +
JSON.parse(File.read(ALIASES)).keys
@emoji = names.map { |name| ":#{name}:" }
end
......
......@@ -16,7 +16,7 @@ module Gitlab
raise HTTPError, "Failed to read #{url}: #{rsp.code} #{rsp.message}"
end
Gitlab::Json.parse(rsp.body)
JSON.parse(rsp.body)
end
end
end
......
......@@ -142,6 +142,11 @@ describe('AlertManagementList', () => {
});
expect(findAlertsTable().exists()).toBe(true);
expect(findLoader().exists()).toBe(true);
expect(
findAlerts()
.at(0)
.classes(),
).not.toContain('hover-bg-blue-50');
});
it('error state', () => {
......@@ -154,6 +159,11 @@ describe('AlertManagementList', () => {
expect(findAlertsTable().text()).toContain('No alerts to display');
expect(findLoader().exists()).toBe(false);
expect(findAlert().props().variant).toBe('danger');
expect(
findAlerts()
.at(0)
.classes(),
).not.toContain('hover-bg-blue-50');
});
it('empty state', () => {
......@@ -166,6 +176,11 @@ describe('AlertManagementList', () => {
expect(findAlertsTable().text()).toContain('No alerts to display');
expect(findLoader().exists()).toBe(false);
expect(findAlert().props().variant).toBe('info');
expect(
findAlerts()
.at(0)
.classes(),
).not.toContain('hover-bg-blue-50');
});
it('has data state', () => {
......@@ -177,6 +192,11 @@ describe('AlertManagementList', () => {
expect(findLoader().exists()).toBe(false);
expect(findAlertsTable().exists()).toBe(true);
expect(findAlerts()).toHaveLength(mockAlerts.length);
expect(
findAlerts()
.at(0)
.classes(),
).toContain('hover-bg-blue-50');
});
it('displays status dropdown', () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册