Commit 9f8eebdd authored by Miguel Rincon's avatar Miguel Rincon

Merge branch 'djadmin-scanner-profile-graphql-updates-fe' into 'master'

Refactor DAST Profiles to use GraphQL fragments

See merge request gitlab-org/gitlab!84172
parents ef4b7929 09ee60ae
fragment DastScannerProfileFragment on DastScannerProfile {
__typename
id
profileName
spiderTimeout
targetTimeout
scanType
useAjaxSpider
showDebugMessages
editPath
referencedInSecurityPolicies
}
#import "./dast_scanner_profile.fragment.graphql"
mutation dastScannerProfileCreate($input: DastScannerProfileCreateInput!) {
dastScannerProfileCreate(input: $input) {
id
errors
dastScannerProfile {
...DastScannerProfileFragment
}
}
}
#import "./dast_scanner_profile.fragment.graphql"
mutation dastScannerProfileUpdate($input: DastScannerProfileUpdateInput!) {
dastScannerProfileUpdate(input: $input) {
id
errors
dastScannerProfile {
...DastScannerProfileFragment
}
}
}
fragment DastSiteProfileFragment on DastSiteProfile {
__typename
id
profileName
normalizedTargetUrl
targetUrl
targetType
editPath
validationStatus
referencedInSecurityPolicies
auth {
enabled
url
usernameField
passwordField
username
}
excludedUrls
requestHeaders
}
#import "./dast_site_profile.fragment.graphql"
mutation dastSiteProfileCreate($input: DastSiteProfileCreateInput!) {
dastSiteProfileCreate(input: $input) {
id
errors
dastSiteProfile {
...DastSiteProfileFragment
}
}
}
#import "./dast_site_profile.fragment.graphql"
mutation dastSiteProfileUpdate($input: DastSiteProfileUpdateInput!) {
dastSiteProfileUpdate(input: $input) {
id
errors
dastSiteProfile {
...DastSiteProfileFragment
}
}
}
#import "~/graphql_shared/fragments/page_info.fragment.graphql"
#import "ee/security_configuration/dast_profiles/dast_scanner_profiles/graphql/dast_scanner_profile.fragment.graphql"
query DastScannerProfiles(
$fullPath: ID!
......@@ -22,16 +23,7 @@ query DastScannerProfiles(
...PageInfo
}
nodes {
__typename
id
profileName
spiderTimeout
targetTimeout
scanType
useAjaxSpider
showDebugMessages
editPath
referencedInSecurityPolicies
...DastScannerProfileFragment
}
}
}
......
#import "~/graphql_shared/fragments/page_info.fragment.graphql"
#import "ee/security_configuration/dast_profiles/dast_site_profiles/graphql/dast_site_profile.fragment.graphql"
query DastSiteProfiles($fullPath: ID!, $after: String, $before: String, $first: Int, $last: Int) {
project(fullPath: $fullPath) {
......@@ -11,24 +12,7 @@ query DastSiteProfiles($fullPath: ID!, $after: String, $before: String, $first:
...PageInfo
}
nodes {
__typename
id
profileName
normalizedTargetUrl
targetUrl
targetType
editPath
validationStatus
referencedInSecurityPolicies
auth {
enabled
url
usernameField
passwordField
username
}
excludedUrls
requestHeaders
...DastSiteProfileFragment
}
}
}
......
export const dastSiteProfileCreate = (errors = []) => ({
data: { dastSiteProfileCreate: { id: '3083', errors } },
data: { dastSiteProfileCreate: { id: '3083', errors, dastSiteProfile: { id: '3083' } } },
});
export const dastSiteProfileUpdate = (errors = []) => ({
data: { dastSiteProfileUpdate: { id: '3083', errors } },
data: { dastSiteProfileUpdate: { id: '3083', errors, dastSiteProfile: { id: '3083' } } },
});
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