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
206258c6
Commit
206258c6
authored
Mar 17, 2021
by
Alexander Turinske
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up policy name filter
- abstract out constants - clean up test - convert class to gl-
parent
0eeab345
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
6 deletions
+9
-6
ee/app/assets/javascripts/threat_monitoring/components/alerts/alert_filters.vue
...pts/threat_monitoring/components/alerts/alert_filters.vue
+3
-2
ee/app/assets/javascripts/threat_monitoring/components/alerts/constants.js
...ascripts/threat_monitoring/components/alerts/constants.js
+2
-0
ee/app/assets/javascripts/threat_monitoring/components/network_policy_list.vue
...ipts/threat_monitoring/components/network_policy_list.vue
+1
-1
ee/spec/frontend/threat_monitoring/components/alerts/alert_filters_spec.js
...threat_monitoring/components/alerts/alert_filters_spec.js
+3
-3
No files found.
ee/app/assets/javascripts/threat_monitoring/components/alerts/alert_filters.vue
View file @
206258c6
<
script
>
<
script
>
import
{
GlFormCheckbox
,
GlFormGroup
,
GlSearchBoxByType
}
from
'
@gitlab/ui
'
;
import
{
GlFormCheckbox
,
GlFormGroup
,
GlSearchBoxByType
}
from
'
@gitlab/ui
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
s__
}
from
'
~/locale
'
;
import
{
DEFAULT_FILTERS
}
from
'
./constants
'
;
import
{
DE
BOUNCE
,
DE
FAULT_FILTERS
}
from
'
./constants
'
;
export
default
{
export
default
{
DEBOUNCE
,
DEFAULT_DISMISSED_FILTER
:
true
,
DEFAULT_DISMISSED_FILTER
:
true
,
components
:
{
GlFormCheckbox
,
GlFormGroup
,
GlSearchBoxByType
},
components
:
{
GlFormCheckbox
,
GlFormGroup
,
GlSearchBoxByType
},
props
:
{
props
:
{
...
@@ -46,7 +47,7 @@ export default {
...
@@ -46,7 +47,7 @@ export default {
<div>
<div>
<h5
class=
"gl-mt-0"
>
{{
$options
.
i18n
.
POLICY_NAME_FILTER_TITLE
}}
</h5>
<h5
class=
"gl-mt-0"
>
{{
$options
.
i18n
.
POLICY_NAME_FILTER_TITLE
}}
</h5>
<gl-search-box-by-type
<gl-search-box-by-type
debounce=
"250
"
:debounce=
"$options.DEBOUNCE
"
:placeholder=
"$options.i18n.POLICY_NAME_FILTER_PLACEHOLDER"
:placeholder=
"$options.i18n.POLICY_NAME_FILTER_PLACEHOLDER"
@
input=
"handleSearch"
@
input=
"handleSearch"
/>
/>
...
...
ee/app/assets/javascripts/threat_monitoring/components/alerts/constants.js
View file @
206258c6
...
@@ -56,3 +56,5 @@ export const PAGE_SIZE = 20;
...
@@ -56,3 +56,5 @@ export const PAGE_SIZE = 20;
export
const
DEFAULT_FILTERS
=
{
statuses
:
[
'
TRIGGERED
'
,
'
ACKNOWLEDGED
'
]
};
export
const
DEFAULT_FILTERS
=
{
statuses
:
[
'
TRIGGERED
'
,
'
ACKNOWLEDGED
'
]
};
export
const
DOMAIN
=
'
threat_monitoring
'
;
export
const
DOMAIN
=
'
threat_monitoring
'
;
export
const
DEBOUNCE
=
250
;
ee/app/assets/javascripts/threat_monitoring/components/network_policy_list.vue
View file @
206258c6
...
@@ -187,7 +187,7 @@ export default {
...
@@ -187,7 +187,7 @@ export default {
>
>
<gl-sprintf
:message=
"$options.autodevopsNoticeDescription"
>
<gl-sprintf
:message=
"$options.autodevopsNoticeDescription"
>
<template
#monospaced
="
{ content }">
<template
#monospaced
="
{ content }">
<span
class=
"monospace"
>
{{
content
}}
</span>
<span
class=
"
gl-font-
monospace"
>
{{
content
}}
</span>
</
template
>
</
template
>
<
template
#link=
"{ content }"
>
<
template
#link=
"{ content }"
>
<gl-link
:href=
"documentationFullPath"
>
{{
content
}}
</gl-link>
<gl-link
:href=
"documentationFullPath"
>
{{
content
}}
</gl-link>
...
...
ee/spec/frontend/threat_monitoring/components/alerts/alert_filters_spec.js
View file @
206258c6
...
@@ -31,12 +31,12 @@ describe('AlertFilters component', () => {
...
@@ -31,12 +31,12 @@ describe('AlertFilters component', () => {
});
});
it
(
'
does emit an event with a user-defined string
'
,
async
()
=>
{
it
(
'
does emit an event with a user-defined string
'
,
async
()
=>
{
const
t
erm
=
'
abc
'
;
const
searchT
erm
=
'
abc
'
;
const
search
=
findGlSearch
();
const
search
=
findGlSearch
();
search
.
vm
.
$emit
(
'
input
'
,
t
erm
);
search
.
vm
.
$emit
(
'
input
'
,
searchT
erm
);
await
wrapper
.
vm
.
$nextTick
();
await
wrapper
.
vm
.
$nextTick
();
expect
(
wrapper
.
emitted
(
'
filter-change
'
)).
toStrictEqual
([
expect
(
wrapper
.
emitted
(
'
filter-change
'
)).
toStrictEqual
([
[{
...
DEFAULT_FILTERS
,
searchTerm
:
'
abc
'
}],
[{
...
DEFAULT_FILTERS
,
searchTerm
}],
]);
]);
});
});
});
});
...
...
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