diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-11 15:06:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-11 15:06:42 +0000 |
commit | 7071f9bf3e131a7a668922ee450da529f1866b6f (patch) | |
tree | 590371b44d47d428f2826b600d7fab4f10520051 /app/assets/javascripts/error_tracking/store/actions.js | |
parent | 16bd8409bcb61d2331227d1df539c40683b6bda3 (diff) | |
download | gitlab-ce-7071f9bf3e131a7a668922ee450da529f1866b6f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/error_tracking/store/actions.js')
-rw-r--r-- | app/assets/javascripts/error_tracking/store/actions.js | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/app/assets/javascripts/error_tracking/store/actions.js b/app/assets/javascripts/error_tracking/store/actions.js deleted file mode 100644 index 1e754a4f54f..00000000000 --- a/app/assets/javascripts/error_tracking/store/actions.js +++ /dev/null @@ -1,52 +0,0 @@ -import Service from '../services'; -import * as types from './mutation_types'; -import createFlash from '~/flash'; -import Poll from '~/lib/utils/poll'; -import { __, sprintf } from '~/locale'; - -let eTagPoll; - -export function startPolling({ commit, dispatch }, endpoint) { - eTagPoll = new Poll({ - resource: Service, - method: 'getErrorList', - data: { endpoint }, - successCallback: ({ data }) => { - if (!data) { - return; - } - commit(types.SET_ERRORS, data.errors); - commit(types.SET_EXTERNAL_URL, data.external_url); - commit(types.SET_LOADING, false); - dispatch('stopPolling'); - }, - errorCallback: ({ response }) => { - let errorMessage = ''; - if (response && response.data && response.data.message) { - errorMessage = response.data.message; - } - commit(types.SET_LOADING, false); - createFlash( - sprintf(__(`Failed to load errors from Sentry. Error message: %{errorMessage}`), { - errorMessage, - }), - ); - }, - }); - - eTagPoll.makeRequest(); -} - -export const stopPolling = () => { - if (eTagPoll) eTagPoll.stop(); -}; - -export function restartPolling({ commit }) { - commit(types.SET_ERRORS, []); - commit(types.SET_EXTERNAL_URL, ''); - commit(types.SET_LOADING, true); - - if (eTagPoll) eTagPoll.restart(); -} - -export default () => {}; |