summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue')
-rw-r--r--app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue10
1 files changed, 6 insertions, 4 deletions
diff --git a/app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue b/app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue
index 0af5d028a2a..f7b49a85b83 100644
--- a/app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue
+++ b/app/assets/javascripts/vue_shared/alert_details/components/alert_details.vue
@@ -11,12 +11,12 @@ import {
GlButton,
GlSafeHtmlDirective,
} from '@gitlab/ui';
+import * as Sentry from '@sentry/browser';
import highlightCurrentUser from '~/behaviors/markdown/highlight_current_user';
import { fetchPolicies } from '~/lib/graphql';
import { toggleContainerClasses } from '~/lib/utils/dom_utils';
import { visitUrl, joinPaths } from '~/lib/utils/url_utility';
import { s__ } from '~/locale';
-import * as Sentry from '~/sentry/wrapper';
import Tracking from '~/tracking';
import initUserPopovers from '~/user_popovers';
import AlertDetailsTable from '~/vue_shared/components/alert_details_table.vue';
@@ -222,7 +222,9 @@ export default {
});
},
incidentPath(issueId) {
- return joinPaths(this.projectIssuesPath, issueId);
+ return this.isThreatMonitoringPage
+ ? joinPaths(this.projectIssuesPath, issueId)
+ : joinPaths(this.projectIssuesPath, 'incident', issueId);
},
trackPageViews() {
const { category, action } = this.trackAlertsDetailsViewsOptions;
@@ -268,10 +270,10 @@ export default {
</span>
</div>
<gl-button
- v-if="alert.issueIid"
+ v-if="alert.issue"
class="gl-mt-3 mt-sm-0 align-self-center align-self-sm-baseline alert-details-incident-button"
data-testid="viewIncidentBtn"
- :href="incidentPath(alert.issueIid)"
+ :href="incidentPath(alert.issue.iid)"
category="primary"
variant="success"
>