Commit eee85cb3 authored by Simon Knox's avatar Simon Knox

Merge branch 'add_specific_domain_for_alerts_in_graphql' into 'master'

Add domain into the query for threat management

See merge request gitlab-org/gitlab!51029
parents 4b765106 77eff5aa
...@@ -10,6 +10,7 @@ query getAlerts( ...@@ -10,6 +10,7 @@ query getAlerts(
$nextPageCursor: String = "" $nextPageCursor: String = ""
$searchTerm: String = "" $searchTerm: String = ""
$assigneeUsername: String = "" $assigneeUsername: String = ""
$domain: AlertManagementDomainFilter = operations
) { ) {
project(fullPath: $projectPath) { project(fullPath: $projectPath) {
alertManagementAlerts( alertManagementAlerts(
...@@ -21,6 +22,7 @@ query getAlerts( ...@@ -21,6 +22,7 @@ query getAlerts(
last: $lastPageSize last: $lastPageSize
after: $nextPageCursor after: $nextPageCursor
before: $prevPageCursor before: $prevPageCursor
domain: $domain
) { ) {
nodes { nodes {
...AlertListItem ...AlertListItem
......
...@@ -13,12 +13,13 @@ import produce from 'immer'; ...@@ -13,12 +13,13 @@ import produce from 'immer';
import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue'; import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
import { convertToSnakeCase } from '~/lib/utils/text_utility'; import { convertToSnakeCase } from '~/lib/utils/text_utility';
import getAlertsQuery from '~/graphql_shared/queries/get_alerts.query.graphql'; import getAlertsQuery from '~/graphql_shared/queries/get_alerts.query.graphql';
import { DEFAULT_FILTERS, FIELDS, MESSAGES, PAGE_SIZE, STATUSES } from './constants'; import { DEFAULT_FILTERS, FIELDS, MESSAGES, PAGE_SIZE, STATUSES, DOMAIN } from './constants';
import AlertFilters from './alert_filters.vue'; import AlertFilters from './alert_filters.vue';
import AlertStatus from './alert_status.vue'; import AlertStatus from './alert_status.vue';
export default { export default {
PAGE_SIZE, PAGE_SIZE,
DOMAIN,
i18n: { i18n: {
FIELDS, FIELDS,
MESSAGES, MESSAGES,
...@@ -48,6 +49,7 @@ export default { ...@@ -48,6 +49,7 @@ export default {
firstPageSize: this.$options.PAGE_SIZE, firstPageSize: this.$options.PAGE_SIZE,
projectPath: this.projectPath, projectPath: this.projectPath,
sort: this.sort, sort: this.sort,
domain: this.$options.DOMAIN,
...this.filters, ...this.filters,
}; };
}, },
......
...@@ -47,3 +47,5 @@ export const FIELDS = [ ...@@ -47,3 +47,5 @@ export const FIELDS = [
export const PAGE_SIZE = 20; export const PAGE_SIZE = 20;
export const DEFAULT_FILTERS = { statuses: ['TRIGGERED', 'ACKNOWLEDGED'] }; export const DEFAULT_FILTERS = { statuses: ['TRIGGERED', 'ACKNOWLEDGED'] };
export const DOMAIN = 'threat_monitoring';
---
title: Add specific domain for threat management related alerts in order to tie the
frontend and backend together.
merge_request: 51029
author:
type: changed
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