Merge branch 'develop' into pranshuchittora/fix/custom-legend-for-empty-metrics

This commit is contained in:
Palash 2022-07-01 11:38:21 +05:30 committed by GitHub
commit 6fa0209104
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -102,6 +102,11 @@ export const AxiosAlertManagerInstance = axios.create({
export const ApiV2Instance = axios.create({ export const ApiV2Instance = axios.create({
baseURL: `${ENVIRONMENT.baseURL}${apiV2}`, baseURL: `${ENVIRONMENT.baseURL}${apiV2}`,
}); });
ApiV2Instance.interceptors.response.use(
interceptorsResponse,
interceptorRejected,
);
ApiV2Instance.interceptors.request.use(interceptorsRequestResponse);
AxiosAlertManagerInstance.interceptors.response.use( AxiosAlertManagerInstance.interceptors.response.use(
interceptorsResponse, interceptorsResponse,

View File

@ -7,17 +7,13 @@ export const getYAxisFormattedValue = (
let decimalPrecision: number | undefined; let decimalPrecision: number | undefined;
const parsedValue = getValueFormat(format)( const parsedValue = getValueFormat(format)(
parseFloat(value), parseFloat(value),
12, undefined,
12, undefined,
undefined, undefined,
); );
try { try {
const decimalSplitted = parsedValue.text.split('.'); const decimalSplitted = parsedValue.text.split('.');
if ( if (decimalSplitted.length === 1) {
decimalSplitted.length === 1 ||
parseFloat(parsedValue.text) === parseInt(parsedValue.text, 10)
) {
decimalPrecision = 0; decimalPrecision = 0;
} else { } else {
const decimalDigits = decimalSplitted[1].split(''); const decimalDigits = decimalSplitted[1].split('');