diff options
Diffstat (limited to 'app/assets/javascripts/serverless/store/actions.js')
-rw-r--r-- | app/assets/javascripts/serverless/store/actions.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/app/assets/javascripts/serverless/store/actions.js b/app/assets/javascripts/serverless/store/actions.js index b9d57138efa..acd7020f70f 100644 --- a/app/assets/javascripts/serverless/store/actions.js +++ b/app/assets/javascripts/serverless/store/actions.js @@ -30,7 +30,7 @@ export const receiveMetricsError = ({ commit }, error) => export const fetchFunctions = ({ dispatch }, { functionsPath }) => { let retryCount = 0; - const functionsPartiallyFetched = data => { + const functionsPartiallyFetched = (data) => { if (data.functions !== null && data.functions.length) { dispatch('receiveFunctionsPartial', data); } @@ -41,7 +41,7 @@ export const fetchFunctions = ({ dispatch }, { functionsPath }) => { backOff((next, stop) => { axios .get(functionsPath) - .then(response => { + .then((response) => { if (response.data.knative_installed === CHECKING_INSTALLED) { retryCount += 1; if (retryCount < MAX_REQUESTS) { @@ -56,7 +56,7 @@ export const fetchFunctions = ({ dispatch }, { functionsPath }) => { }) .catch(stop); }) - .then(data => { + .then((data) => { if (data === TIMEOUT) { dispatch('receiveFunctionsTimeout'); createFlash(__('Loading functions timed out. Please reload the page to try again.')); @@ -66,7 +66,7 @@ export const fetchFunctions = ({ dispatch }, { functionsPath }) => { dispatch('receiveFunctionsNoDataSuccess', data); } }) - .catch(error => { + .catch((error) => { dispatch('receiveFunctionsError', error); createFlash(error); }); @@ -83,7 +83,7 @@ export const fetchMetrics = ({ dispatch }, { metricsPath, hasPrometheus }) => { backOff((next, stop) => { axios .get(metricsPath) - .then(response => { + .then((response) => { if (response.status === statusCodes.NO_CONTENT) { retryCount += 1; if (retryCount < MAX_REQUESTS) { @@ -98,15 +98,15 @@ export const fetchMetrics = ({ dispatch }, { metricsPath, hasPrometheus }) => { }) .catch(stop); }) - .then(data => { + .then((data) => { if (data === null) { return; } const updatedMetric = data.metrics; - const queries = data.metrics.queries.map(query => ({ + const queries = data.metrics.queries.map((query) => ({ ...query, - result: query.result.map(result => ({ + result: query.result.map((result) => ({ ...result, values: result.values.map(([timestamp, value]) => ({ time: new Date(timestamp * 1000).toISOString(), @@ -118,7 +118,7 @@ export const fetchMetrics = ({ dispatch }, { metricsPath, hasPrometheus }) => { updatedMetric.queries = queries; dispatch('receiveMetricsSuccess', updatedMetric); }) - .catch(error => { + .catch((error) => { dispatch('receiveMetricsError', error); createFlash(error); }); |