diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-11 03:09:41 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-12-11 03:09:41 +0300 |
commit | d15f01ae2667094ed69f875cc65ce4c8aa34481b (patch) | |
tree | 216ffe30f1c5801b5df58edd59aed61ccfb68dbe /app/assets/javascripts/jobs | |
parent | e109a7799eb2c5598211c4cc1e0c83d5beb44018 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/jobs')
-rw-r--r-- | app/assets/javascripts/jobs/store/actions.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/jobs/store/actions.js b/app/assets/javascripts/jobs/store/actions.js index 04c2e6653d8..cac9dc06284 100644 --- a/app/assets/javascripts/jobs/store/actions.js +++ b/app/assets/javascripts/jobs/store/actions.js @@ -90,7 +90,7 @@ export const fetchJob = ({ state, dispatch }) => { if (!Visibility.hidden()) { // This check is needed to ensure the loading icon // is not shown for a finished job during a visibility change - if (!isTraceReadyForRender) { + if (!isTraceReadyForRender && state.job.started) { dispatch('startPollingTrace'); } dispatch('restartPolling'); @@ -258,7 +258,7 @@ export const receiveJobsForStageError = ({ commit }) => { flash(__('An error occurred while fetching the jobs.')); }; -export const triggerManualJob = ({ state }, variables) => { +export const triggerManualJob = ({ state, dispatch }, variables) => { const parsedVariables = variables.map(variable => { const copyVar = { ...variable }; delete copyVar.id; @@ -269,5 +269,6 @@ export const triggerManualJob = ({ state }, variables) => { .post(state.job.status.action.path, { job_variables_attributes: parsedVariables, }) + .then(() => dispatch('fetchTrace')) .catch(() => flash(__('An error occurred while triggering the job.'))); }; |