diff --git a/ee/app/assets/javascripts/on_demand_scans/components/tabs/saved.vue b/ee/app/assets/javascripts/on_demand_scans/components/tabs/saved.vue index 95c3b95eea32572f96addabdace2e0b0fab80a00..d158ffda0a9bd514dda0b39d378693f4b16ce921 100644 --- a/ee/app/assets/javascripts/on_demand_scans/components/tabs/saved.vue +++ b/ee/app/assets/javascripts/on_demand_scans/components/tabs/saved.vue @@ -147,30 +147,21 @@ export default { this.$refs.verification.openSidebar(); }, actionDisclosureItemsConfig(item) { - const actionItems = [ - { + const actionItems = []; + + if (item.editPath) { + actionItems.push({ href: item.editPath, text: this.$options.i18n.editButtonLabel, extraAttrs: { 'aria-label': this.$options.i18n.editProfile, 'data-testid': 'edit-scan-button-desktop', }, - }, - { - text: this.$options.i18n.deleteButtonLabel, - action: () => this.prepareProfileDeletion(item.id), - variant: 'danger', - extraAttrs: { - 'aria-label': this.$options.i18n.deleteProfile, - 'data-testid': 'delete-scan-button-desktop', - boundary: 'viewport', - variant: 'danger', - }, - }, - ]; + }); + } if (this.glFeatures.dastPreScanVerification) { - actionItems.splice(1, 0, { + actionItems.push({ text: this.$options.i18n.verifyConfigurationLabel, action: () => this.openSidebar(), extraAttrs: { @@ -180,6 +171,18 @@ export default { }); } + actionItems.push({ + text: this.$options.i18n.deleteButtonLabel, + action: () => this.prepareProfileDeletion(item.id), + variant: 'danger', + extraAttrs: { + 'aria-label': this.$options.i18n.deleteProfile, + 'data-testid': 'delete-scan-button-desktop', + boundary: 'viewport', + variant: 'danger', + }, + }); + return actionItems; }, }, @@ -248,6 +251,7 @@ export default {