diff options
15 files changed, 85 insertions, 20 deletions
diff --git a/app/assets/javascripts/jobs/components/job_container_item.vue b/app/assets/javascripts/jobs/components/job_container_item.vue index 01615e2b5d5..c08ac0317b8 100644 --- a/app/assets/javascripts/jobs/components/job_container_item.vue +++ b/app/assets/javascripts/jobs/components/job_container_item.vue @@ -35,33 +35,40 @@ export default { return text; }, + jobName() { + return this.job.name ? this.job.name : this.job.id; + }, + classes() { + return { + retried: this.job.retried, + 'gl-font-weight-bold': this.isActive, + }; + }, + dataTestId() { + return this.isActive ? 'active-job' : null; + }, }, }; </script> <template> - <div - class="build-job gl-relative" - :class="{ - retried: job.retried, - active: isActive, - }" - > + <div class="build-job gl-relative" :class="classes"> <gl-link v-gl-tooltip:tooltip-container.left :href="job.status.details_path" :title="tooltipText" - class="js-job-link gl-display-flex gl-align-items-center" + class="gl-display-flex gl-align-items-center" + :data-testid="dataTestId" > <gl-icon v-if="isActive" name="arrow-right" - class="js-arrow-right icon-arrow-right gl-absolute gl-display-block" + class="icon-arrow-right gl-absolute gl-display-block" /> <ci-icon :status="job.status" /> - <span class="text-truncate w-100">{{ job.name ? job.name : job.id }}</span> + <span class="gl-text-truncate gl-w-full">{{ jobName }}</span> <gl-icon v-if="job.retried" name="retry" /> </gl-link> diff --git a/app/assets/stylesheets/page_bundles/build.scss b/app/assets/stylesheets/page_bundles/build.scss index 40d82456c08..ec41909beec 100644 --- a/app/assets/stylesheets/page_bundles/build.scss +++ b/app/assets/stylesheets/page_bundles/build.scss @@ -198,10 +198,6 @@ } .build-job { - &.active { - font-weight: $gl-font-weight-bold; - } - &.retried { background-color: var(--gray-10, $gray-10); } diff --git a/changelogs/unreleased/267489-finding-evidence-details-response-body.yml b/changelogs/unreleased/267489-finding-evidence-details-response-body.yml new file mode 100644 index 00000000000..451d723f231 --- /dev/null +++ b/changelogs/unreleased/267489-finding-evidence-details-response-body.yml @@ -0,0 +1,5 @@ +--- +title: Add body to finding evidence responses +merge_request: 61631 +author: +type: changed diff --git a/changelogs/unreleased/330274-add-a-boolean-column-for-tracking-mr-draft-status.yml b/changelogs/unreleased/330274-add-a-boolean-column-for-tracking-mr-draft-status.yml new file mode 100644 index 00000000000..c7caef21771 --- /dev/null +++ b/changelogs/unreleased/330274-add-a-boolean-column-for-tracking-mr-draft-status.yml @@ -0,0 +1,5 @@ +--- +title: Add draft column to merge_requests table +merge_request: 61681 +author: +type: other diff --git a/db/migrate/20210512183309_add_body_to_findings_evidences_response.rb b/db/migrate/20210512183309_add_body_to_findings_evidences_response.rb new file mode 100644 index 00000000000..6884d339b9c --- /dev/null +++ b/db/migrate/20210512183309_add_body_to_findings_evidences_response.rb @@ -0,0 +1,10 @@ +# frozen_string_literal: true + +class AddBodyToFindingsEvidencesResponse < ActiveRecord::Migration[6.0] + # rubocop:disable Migration/AddLimitToTextColumns + # limit is added in 20210512183310_add_limit_to_findings_evidences_response_body.rb + def change + add_column :vulnerability_finding_evidence_responses, :body, :text + end + # rubocop:enable Migration/AddLimitToTextColumns +end diff --git a/db/migrate/20210512183310_add_limit_to_findings_evidences_response_body.rb b/db/migrate/20210512183310_add_limit_to_findings_evidences_response_body.rb new file mode 100644 index 00000000000..bdd15163809 --- /dev/null +++ b/db/migrate/20210512183310_add_limit_to_findings_evidences_response_body.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddLimitToFindingsEvidencesResponseBody < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_text_limit :vulnerability_finding_evidence_responses, :body, 2048 + end + + def down + remove_text_limit :vulnerability_finding_evidence_responses, :body + end +end diff --git a/db/migrate/20210513093418_add_draft_column_to_merge_requests.rb b/db/migrate/20210513093418_add_draft_column_to_merge_requests.rb new file mode 100644 index 00000000000..67e2cc0eea0 --- /dev/null +++ b/db/migrate/20210513093418_add_draft_column_to_merge_requests.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddDraftColumnToMergeRequests < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + def up + with_lock_retries do + add_column :merge_requests, :draft, :boolean, default: false, null: false + end + end + + def down + with_lock_retries do + remove_column :merge_requests, :draft + end + end +end diff --git a/db/schema_migrations/20210512183309 b/db/schema_migrations/20210512183309 new file mode 100644 index 00000000000..efdceb8aed5 --- /dev/null +++ b/db/schema_migrations/20210512183309 @@ -0,0 +1 @@ +490dd9a1fe59fb1454f938763f9b8bce7a0567569ad5f7b8e29b196551d869e1
\ No newline at end of file diff --git a/db/schema_migrations/20210512183310 b/db/schema_migrations/20210512183310 new file mode 100644 index 00000000000..7f14b53caf0 --- /dev/null +++ b/db/schema_migrations/20210512183310 @@ -0,0 +1 @@ +d1e389755e4f5ed0075b07c5680eee5ae3557550071d14360ad3030e4c2d3ac1
\ No newline at end of file diff --git a/db/schema_migrations/20210513093418 b/db/schema_migrations/20210513093418 new file mode 100644 index 00000000000..770d0f1ebdc --- /dev/null +++ b/db/schema_migrations/20210513093418 @@ -0,0 +1 @@ +f2c85121d217aa953b6ae52e32624cf4164b1f1408bcbe8ae3facafc15b037ce
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index f3e3840085b..6ebfbf4409a 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -14731,6 +14731,7 @@ CREATE TABLE merge_requests ( squash_commit_sha bytea, sprint_id bigint, merge_ref_sha bytea, + draft boolean DEFAULT false NOT NULL, CONSTRAINT check_970d272570 CHECK ((lock_version IS NOT NULL)) ); @@ -18860,7 +18861,9 @@ CREATE TABLE vulnerability_finding_evidence_responses ( vulnerability_finding_evidence_id bigint NOT NULL, status_code integer, reason_phrase text, - CONSTRAINT check_58b124ab48 CHECK ((char_length(reason_phrase) <= 2048)) + body text, + CONSTRAINT check_58b124ab48 CHECK ((char_length(reason_phrase) <= 2048)), + CONSTRAINT check_76bac0c32b CHECK ((char_length(body) <= 2048)) ); CREATE SEQUENCE vulnerability_finding_evidence_responses_id_seq diff --git a/doc/user/application_security/threat_monitoring/index.md b/doc/user/application_security/threat_monitoring/index.md index f642df3ce93..8e9125669db 100644 --- a/doc/user/application_security/threat_monitoring/index.md +++ b/doc/user/application_security/threat_monitoring/index.md @@ -227,7 +227,8 @@ By default, the list doesn't display resolved or dismissed alerts. ![Policy Alert List](img/threat_monitoring_policy_alert_list_v13_12.png) -Clicking an alert's row will open the alert drawer that shows more details and allows a user to create an incident from the alert. +Clicking an alert's row opens the alert drawer, which shows more information about the alert. A user +can also create an incident from the alert in the alert drawer. Clicking an alert's name takes the user to the [alert details page](../../../operations/incident_management/alerts.md#alert-details-page). diff --git a/doc/user/permissions.md b/doc/user/permissions.md index 515a99e419a..245efc0e908 100644 --- a/doc/user/permissions.md +++ b/doc/user/permissions.md @@ -427,8 +427,8 @@ with the permissions described on the documentation on [auditor users permission >[Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/40942) in [GitLab Premium](https://about.gitlab.com/pricing/) 13.4. -Administrators can add members with a "minimal access" role to a parent group. Such users don't -automatically have access to projects and subgroups underneath. To support such access, administrators must explicitly add these "minimal access" users to the specific subgroups/projects. +Owners can add members with a "minimal access" role to a parent group. Such users don't +automatically have access to projects and subgroups underneath. To support such access, owners must explicitly add these "minimal access" users to the specific subgroups/projects. Users with minimal access can list the group in the UI and through the API. However, they cannot see details such as projects or subgroups. They do not have access to the group's page or list any of its subgroups or projects. diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb index 18a6ad12240..a1416f3f563 100644 --- a/spec/features/projects/jobs_spec.rb +++ b/spec/features/projects/jobs_spec.rb @@ -136,7 +136,7 @@ RSpec.describe 'Jobs', :clean_gitlab_redis_shared_state do visit project_job_path(project, job) wait_for_requests - expect(page).to have_selector('.build-job.active') + expect(page).to have_selector('[data-testid="active-job"]') end end @@ -255,7 +255,7 @@ RSpec.describe 'Jobs', :clean_gitlab_redis_shared_state do end it 'renders escaped tooltip name' do - page.find('.active.build-job a').hover + page.find('[data-testid="active-job"]').hover expect(page).to have_content('<img src=x onerror=alert(document.domain)> - passed') end end diff --git a/spec/lib/gitlab/import_export/safe_model_attributes.yml b/spec/lib/gitlab/import_export/safe_model_attributes.yml index 825aa30e594..0be1b09851f 100644 --- a/spec/lib/gitlab/import_export/safe_model_attributes.yml +++ b/spec/lib/gitlab/import_export/safe_model_attributes.yml @@ -208,6 +208,7 @@ MergeRequest: - discussion_locked - allow_maintainer_to_push - merge_ref_sha +- draft MergeRequestDiff: - id - state |