Commit 210488cd authored by David O'Regan's avatar David O'Regan

Merge branch '287757-update-graphql-to-separate-alerts' into 'master'

Move shared alert graphql resources to shared

See merge request gitlab-org/gitlab!50011
parents 1de70204 fd38c954
......@@ -23,7 +23,7 @@ import {
} from '~/vue_shared/components/paginated_table_with_search_and_tabs/constants';
import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
import { convertToSnakeCase } from '~/lib/utils/text_utility';
import getAlerts from '../graphql/queries/get_alerts.query.graphql';
import getAlerts from '~/graphql_shared/queries/get_alerts.query.graphql';
import getAlertsCountByStatus from '../graphql/queries/get_count_by_status.query.graphql';
import {
ALERTS_STATUS_TABS,
......
......@@ -3,7 +3,7 @@ import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import { s__ } from '~/locale';
import Tracking from '~/tracking';
import { trackAlertStatusUpdateOptions } from '../constants';
import updateAlertStatusMutation from '../graphql/mutations/update_alert_status.mutation.graphql';
import updateAlertStatusMutation from '~/graphql_shared/mutations/update_alert_status.mutation.graphql';
export default {
i18n: {
......
#import "./list_item.fragment.graphql"
#import "./alert_note.fragment.graphql"
#import "~/graphql_shared/fragments/alert.fragment.graphql"
#import "~/graphql_shared/fragments/alert_note.fragment.graphql"
fragment AlertDetailItem on AlertManagementAlert {
...AlertListItem
......
#import "../fragments/alert_note.fragment.graphql"
#import "~/graphql_shared/fragments/alert_note.fragment.graphql"
mutation alertSetAssignees($projectPath: ID!, $assigneeUsernames: [String!]!, $iid: String!) {
alertSetAssignees(
......
#import "../fragments/alert_note.fragment.graphql"
#import "~/graphql_shared/fragments/alert_note.fragment.graphql"
mutation updateAlertStatus($projectPath: ID!, $status: AlertManagementStatus!, $iid: String!) {
updateAlertStatus(input: { iid: $iid, status: $status, projectPath: $projectPath }) {
......
#import "../fragments/list_item.fragment.graphql"
#import "~/graphql_shared/fragments/alert.fragment.graphql"
query getAlerts(
$projectPath: ID!
......
<script>
import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
// TODO once backend is settled, update by either abstracting this out to app/assets/javascripts/graphql_shared or create new, modified query in #287757
import updateAlertStatusMutation from '~/alert_management/graphql/mutations/update_alert_status.mutation.graphql';
import updateAlertStatusMutation from '~/graphql_shared/mutations/update_alert_status.mutation.graphql';
import { MESSAGES, STATUSES } from './constants';
export default {
......
......@@ -12,8 +12,7 @@ import {
import produce from 'immer';
import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
import { convertToSnakeCase } from '~/lib/utils/text_utility';
// TODO once backend is settled, update by either abstracting this out to app/assets/javascripts/graphql_shared or create new, modified query in #287757
import getAlerts from '~/alert_management/graphql/queries/get_alerts.query.graphql';
import getAlerts from '~/graphql_shared/queries/get_alerts.query.graphql';
import { DEFAULT_FILTERS, FIELDS, MESSAGES, PAGE_SIZE, STATUSES } from './constants';
import AlertFilters from './alert_filters.vue';
import AlertStatus from './alert_status.vue';
......
......@@ -2,7 +2,7 @@ import { shallowMount } from '@vue/test-utils';
import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import waitForPromises from 'helpers/wait_for_promises';
import AlertStatus from 'ee/threat_monitoring/components/alerts/alert_status.vue';
import updateAlertStatusMutation from '~/alert_management/graphql/mutations/update_alert_status.mutation.graphql';
import updateAlertStatusMutation from '~/graphql_shared/mutations/update_alert_status.mutation.graphql';
import { mockAlerts } from '../../mock_data';
const mockAlert = mockAlerts[0];
......
......@@ -3,7 +3,7 @@ import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
import waitForPromises from 'helpers/wait_for_promises';
import { trackAlertStatusUpdateOptions } from '~/alert_management/constants';
import AlertManagementStatus from '~/alert_management/components/alert_status.vue';
import updateAlertStatusMutation from '~/alert_management/graphql/mutations/update_alert_status.mutation.graphql';
import updateAlertStatusMutation from '~/graphql_shared/mutations/update_alert_status.mutation.graphql';
import Tracking from '~/tracking';
import mockAlerts from '../mocks/alerts.json';
......
......@@ -2,7 +2,7 @@ import { mount } from '@vue/test-utils';
import { GlDropdown, GlDropdownItem, GlLoadingIcon } from '@gitlab/ui';
import { trackAlertStatusUpdateOptions } from '~/alert_management/constants';
import AlertSidebarStatus from '~/alert_management/components/sidebar/sidebar_status.vue';
import updateAlertStatusMutation from '~/alert_management/graphql/mutations/update_alert_status.mutation.graphql';
import updateAlertStatusMutation from '~/graphql_shared/mutations/update_alert_status.mutation.graphql';
import Tracking from '~/tracking';
import mockAlerts from '../../mocks/alerts.json';
......
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