Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
49f9d174
Commit
49f9d174
authored
Feb 24, 2021
by
Tristan Read
Committed by
David O'Regan
Feb 24, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[RUN AS-IF-FOSS] Fix alert settings errors in FOSS
parent
0574f4c1
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
76 additions
and
53 deletions
+76
-53
app/assets/javascripts/alerts_settings/components/alerts_settings_wrapper.vue
...ts/alerts_settings/components/alerts_settings_wrapper.vue
+2
-2
app/assets/javascripts/alerts_settings/graphql/fragments/http_integration_item.fragment.graphql
.../graphql/fragments/http_integration_item.fragment.graphql
+1
-1
app/assets/javascripts/alerts_settings/graphql/fragments/http_integration_payload_data.fragment.graphql
.../fragments/http_integration_payload_data.fragment.graphql
+1
-12
app/assets/javascripts/alerts_settings/graphql/mutations/create_http_integration.mutation.graphql
...raphql/mutations/create_http_integration.mutation.graphql
+2
-16
app/assets/javascripts/alerts_settings/graphql/mutations/update_http_integration.mutation.graphql
...raphql/mutations/update_http_integration.mutation.graphql
+2
-16
app/assets/javascripts/alerts_settings/graphql/queries/get_http_integrations.query.graphql
...tings/graphql/queries/get_http_integrations.query.graphql
+1
-2
ee/app/assets/javascripts/alerts_settings/graphql/fragments/http_integration_payload_data.fragment.graphql
.../fragments/http_integration_payload_data.fragment.graphql
+15
-0
ee/app/assets/javascripts/alerts_settings/graphql/mutations/create_http_integration.mutation.graphql
...raphql/mutations/create_http_integration.mutation.graphql
+24
-0
ee/app/assets/javascripts/alerts_settings/graphql/mutations/update_http_integration.mutation.graphql
...raphql/mutations/update_http_integration.mutation.graphql
+24
-0
spec/features/projects/settings/operations_settings_spec.rb
spec/features/projects/settings/operations_settings_spec.rb
+2
-2
spec/frontend/alerts_settings/components/alerts_settings_wrapper_spec.js
...lerts_settings/components/alerts_settings_wrapper_spec.js
+2
-2
No files found.
app/assets/javascripts/alerts_settings/components/alerts_settings_wrapper.vue
View file @
49f9d174
<
script
>
import
createHttpIntegrationMutation
from
'
ee_else_ce/alerts_settings/graphql/mutations/create_http_integration.mutation.graphql
'
;
import
updateHttpIntegrationMutation
from
'
ee_else_ce/alerts_settings/graphql/mutations/update_http_integration.mutation.graphql
'
;
import
createFlash
,
{
FLASH_TYPES
}
from
'
~/flash
'
;
import
{
fetchPolicies
}
from
'
~/lib/graphql
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
typeSet
}
from
'
../constants
'
;
import
createHttpIntegrationMutation
from
'
../graphql/mutations/create_http_integration.mutation.graphql
'
;
import
createPrometheusIntegrationMutation
from
'
../graphql/mutations/create_prometheus_integration.mutation.graphql
'
;
import
destroyHttpIntegrationMutation
from
'
../graphql/mutations/destroy_http_integration.mutation.graphql
'
;
import
resetHttpTokenMutation
from
'
../graphql/mutations/reset_http_token.mutation.graphql
'
;
import
resetPrometheusTokenMutation
from
'
../graphql/mutations/reset_prometheus_token.mutation.graphql
'
;
import
updateCurrentHttpIntegrationMutation
from
'
../graphql/mutations/update_current_http_integration.mutation.graphql
'
;
import
updateCurrentPrometheusIntegrationMutation
from
'
../graphql/mutations/update_current_prometheus_integration.mutation.graphql
'
;
import
updateHttpIntegrationMutation
from
'
../graphql/mutations/update_http_integration.mutation.graphql
'
;
import
updatePrometheusIntegrationMutation
from
'
../graphql/mutations/update_prometheus_integration.mutation.graphql
'
;
import
getCurrentIntegrationQuery
from
'
../graphql/queries/get_current_integration.query.graphql
'
;
import
getHttpIntegrationsQuery
from
'
../graphql/queries/get_http_integrations.query.graphql
'
;
...
...
app/assets/javascripts/alerts_settings/graphql/fragments/http_integration_item.fragment.graphql
View file @
49f9d174
#import "./integration_item.fragment.graphql"
#import "
.
/http_integration_payload_data.fragment.graphql"
#import "
ee_else_ce/alerts_settings/graphql/fragments
/http_integration_payload_data.fragment.graphql"
fragment
HttpIntegrationItem
on
AlertManagementHttpIntegration
{
...
IntegrationItem
...
...
app/assets/javascripts/alerts_settings/graphql/fragments/http_integration_payload_data.fragment.graphql
View file @
49f9d174
fragment
HttpIntegrationPayloadData
on
AlertManagementHttpIntegration
{
payloadExample
payloadAttributeMappings
{
fieldName
path
type
label
}
payloadAlertFields
{
path
type
label
}
id
}
app/assets/javascripts/alerts_settings/graphql/mutations/create_http_integration.mutation.graphql
View file @
49f9d174
#import "../fragments/http_integration_item.fragment.graphql"
mutation
createHttpIntegration
(
$projectPath
:
ID
!
$name
:
String
!
$active
:
Boolean
!
$payloadExample
:
JsonString
$payloadAttributeMappings
:
[
AlertManagementPayloadAlertFieldInput
!]
)
{
httpIntegrationCreate
(
input
:
{
projectPath
:
$projectPath
name
:
$name
active
:
$active
payloadExample
:
$payloadExample
payloadAttributeMappings
:
$payloadAttributeMappings
}
)
{
mutation
createHttpIntegration
(
$projectPath
:
ID
!,
$name
:
String
!,
$active
:
Boolean
!)
{
httpIntegrationCreate
(
input
:
{
projectPath
:
$projectPath
,
name
:
$name
,
active
:
$active
})
{
errors
integration
{
...
HttpIntegrationItem
...
...
app/assets/javascripts/alerts_settings/graphql/mutations/update_http_integration.mutation.graphql
View file @
49f9d174
#import "../fragments/http_integration_item.fragment.graphql"
mutation
updateHttpIntegration
(
$id
:
ID
!
$name
:
String
!
$active
:
Boolean
!
$payloadExample
:
JsonString
$payloadAttributeMappings
:
[
AlertManagementPayloadAlertFieldInput
!]
)
{
httpIntegrationUpdate
(
input
:
{
id
:
$id
name
:
$name
active
:
$active
payloadExample
:
$payloadExample
payloadAttributeMappings
:
$payloadAttributeMappings
}
)
{
mutation
updateHttpIntegration
(
$id
:
ID
!,
$name
:
String
!,
$active
:
Boolean
!)
{
httpIntegrationUpdate
(
input
:
{
id
:
$id
,
name
:
$name
,
active
:
$active
})
{
errors
integration
{
...
HttpIntegrationItem
...
...
app/assets/javascripts/alerts_settings/graphql/queries/get_http_integrations.query.graphql
View file @
49f9d174
#import "
..
/fragments/http_integration_payload_data.fragment.graphql"
#import "
ee_else_ce/alerts_settings/graphql
/fragments/http_integration_payload_data.fragment.graphql"
# TODO: this query need to accept http integration id to request a sepcific integration
query
getHttpIntegrations
(
$projectPath
:
ID
!)
{
project
(
fullPath
:
$projectPath
)
{
alertManagementHttpIntegrations
{
nodes
{
id
...
HttpIntegrationPayloadData
}
}
...
...
ee/app/assets/javascripts/alerts_settings/graphql/fragments/http_integration_payload_data.fragment.graphql
0 → 100644
View file @
49f9d174
fragment
HttpIntegrationPayloadData
on
AlertManagementHttpIntegration
{
id
payloadExample
payloadAttributeMappings
{
fieldName
path
type
label
}
payloadAlertFields
{
path
type
label
}
}
ee/app/assets/javascripts/alerts_settings/graphql/mutations/create_http_integration.mutation.graphql
0 → 100644
View file @
49f9d174
#import "~/alerts_settings/graphql/fragments/http_integration_item.fragment.graphql"
mutation
createHttpIntegration
(
$projectPath
:
ID
!
$name
:
String
!
$active
:
Boolean
!
$payloadExample
:
JsonString
$payloadAttributeMappings
:
[
AlertManagementPayloadAlertFieldInput
!]
)
{
httpIntegrationCreate
(
input
:
{
projectPath
:
$projectPath
name
:
$name
active
:
$active
payloadExample
:
$payloadExample
payloadAttributeMappings
:
$payloadAttributeMappings
}
)
{
errors
integration
{
...
HttpIntegrationItem
}
}
}
ee/app/assets/javascripts/alerts_settings/graphql/mutations/update_http_integration.mutation.graphql
0 → 100644
View file @
49f9d174
#import "~/alerts_settings/graphql/fragments/http_integration_item.fragment.graphql"
mutation
updateHttpIntegration
(
$id
:
ID
!
$name
:
String
!
$active
:
Boolean
!
$payloadExample
:
JsonString
$payloadAttributeMappings
:
[
AlertManagementPayloadAlertFieldInput
!]
)
{
httpIntegrationUpdate
(
input
:
{
id
:
$id
name
:
$name
active
:
$active
payloadExample
:
$payloadExample
payloadAttributeMappings
:
$payloadAttributeMappings
}
)
{
errors
integration
{
...
HttpIntegrationItem
}
}
}
spec/features/projects/settings/operations_settings_spec.rb
View file @
49f9d174
...
...
@@ -89,7 +89,7 @@ RSpec.describe 'Projects > Settings > For a forked project', :js do
)
end
it
'successfully fills and submits the form'
,
quarantine:
'https://gitlab.com/gitlab-org/gitlab/-/issues/322666'
do
it
'successfully fills and submits the form'
do
visit
project_settings_operations_path
(
project
)
wait_for_requests
...
...
@@ -152,7 +152,7 @@ RSpec.describe 'Projects > Settings > For a forked project', :js do
end
context
'grafana integration settings form'
do
it
'successfully fills and completes the form'
,
quarantine:
'https://gitlab.com/gitlab-org/gitlab/-/issues/322666'
do
it
'successfully fills and completes the form'
do
visit
project_settings_operations_path
(
project
)
wait_for_requests
...
...
spec/frontend/alerts_settings/components/alerts_settings_wrapper_spec.js
View file @
49f9d174
...
...
@@ -2,6 +2,8 @@ import { GlLoadingIcon } from '@gitlab/ui';
import
{
mount
,
createLocalVue
}
from
'
@vue/test-utils
'
;
import
AxiosMockAdapter
from
'
axios-mock-adapter
'
;
import
VueApollo
from
'
vue-apollo
'
;
import
createHttpIntegrationMutation
from
'
ee_else_ce/alerts_settings/graphql/mutations/create_http_integration.mutation.graphql
'
;
import
updateHttpIntegrationMutation
from
'
ee_else_ce/alerts_settings/graphql/mutations/update_http_integration.mutation.graphql
'
;
import
createMockApollo
from
'
helpers/mock_apollo_helper
'
;
import
{
useMockIntersectionObserver
}
from
'
helpers/mock_dom_observer
'
;
import
waitForPromises
from
'
helpers/wait_for_promises
'
;
...
...
@@ -9,14 +11,12 @@ import IntegrationsList from '~/alerts_settings/components/alerts_integrations_l
import
AlertsSettingsForm
from
'
~/alerts_settings/components/alerts_settings_form.vue
'
;
import
AlertsSettingsWrapper
from
'
~/alerts_settings/components/alerts_settings_wrapper.vue
'
;
import
{
typeSet
}
from
'
~/alerts_settings/constants
'
;
import
createHttpIntegrationMutation
from
'
~/alerts_settings/graphql/mutations/create_http_integration.mutation.graphql
'
;
import
createPrometheusIntegrationMutation
from
'
~/alerts_settings/graphql/mutations/create_prometheus_integration.mutation.graphql
'
;
import
destroyHttpIntegrationMutation
from
'
~/alerts_settings/graphql/mutations/destroy_http_integration.mutation.graphql
'
;
import
resetHttpTokenMutation
from
'
~/alerts_settings/graphql/mutations/reset_http_token.mutation.graphql
'
;
import
resetPrometheusTokenMutation
from
'
~/alerts_settings/graphql/mutations/reset_prometheus_token.mutation.graphql
'
;
import
updateCurrentHttpIntegrationMutation
from
'
~/alerts_settings/graphql/mutations/update_current_http_integration.mutation.graphql
'
;
import
updateCurrentPrometheusIntegrationMutation
from
'
~/alerts_settings/graphql/mutations/update_current_prometheus_integration.mutation.graphql
'
;
import
updateHttpIntegrationMutation
from
'
~/alerts_settings/graphql/mutations/update_http_integration.mutation.graphql
'
;
import
updatePrometheusIntegrationMutation
from
'
~/alerts_settings/graphql/mutations/update_prometheus_integration.mutation.graphql
'
;
import
getIntegrationsQuery
from
'
~/alerts_settings/graphql/queries/get_integrations.query.graphql
'
;
import
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment