diff --git a/frontend/src/api/index.ts b/frontend/src/api/index.ts index 82f4bdc010..b59a224cdc 100644 --- a/frontend/src/api/index.ts +++ b/frontend/src/api/index.ts @@ -102,6 +102,11 @@ export const AxiosAlertManagerInstance = axios.create({ export const ApiV2Instance = axios.create({ baseURL: `${ENVIRONMENT.baseURL}${apiV2}`, }); +ApiV2Instance.interceptors.response.use( + interceptorsResponse, + interceptorRejected, +); +ApiV2Instance.interceptors.request.use(interceptorsRequestResponse); AxiosAlertManagerInstance.interceptors.response.use( interceptorsResponse, diff --git a/frontend/src/components/Graph/yAxisConfig.ts b/frontend/src/components/Graph/yAxisConfig.ts index 44377b6fc5..5d1eeb5da7 100644 --- a/frontend/src/components/Graph/yAxisConfig.ts +++ b/frontend/src/components/Graph/yAxisConfig.ts @@ -7,17 +7,13 @@ export const getYAxisFormattedValue = ( let decimalPrecision: number | undefined; const parsedValue = getValueFormat(format)( parseFloat(value), - 12, - 12, + undefined, + undefined, undefined, ); - try { const decimalSplitted = parsedValue.text.split('.'); - if ( - decimalSplitted.length === 1 || - parseFloat(parsedValue.text) === parseInt(parsedValue.text, 10) - ) { + if (decimalSplitted.length === 1) { decimalPrecision = 0; } else { const decimalDigits = decimalSplitted[1].split('');