@centreon/ui 24.10.30 → 24.10.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centreon/ui",
3
- "version": "24.10.30",
3
+ "version": "24.10.31",
4
4
  "description": "Centreon UI Components",
5
5
  "scripts": {
6
6
  "update:deps": "pnpx npm-check-updates -i --format group",
@@ -9,7 +9,7 @@ import { getColorFromDataAndTresholds } from '../common/utils';
9
9
  import AnimatedPie from './AnimatedPie';
10
10
  import { thresholdThickness } from './Thresholds';
11
11
  import { GaugeProps } from './models';
12
- import { angles } from './utils';
12
+ import { getAngles } from './utils';
13
13
 
14
14
  const dataThickness = 45;
15
15
 
@@ -43,7 +43,7 @@ const PieData = ({
43
43
 
44
44
  return (
45
45
  <Pie
46
- {...angles}
46
+ {...getAngles()}
47
47
  data={pieData}
48
48
  innerRadius={radius - dataThickness * dataThicknessFactor}
49
49
  outerRadius={
@@ -6,7 +6,7 @@ import { useTheme } from '@mui/material';
6
6
 
7
7
  import AnimatedPie from './AnimatedPie';
8
8
  import { GaugeProps } from './models';
9
- import { angles } from './utils';
9
+ import { getAngles } from './utils';
10
10
 
11
11
  export const thresholdThickness = 12;
12
12
 
@@ -90,7 +90,7 @@ const Thresholds = ({
90
90
  <>
91
91
  {arcs.map(({ thresholdArc, thresholdScaleOrdinal }) => (
92
92
  <Pie
93
- {...angles}
93
+ {...getAngles()}
94
94
  data={thresholdArc}
95
95
  innerRadius={radius - thresholdThickness * thresholdThicknessFactor}
96
96
  key={`arc-${thresholdArc[0].name}`}
@@ -1,4 +1,12 @@
1
- export const angles = {
2
- endAngle: -(2 * Math.PI) / 3,
3
- startAngle: (2 * Math.PI) / 3
4
- };
1
+ import { includes } from 'ramda';
2
+
3
+ export const getAngles = () =>
4
+ includes('Firefox', window.navigator.userAgent)
5
+ ? {
6
+ endAngle: (2 * Math.PI) / 3,
7
+ startAngle: -(2 * Math.PI) / 3
8
+ }
9
+ : {
10
+ endAngle: -(2 * Math.PI) / 3,
11
+ startAngle: (2 * Math.PI) / 3
12
+ };