diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-26 00:10:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-26 00:10:26 +0300 |
commit | c0bc55ffe14525ff453a8bfe5a88ee87d3b615f1 (patch) | |
tree | a8e1dac4f7b45d6a2c397b73e1eba92b8505dd9c /app/assets/javascripts/graphql_shared | |
parent | a880341a7b3a164ba381620852cc3ea0777f67ad (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/graphql_shared')
4 files changed, 47 insertions, 8 deletions
diff --git a/app/assets/javascripts/graphql_shared/fragments/alert.fragment.graphql b/app/assets/javascripts/graphql_shared/fragments/alert.fragment.graphql index 41e7ed98c78..2c771c32e16 100644 --- a/app/assets/javascripts/graphql_shared/fragments/alert.fragment.graphql +++ b/app/assets/javascripts/graphql_shared/fragments/alert.fragment.graphql @@ -11,12 +11,4 @@ fragment AlertListItem on AlertManagementAlert { title webUrl } - assignees { - nodes { - name - username - avatarUrl - webUrl - } - } } diff --git a/app/assets/javascripts/graphql_shared/fragments/alert_detail_item.fragment.graphql b/app/assets/javascripts/graphql_shared/fragments/alert_detail_item.fragment.graphql new file mode 100644 index 00000000000..9a9ae369519 --- /dev/null +++ b/app/assets/javascripts/graphql_shared/fragments/alert_detail_item.fragment.graphql @@ -0,0 +1,30 @@ +#import "~/graphql_shared/fragments/alert.fragment.graphql" +#import "~/graphql_shared/fragments/alert_note.fragment.graphql" + +fragment AlertDetailItem on AlertManagementAlert { + ...AlertListItem + createdAt + monitoringTool + metricsDashboardUrl + service + description + updatedAt + endedAt + hosts + environment { + name + path + } + details + runbook + todos { + nodes { + id + } + } + notes { + nodes { + ...AlertNote + } + } +} diff --git a/app/assets/javascripts/graphql_shared/queries/alert_details.query.graphql b/app/assets/javascripts/graphql_shared/queries/alert_details.query.graphql new file mode 100644 index 00000000000..5ee2cf7ca44 --- /dev/null +++ b/app/assets/javascripts/graphql_shared/queries/alert_details.query.graphql @@ -0,0 +1,11 @@ +#import "../fragments/alert_detail_item.fragment.graphql" + +query alertDetails($fullPath: ID!, $alertId: String) { + project(fullPath: $fullPath) { + alertManagementAlerts(iid: $alertId) { + nodes { + ...AlertDetailItem + } + } + } +} diff --git a/app/assets/javascripts/graphql_shared/queries/get_alerts.query.graphql b/app/assets/javascripts/graphql_shared/queries/get_alerts.query.graphql index 7a676e67f1b..095e4fe29df 100644 --- a/app/assets/javascripts/graphql_shared/queries/get_alerts.query.graphql +++ b/app/assets/javascripts/graphql_shared/queries/get_alerts.query.graphql @@ -1,4 +1,5 @@ #import "~/graphql_shared/fragments/alert.fragment.graphql" +#import "~/graphql_shared/fragments/user.fragment.graphql" query getAlerts( $projectPath: ID! @@ -26,6 +27,11 @@ query getAlerts( ) { nodes { ...AlertListItem + assignees { + nodes { + ...User + } + } } pageInfo { hasNextPage |