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
f835649b
Commit
f835649b
authored
Apr 23, 2021
by
Olena Horal-Koretska
Committed by
David O'Regan
May 13, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch environments endpoint for better performance
parent
2dbb2234
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
app/assets/javascripts/logs/stores/actions.js
app/assets/javascripts/logs/stores/actions.js
+1
-1
app/helpers/environments_helper.rb
app/helpers/environments_helper.rb
+1
-1
ee/spec/helpers/ee/environments_helper_spec.rb
ee/spec/helpers/ee/environments_helper_spec.rb
+1
-1
spec/frontend/logs/stores/actions_spec.js
spec/frontend/logs/stores/actions_spec.js
+1
-1
spec/helpers/environments_helper_spec.rb
spec/helpers/environments_helper_spec.rb
+1
-1
No files found.
app/assets/javascripts/logs/stores/actions.js
View file @
f835649b
...
...
@@ -127,7 +127,7 @@ export const fetchEnvironments = ({ commit, dispatch }, environmentsPath) => {
return
axios
.
get
(
environmentsPath
)
.
then
(({
data
})
=>
{
commit
(
types
.
RECEIVE_ENVIRONMENTS_DATA_SUCCESS
,
data
.
environments
);
commit
(
types
.
RECEIVE_ENVIRONMENTS_DATA_SUCCESS
,
data
);
dispatch
(
'
fetchLogs
'
,
tracking
.
ENVIRONMENT_SELECTED
);
})
.
catch
(()
=>
{
...
...
app/helpers/environments_helper.rb
View file @
f835649b
...
...
@@ -34,7 +34,7 @@ module EnvironmentsHelper
def
environment_logs_data
(
project
,
environment
)
{
"environment_name"
:
environment
.
name
,
"environments_path"
:
project_environments_path
(
project
,
format: :json
),
"environments_path"
:
api_v4_projects_environments_path
(
id:
project
.
id
),
"environment_id"
:
environment
.
id
,
"cluster_applications_documentation_path"
=>
help_page_path
(
'user/clusters/applications.md'
,
anchor:
'elastic-stack'
),
"clusters_path"
:
project_clusters_path
(
project
,
format: :json
)
...
...
ee/spec/helpers/ee/environments_helper_spec.rb
View file @
f835649b
...
...
@@ -61,7 +61,7 @@ RSpec.describe EnvironmentsHelper do
it
'returns environment parameters data'
do
expect
(
subject
).
to
include
(
"environment_name"
:
environment
.
name
,
"environments_path"
:
project_environments_path
(
project
,
format: :json
)
"environments_path"
:
api_v4_projects_environments_path
(
id:
project
.
id
)
)
end
...
...
spec/frontend/logs/stores/actions_spec.js
View file @
f835649b
...
...
@@ -191,7 +191,7 @@ describe('Logs Store actions', () => {
});
it
(
'
should commit RECEIVE_ENVIRONMENTS_DATA_SUCCESS mutation on correct data
'
,
()
=>
{
mock
.
onGet
(
mockEnvironmentsEndpoint
).
replyOnce
(
200
,
{
environments
:
mockEnvironments
}
);
mock
.
onGet
(
mockEnvironmentsEndpoint
).
replyOnce
(
200
,
mockEnvironments
);
return
testAction
(
fetchEnvironments
,
mockEnvironmentsEndpoint
,
...
...
spec/helpers/environments_helper_spec.rb
View file @
f835649b
...
...
@@ -191,7 +191,7 @@ RSpec.describe EnvironmentsHelper do
it
'returns logs data'
do
expected_data
=
{
"environment_name"
:
environment
.
name
,
"environments_path"
:
project_environments_path
(
project
,
format: :json
),
"environments_path"
:
api_v4_projects_environments_path
(
id:
project
.
id
),
"environment_id"
:
environment
.
id
,
"cluster_applications_documentation_path"
=>
help_page_path
(
'user/clusters/applications.md'
,
anchor:
'elastic-stack'
),
"clusters_path"
:
project_clusters_path
(
project
,
format: :json
)
...
...
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