diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-05 09:08:40 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-05 09:08:40 +0300 |
commit | 09f1028092f0580a26667ff67747f7ab0f759d56 (patch) | |
tree | d12fd30f4d828b740437ad9ffac0f9f2fa4a9d46 /app/assets/javascripts/logs | |
parent | 40054c1c8fc861249c5705bbb165f22deb7ac5c2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/logs')
4 files changed, 9 insertions, 2 deletions
diff --git a/app/assets/javascripts/logs/components/environment_logs.vue b/app/assets/javascripts/logs/components/environment_logs.vue index 838652f7210..01a4cbd41f6 100644 --- a/app/assets/javascripts/logs/components/environment_logs.vue +++ b/app/assets/javascripts/logs/components/environment_logs.vue @@ -91,7 +91,7 @@ export default { 'setInitData', 'showEnvironment', 'fetchEnvironments', - 'fetchLogs', + 'refreshPodLogs', '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="fetchLogs()" + @refresh="refreshPodLogs()" @scrollDown="scrollDown" /> </div> diff --git a/app/assets/javascripts/logs/constants.js b/app/assets/javascripts/logs/constants.js index 2bca1ecfd38..f83d369c6b8 100644 --- a/app/assets/javascripts/logs/constants.js +++ b/app/assets/javascripts/logs/constants.js @@ -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', }; diff --git a/app/assets/javascripts/logs/stores/actions.js b/app/assets/javascripts/logs/stores/actions.js index 79fde1c7f2b..d828e8f8a3e 100644 --- a/app/assets/javascripts/logs/stores/actions.js +++ b/app/assets/javascripts/logs/stores/actions.js @@ -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 diff --git a/app/assets/javascripts/logs/stores/mutation_types.js b/app/assets/javascripts/logs/stores/mutation_types.js index c1cc7eca52e..9010ec51817 100644 --- a/app/assets/javascripts/logs/stores/mutation_types.js +++ b/app/assets/javascripts/logs/stores/mutation_types.js @@ -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'; |