Display action buttons for the widget
What does this MR do and why?
Displays action buttons when the actionButtons
property is populated.
Screenshots or screen recordings
How to set up and validate locally
- This feature is behind a feature flag. Enable
:refactor_security_extension
to turn this feature on.
echo "Feature.enable(:refactor_security_extension)" | rails c
- Visit an MR page with Security Scanning
The easiest way to populate data for testing is using this extension https://chrome.google.com/webstore/detail/mokku-mock-api-calls-seam/llflfcikklhgamfmnjkgpdadpmdplmji?hl=en and importing mokku-mocks-22-8-2022.json this json.
Once you have enabled the extension:
- Open the developer tools
- Find Mokku tab
- Click on import
- Import the file mentioned above
Apply the following patch to force displaying a button:
diff --git a/ee/app/assets/javascripts/vue_merge_request_widget/extensions/security_reports/mr_widget_security_reports.vue b/ee/app/assets/javascripts/vue_merge_request_widget/extensions/security_reports/mr_widget_security_reports.vue
index aa5e88420080..adf2bed13b4a 100644
--- a/ee/app/assets/javascripts/vue_merge_request_widget/extensions/security_reports/mr_widget_security_reports.vue
+++ b/ee/app/assets/javascripts/vue_merge_request_widget/extensions/security_reports/mr_widget_security_reports.vue
@@ -23,6 +23,7 @@ export default {
data() {
return {
isLoading: false,
+ clickText: 'click-me',
vulnerabilities: {
collapsed: null,
extended: null,
@@ -30,6 +31,26 @@ export default {
};
},
computed: {
+ actionButtons() {
+ return [
+ {
+ text: this.clickText,
+ href: '#',
+ target: '_blank',
+ onClick: () => {
+ this.clickText = 'you-have-clicked';
+ },
+ },
+ {
+ text: `click-me-2`,
+ href: '#',
+ onClick: () => {
+ alert('hello-world');
+ },
+ },
+ ];
+ },
+
isCollapsible() {
if (!this.vulnerabilities.collapsed) {
return false;
@@ -129,6 +150,7 @@ export default {
:status-icon-name="statusIconName"
:widget-name="$options.name"
:is-collapsible="isCollapsible"
+ :action-buttons="actionButtons"
multi-polling
@is-loading="handleIsLoading"
>
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #368593 (closed)
Merge request reports
Activity
changed milestone to %15.4
assigned to @svedova
- Resolved by Jannik Lehmann
@farias-gl got some time for an initial frontend review? If this looks good, please assign
@jannik_lehmann
for the maintainer review
requested review from @farias-gl
Suggested Reviewers (beta)
The individuals below may be good candidates to participate in the review based on various factors.
You can use slash commands in comments to quickly assign
/assign_reviewer @user1
.Suggested Reviewers @kushalpandya
,@ealcantara
,@mgandres
,@jeldergl
,@shampton
If you do not believe these suggestions are useful, please apply the label Bad Suggested Reviewer. You can also provide feedback for this feature on this issue:
https://gitlab.com/gitlab-org/gitlab/-/issues/357923
.Automatically generated by Suggested Reviewers Bot - an experimental ML-based recommendation engine created by ~"group::applied ml".
- Resolved by Jannik Lehmann
1 Warning Please add a merge request subtype to this merge request. 1 Message CHANGELOG missing: If you want to create a changelog entry for GitLab FOSS, add the
Changelog
trailer to the commit message you want to add to the changelog.If you want to create a changelog entry for GitLab EE, also add the
EE: true
trailer to your commit message.If this merge request doesn't need a CHANGELOG entry, feel free to ignore this message.
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer frontend Sheldon Led ( @sheldonled
) (UTC+1, 2 hours behind@svedova
)Natalia Tepluhina ( @ntepluhina
) (UTC+2, 1 hour behind@svedova
)To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangermentioned in issue #368593 (closed)
- Resolved by Savas Vedova
@svedova - please see the following guidance and update this merge request.1 Warning Please add a subtype label to this merge request. If you have added a type label and do not feel the purpose of this merge request matches one of the subtypes labels, please resolve this discussion.
added maintenancerefactor label
Bundle size analysis [beta]
This compares changes in bundle size for entry points between the commits aef5ed10 and 38a20548
Special assetsEntrypoint / Name Size before Size after Diff Diff in percent average 3.6 MB 3.6 MB - 0.0 % mainChunk 1.98 MB 1.98 MB - 0.0 %
Note: We do not have exact data for aef5ed10. So we have used data from: 59240212.
The intended commit has no webpack pipeline, so we chose the last commit with one before it.Please look at the full report for more details
Read more about how this report works.
Generated by
DangerAllure report
allure-report-publisher
generated test report!review-qa-blocking:
test report for 7f408837expand test summary
+-----------------------------------------------------------------------------------------+ | suites summary | +------------------------------------+--------+--------+---------+-------+-------+--------+ | | passed | failed | skipped | flaky | total | result | +------------------------------------+--------+--------+---------+-------+-------+--------+ | Plan | 47 | 0 | 1 | 17 | 48 | ❗ | | Create | 28 | 0 | 1 | 5 | 29 | ❗ | | Manage | 46 | 0 | 3 | 18 | 49 | ❗ | | Package | 0 | 0 | 1 | 0 | 1 | ➖ | | Verify | 12 | 0 | 1 | 6 | 13 | ❗ | | Protect | 2 | 0 | 0 | 2 | 2 | ❗ | | Secure | 2 | 0 | 0 | 2 | 2 | ❗ | | Feature flag handler sanity checks | 9 | 0 | 0 | 0 | 9 | ✅ | | Configure | 0 | 0 | 1 | 0 | 1 | ➖ | | Version sanity check | 0 | 0 | 1 | 0 | 1 | ➖ | +------------------------------------+--------+--------+---------+-------+-------+--------+ | Total | 146 | 0 | 9 | 50 | 155 | ❗ | +------------------------------------+--------+--------+---------+-------+-------+--------+
removed [deprecated] Accepting merge requests label
requested review from @dpisek and removed review request for @farias-gl
added 159 commits
-
38a20548...b220c900 - 158 commits from branch
master
- 807a3537 - Display action buttons for the widget
-
38a20548...b220c900 - 158 commits from branch
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer frontend Thomas Randolph ( @thomasrandolph
) (UTC-6, 9 hours behind@svedova
)Natalia Tepluhina ( @ntepluhina
) (UTC+2, 1 hour behind@svedova
)To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerBundle size analysis [beta]
This compares changes in bundle size for entry points between the commits 439ca344 and 7f408837
Special assetsEntrypoint / Name Size before Size after Diff Diff in percent average 3.6 MB 3.59 MB - -0.0 % mainChunk 1.98 MB 1.98 MB - -0.0 %
Please look at the full report for more details
Read more about how this report works.
Generated by
Danger@dpisek
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, a new pipeline has been started.
For more info, please refer to the following links:
requested review from @jannik_lehmann and removed review request for @dpisek
added 43 commits
-
807a3537...4e2d1508 - 42 commits from branch
master
- 9808779d - Display action buttons for the widget
-
807a3537...4e2d1508 - 42 commits from branch
- Resolved by Savas Vedova
- Resolved by Jannik Lehmann
@svedova This LGTM! I left a small nitpick for your consideration, please check it out and ping me once it's applied or decided to ignore it
removed review request for @jannik_lehmann
requested review from @jannik_lehmann
enabled an automatic merge when the pipeline for 6cd6f13d succeeds
mentioned in commit c8df5654
added workflowstaging-canary label and removed workflowready for development label
added workflowcanary label and removed workflowstaging-canary label
added workflowstaging label and removed workflowcanary label
added workflowproduction label and removed workflowstaging label
added workflowpost-deploy-db-staging label and removed workflowproduction label
added workflowpost-deploy-db-production label and removed workflowpost-deploy-db-staging label
added devopsgovern label and removed devopssecure label
added sectionsec label and removed sectiondev label
added releasedcandidate label
added releasedpublished label and removed releasedcandidate label