Commit ab040aee authored by Alexander Turinske's avatar Alexander Turinske

Clean up dast profile code

- add missing graphql fields in dast profile queries
- remove unused sprintf variables
- update tests
parent c9d2f0ee
...@@ -28,6 +28,7 @@ query DastScannerProfiles( ...@@ -28,6 +28,7 @@ query DastScannerProfiles(
useAjaxSpider useAjaxSpider
showDebugMessages showDebugMessages
editPath editPath
referencedInSecurityPolicies
} }
} }
} }
......
...@@ -16,6 +16,7 @@ query DastSiteProfiles($fullPath: ID!, $after: String, $before: String, $first: ...@@ -16,6 +16,7 @@ query DastSiteProfiles($fullPath: ID!, $after: String, $before: String, $first:
targetUrl targetUrl
editPath editPath
validationStatus validationStatus
referencedInSecurityPolicies
} }
} }
} }
......
...@@ -25,6 +25,7 @@ query DastSiteProfiles($fullPath: ID!, $after: String, $before: String, $first: ...@@ -25,6 +25,7 @@ query DastSiteProfiles($fullPath: ID!, $after: String, $before: String, $first:
} }
excludedUrls @client excludedUrls @client
requestHeaders @client requestHeaders @client
referencedInSecurityPolicies
} }
} }
} }
......
...@@ -255,11 +255,8 @@ export default { ...@@ -255,11 +255,8 @@ export default {
:dismissible="false" :dismissible="false"
> >
{{ {{
sprintf( s__(
s__( 'DastProfiles|This scanner profile is currently being used by a policy. To make edits you must remove it from the active policy.',
'DastProfiles|This scanner profile is currently being used by a policy. To make edits you must remove it from the active policy.',
),
{ profileName: form.profileName.value },
) )
}} }}
</gl-alert> </gl-alert>
......
...@@ -255,11 +255,8 @@ export default { ...@@ -255,11 +255,8 @@ export default {
:dismissible="false" :dismissible="false"
> >
{{ {{
sprintf( s__(
s__( 'DastProfiles|This site profile is currently being used by a policy. To make edits you must remove it from the active policy.',
'DastProfiles|This site profile is currently being used by a policy. To make edits you must remove it from the active policy.',
),
{ profileName: form.fields.profileName.value },
) )
}} }}
</gl-alert> </gl-alert>
......
...@@ -8,6 +8,7 @@ export const scannerProfiles = [ ...@@ -8,6 +8,7 @@ export const scannerProfiles = [
useAjaxSpider: false, useAjaxSpider: false,
showDebugMessages: false, showDebugMessages: false,
editPath: '/scanner_profile/edit/1', editPath: '/scanner_profile/edit/1',
referencedInSecurityPolicies: [],
}, },
{ {
id: 'gid://gitlab/DastScannerProfile/2', id: 'gid://gitlab/DastScannerProfile/2',
...@@ -18,6 +19,7 @@ export const scannerProfiles = [ ...@@ -18,6 +19,7 @@ export const scannerProfiles = [
useAjaxSpider: true, useAjaxSpider: true,
showDebugMessages: true, showDebugMessages: true,
editPath: '/scanner_profile/edit/2', editPath: '/scanner_profile/edit/2',
referencedInSecurityPolicies: [],
}, },
]; ];
...@@ -51,6 +53,7 @@ export const siteProfiles = [ ...@@ -51,6 +53,7 @@ export const siteProfiles = [
}, },
excludedUrls: 'https://foo.com/logout,https://foo.com/send_mail', excludedUrls: 'https://foo.com/logout,https://foo.com/send_mail',
requestHeaders: 'log-identifier: dast-active-scan', requestHeaders: 'log-identifier: dast-active-scan',
referencedInSecurityPolicies: [],
}, },
{ {
id: 'gid://gitlab/DastSiteProfile/2', id: 'gid://gitlab/DastSiteProfile/2',
...@@ -64,6 +67,7 @@ export const siteProfiles = [ ...@@ -64,6 +67,7 @@ export const siteProfiles = [
}, },
excludedUrls: 'https://bar.com/logout', excludedUrls: 'https://bar.com/logout',
requestHeaders: 'auth: gitlab-dast', requestHeaders: 'auth: gitlab-dast',
referencedInSecurityPolicies: [],
}, },
]; ];
......
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