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
73ef5f7d
Commit
73ef5f7d
authored
Jun 03, 2020
by
Dhiraj Bodicherla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Track pod logs refresh action
This MR adds a snowplow event for pod logs refresh action
parent
7324b46c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
4 deletions
+16
-4
app/assets/javascripts/logs/components/environment_logs.vue
app/assets/javascripts/logs/components/environment_logs.vue
+2
-2
app/assets/javascripts/logs/constants.js
app/assets/javascripts/logs/constants.js
+1
-0
app/assets/javascripts/logs/stores/actions.js
app/assets/javascripts/logs/stores/actions.js
+5
-0
app/assets/javascripts/logs/stores/mutation_types.js
app/assets/javascripts/logs/stores/mutation_types.js
+1
-0
changelogs/unreleased/track-pod-logs-refresh-action.yml
changelogs/unreleased/track-pod-logs-refresh-action.yml
+5
-0
spec/frontend/logs/components/environment_logs_spec.js
spec/frontend/logs/components/environment_logs_spec.js
+2
-2
No files found.
app/assets/javascripts/logs/components/environment_logs.vue
View file @
73ef5f7d
...
...
@@ -91,7 +91,7 @@ export default {
'
setInitData
'
,
'
showEnvironment
'
,
'
fetchEnvironments
'
,
'
fetch
Logs
'
,
'
refreshPod
Logs
'
,
'
fetchMoreLogsPrepend
'
,
'
dismissRequestEnvironmentsError
'
,
'
dismissInvalidTimeRangeWarning
'
,
...
...
@@ -204,7 +204,7 @@ export default {
ref=
"scrollButtons"
class=
"flex-grow-0 pr-2 mb-2 controllers"
:scroll-down-button-disabled=
"scrollDownButtonDisabled"
@
refresh=
"
fetch
Logs()"
@
refresh=
"
refreshPod
Logs()"
@
scrollDown=
"scrollDown"
/>
</div>
...
...
app/assets/javascripts/logs/constants.js
View file @
73ef5f7d
...
...
@@ -7,4 +7,5 @@ export const tracking = {
POD_LOG_CHANGED
:
'
pod_log_changed
'
,
TIME_RANGE_SET
:
'
time_range_set
'
,
ENVIRONMENT_SELECTED
:
'
environment_selected
'
,
REFRESH_POD_LOGS
:
'
refresh_pod_logs
'
,
};
app/assets/javascripts/logs/stores/actions.js
View file @
73ef5f7d
...
...
@@ -100,6 +100,11 @@ export const showEnvironment = ({ dispatch, commit }, environmentName) => {
dispatch
(
'
fetchLogs
'
,
tracking
.
ENVIRONMENT_SELECTED
);
};
export
const
refreshPodLogs
=
({
dispatch
,
commit
})
=>
{
commit
(
types
.
REFRESH_POD_LOGS
);
dispatch
(
'
fetchLogs
'
,
tracking
.
REFRESH_POD_LOGS
);
};
/**
* Fetch environments data and initial logs
* @param {Object} store
...
...
app/assets/javascripts/logs/stores/mutation_types.js
View file @
73ef5f7d
...
...
@@ -19,6 +19,7 @@ export const REQUEST_LOGS_DATA_PREPEND = 'REQUEST_LOGS_DATA_PREPEND';
export
const
RECEIVE_LOGS_DATA_PREPEND_SUCCESS
=
'
RECEIVE_LOGS_DATA_PREPEND_SUCCESS
'
;
export
const
RECEIVE_LOGS_DATA_PREPEND_ERROR
=
'
RECEIVE_LOGS_DATA_PREPEND_ERROR
'
;
export
const
HIDE_REQUEST_LOGS_ERROR
=
'
HIDE_REQUEST_LOGS_ERROR
'
;
export
const
REFRESH_POD_LOGS
=
'
REFRESH_POD_LOGS
'
;
export
const
RECEIVE_PODS_DATA_SUCCESS
=
'
RECEIVE_PODS_DATA_SUCCESS
'
;
export
const
RECEIVE_PODS_DATA_ERROR
=
'
RECEIVE_PODS_DATA_ERROR
'
;
changelogs/unreleased/track-pod-logs-refresh-action.yml
0 → 100644
View file @
73ef5f7d
---
title
:
Track pod logs refresh action
merge_request
:
33802
author
:
type
:
added
spec/frontend/logs/components/environment_logs_spec.js
View file @
73ef5f7d
...
...
@@ -301,11 +301,11 @@ describe('EnvironmentLogs', () => {
});
it
(
'
refresh button, trace is refreshed
'
,
()
=>
{
expect
(
dispatch
).
not
.
toHaveBeenCalledWith
(
`
${
module
}
/
fetch
Logs`
,
undefined
);
expect
(
dispatch
).
not
.
toHaveBeenCalledWith
(
`
${
module
}
/
refreshPod
Logs`
,
undefined
);
findLogControlButtons
().
vm
.
$emit
(
'
refresh
'
);
expect
(
dispatch
).
toHaveBeenCalledWith
(
`
${
module
}
/
fetch
Logs`
,
undefined
);
expect
(
dispatch
).
toHaveBeenCalledWith
(
`
${
module
}
/
refreshPod
Logs`
,
undefined
);
});
});
});
...
...
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