diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-04 21:10:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-04 21:10:08 +0300 |
commit | f9ddf689da1edc68c81444a25b3b0d3841382c56 (patch) | |
tree | ecab18b41b8cbca55acfc09b19478e1d7af6160a /app/assets/javascripts/serverless | |
parent | d4194db620cc5b736bb5737ed5e4eab979ccd7ab (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/serverless')
-rw-r--r-- | app/assets/javascripts/serverless/store/actions.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/assets/javascripts/serverless/store/actions.js b/app/assets/javascripts/serverless/store/actions.js index a6c0380a789..166cd796680 100644 --- a/app/assets/javascripts/serverless/store/actions.js +++ b/app/assets/javascripts/serverless/store/actions.js @@ -1,4 +1,4 @@ -import { deprecatedCreateFlash as createFlash } from '~/flash'; +import createFlash from '~/flash'; import axios from '~/lib/utils/axios_utils'; import { backOff } from '~/lib/utils/common_utils'; import statusCodes from '~/lib/utils/http_status'; @@ -59,7 +59,9 @@ export const fetchFunctions = ({ dispatch }, { functionsPath }) => { .then((data) => { if (data === TIMEOUT) { dispatch('receiveFunctionsTimeout'); - createFlash(__('Loading functions timed out. Please reload the page to try again.')); + createFlash({ + message: __('Loading functions timed out. Please reload the page to try again.'), + }); } else if (data.functions !== null && data.functions.length) { dispatch('receiveFunctionsSuccess', data); } else { @@ -68,7 +70,9 @@ export const fetchFunctions = ({ dispatch }, { functionsPath }) => { }) .catch((error) => { dispatch('receiveFunctionsError', error); - createFlash(error); + createFlash({ + message: error, + }); }); }; @@ -120,6 +124,8 @@ export const fetchMetrics = ({ dispatch }, { metricsPath, hasPrometheus }) => { }) .catch((error) => { dispatch('receiveMetricsError', error); - createFlash(error); + createFlash({ + message: error, + }); }); }; |