Commit bd2da5a2 authored by Lindsay Kerr's avatar Lindsay Kerr Committed by Kushal Pandya

Replace Bootstrap Button & LoadingButton w/ GitLab UI GlButton in vulnerability_action_buttons.vue

parent 563e34f5
---
title: GlButton migrations for pipeline security tab
merge_request: 39651
author:
type: performance
...@@ -43,7 +43,7 @@ To use the instance, group, project, or pipeline security dashboard: ...@@ -43,7 +43,7 @@ To use the instance, group, project, or pipeline security dashboard:
At the pipeline level, the Security section displays the vulnerabilities present in the branch of the project the pipeline was run against. At the pipeline level, the Security section displays the vulnerabilities present in the branch of the project the pipeline was run against.
![Pipeline Security Dashboard](img/pipeline_security_dashboard_v13_2.png) ![Pipeline Security Dashboard](img/pipeline_security_dashboard_v13_3.png)
Visit the page for any pipeline that ran any of the [supported reports](#supported-reports). To view Visit the page for any pipeline that ran any of the [supported reports](#supported-reports). To view
the pipeline's security findings, select the **Security** tab when viewing the pipeline. the pipeline's security findings, select the **Security** tab when viewing the pipeline.
......
...@@ -105,7 +105,7 @@ back to both GitLab and GitHub when completed. ...@@ -105,7 +105,7 @@ back to both GitLab and GitHub when completed.
1. The result of the job will be visible directly from the pipeline view: 1. The result of the job will be visible directly from the pipeline view:
![Security Dashboard](../../application_security/security_dashboard/img/pipeline_security_dashboard_v13_2.png) ![Security Dashboard](../../application_security/security_dashboard/img/pipeline_security_dashboard_v13_3.png)
NOTE: **Note:** NOTE: **Note:**
If you don't commit very often to your project, you may want to use If you don't commit very often to your project, you may want to use
......
<script> <script>
import { mapActions, mapState } from 'vuex'; import { mapActions, mapState } from 'vuex';
import { GlTooltipDirective } from '@gitlab/ui'; import { GlTooltipDirective, GlButton } from '@gitlab/ui';
import LoadingButton from '~/vue_shared/components/loading_button.vue';
import Icon from '~/vue_shared/components/icon.vue';
export default { export default {
name: 'SecurityDashboardActionButtons', name: 'SecurityDashboardActionButtons',
components: { components: {
Icon, GlButton,
LoadingButton,
}, },
directives: { directives: {
GlTooltip: GlTooltipDirective, GlTooltip: GlTooltipDirective,
...@@ -62,57 +59,57 @@ export default { ...@@ -62,57 +59,57 @@ export default {
<template> <template>
<div class="btn-group"> <div class="btn-group">
<button <gl-button
key="more-info" key="more-info"
v-gl-tooltip v-gl-tooltip
:aria-label="s__('SecurityReports|More info')" :aria-label="s__('SecurityReports|More info')"
:title="s__('SecurityReports|More info')" :title="s__('SecurityReports|More info')"
class="btn btn-inverted btn-info btn-secondary btn-border-color btn-icon js-more-info" class="js-more-info"
type="button" variant="info"
category="secondary"
icon="information-o"
@click="openModal({ vulnerability })" @click="openModal({ vulnerability })"
> />
<icon name="information-o" /> <gl-button
</button>
<loading-button
v-if="canCreateIssue" v-if="canCreateIssue"
key="create-issue" key="create-issue"
v-gl-tooltip v-gl-tooltip
:aria-label="s__('SecurityReports|Create issue')" :aria-label="s__('SecurityReports|Create issue')"
:loading="isCreatingIssue" :loading="isCreatingIssue"
:title="s__('SecurityReports|Create issue')" :title="s__('SecurityReports|Create issue')"
container-class="btn btn-inverted btn-success btn-border-color js-create-issue" class="js-create-issue"
type="button" variant="success"
category="secondary"
icon="issue-new"
@click="handleCreateIssue" @click="handleCreateIssue"
> />
<icon name="issue-new" />
</loading-button>
<template v-if="canDismissVulnerability"> <template v-if="canDismissVulnerability">
<loading-button <gl-button
v-if="isDismissed" v-if="isDismissed"
key="undo-dismiss" key="undo-dismiss"
v-gl-tooltip v-gl-tooltip
:aria-label="s__('SecurityReports|Undo dismiss')" :aria-label="s__('SecurityReports|Undo dismiss')"
:loading="isDismissingVulnerability" :loading="isDismissingVulnerability"
:title="s__('SecurityReports|Undo dismiss')" :title="s__('SecurityReports|Undo dismiss')"
container-class="btn btn-inverted btn-warning btn-border-color js-undo-dismiss" class="js-undo-dismiss"
type="button" variant="warning"
category="secondary"
icon="redo"
@click="handleUndoDismiss" @click="handleUndoDismiss"
> />
<icon name="redo" /> <gl-button
</loading-button>
<loading-button
v-else v-else
key="dismiss-vulnerability" key="dismiss-vulnerability"
v-gl-tooltip v-gl-tooltip
:aria-label="s__('SecurityReports|Dismiss vulnerability')" :aria-label="s__('SecurityReports|Dismiss vulnerability')"
:loading="isDismissingVulnerability" :loading="isDismissingVulnerability"
:title="s__('SecurityReports|Dismiss vulnerability')" :title="s__('SecurityReports|Dismiss vulnerability')"
container-class="btn btn-inverted btn-warning btn-border-color js-dismiss-vulnerability" class="js-dismiss-vulnerability"
type="button" variant="warning"
category="secondary"
icon="cancel"
@click="handleDismissVulnerability" @click="handleDismissVulnerability"
> />
<icon name="cancel" />
</loading-button>
</template> </template>
</div> </div>
</template> </template>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment