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
e1aa3dd6
Commit
e1aa3dd6
authored
Apr 08, 2020
by
Miguel Rincon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix elastic callout condition
parent
baee3dd3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
app/assets/javascripts/logs/components/environment_logs.vue
app/assets/javascripts/logs/components/environment_logs.vue
+6
-4
changelogs/unreleased/213325-elastic-recommendation-alert-appears-when-the-screen-is-loaded.yml
...ecommendation-alert-appears-when-the-screen-is-loaded.yml
+5
-0
spec/frontend/logs/components/environment_logs_spec.js
spec/frontend/logs/components/environment_logs_spec.js
+7
-3
No files found.
app/assets/javascripts/logs/components/environment_logs.vue
View file @
e1aa3dd6
...
...
@@ -70,9 +70,10 @@ export default {
return
this
.
logs
.
isLoading
;
},
shouldShowElasticStackCallout
()
{
return
(
!
this
.
isElasticStackCalloutDismissed
&&
(
this
.
environments
.
isLoading
||
!
this
.
showAdvancedFilters
)
return
!
(
this
.
environments
.
isLoading
||
this
.
isElasticStackCalloutDismissed
||
this
.
showAdvancedFilters
);
},
},
...
...
@@ -120,7 +121,8 @@ export default {
<div
class=
"environment-logs-viewer d-flex flex-column py-3"
>
<gl-alert
v-if=
"shouldShowElasticStackCallout"
class=
"mb-3 js-elasticsearch-alert"
ref=
"elasticsearchNotice"
class=
"mb-3"
@
dismiss=
"isElasticStackCalloutDismissed = true"
>
{{
...
...
changelogs/unreleased/213325-elastic-recommendation-alert-appears-when-the-screen-is-loaded.yml
0 → 100644
View file @
e1aa3dd6
---
title
:
Elasticsearch recommendation alert does not appears while screen is loaded
merge_request
:
29097
author
:
type
:
fixed
spec/frontend/logs/components/environment_logs_spec.js
View file @
e1aa3dd6
...
...
@@ -43,7 +43,7 @@ describe('EnvironmentLogs', () => {
const
findSimpleFilters
=
()
=>
wrapper
.
find
({
ref
:
'
log-simple-filters
'
});
const
findAdvancedFilters
=
()
=>
wrapper
.
find
({
ref
:
'
log-advanced-filters
'
});
const
find
InfoAlert
=
()
=>
wrapper
.
find
(
'
.js-elasticsearch-alert
'
);
const
find
ElasticsearchNotice
=
()
=>
wrapper
.
find
({
ref
:
'
elasticsearchNotice
'
}
);
const
findLogControlButtons
=
()
=>
wrapper
.
find
({
name
:
'
log-control-buttons-stub
'
});
const
findInfiniteScroll
=
()
=>
wrapper
.
find
({
ref
:
'
infiniteScroll
'
});
...
...
@@ -160,6 +160,10 @@ describe('EnvironmentLogs', () => {
initWrapper
();
});
it
(
'
does not display an alert to upgrade to ES
'
,
()
=>
{
expect
(
findElasticsearchNotice
().
exists
()).
toBe
(
false
);
});
it
(
'
displays a disabled environments dropdown
'
,
()
=>
{
expect
(
findEnvironmentsDropdown
().
attributes
(
'
disabled
'
)).
toBe
(
'
true
'
);
expect
(
findEnvironmentsDropdown
().
findAll
(
GlDropdownItem
).
length
).
toBe
(
0
);
...
...
@@ -204,7 +208,7 @@ describe('EnvironmentLogs', () => {
});
it
(
'
displays an alert to upgrade to ES
'
,
()
=>
{
expect
(
find
InfoAlert
().
exists
()).
toBe
(
true
);
expect
(
find
ElasticsearchNotice
().
exists
()).
toBe
(
true
);
});
it
(
'
displays simple filters for kubernetes logs API
'
,
()
=>
{
...
...
@@ -235,7 +239,7 @@ describe('EnvironmentLogs', () => {
});
it
(
'
does not display an alert to upgrade to ES
'
,
()
=>
{
expect
(
find
InfoAlert
().
exists
()).
toBe
(
false
);
expect
(
find
ElasticsearchNotice
().
exists
()).
toBe
(
false
);
});
it
(
'
populates environments dropdown
'
,
()
=>
{
...
...
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