We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc4dae6 commit 437cfd0Copy full SHA for 437cfd0
portal-ui/src/screens/Console/Dashboard/Prometheus/Widgets/LinearGraphWidget.tsx
@@ -180,16 +180,21 @@ const LinearGraphWidget = ({
180
const onHover = () => {
181
setHover(true);
182
};
183
+
184
const onStopHover = () => {
185
setHover(false);
186
187
188
useEffect(() => {
- var dateFormatData = data;
- dateFormatData.forEach((element: any) => {
189
- var date = new Date(element.name * 1000);
190
- element.name = date;
+ const fmtData = data.map((el: any) => {
+ const date = new Date(el?.name * 1000);
191
+ return {
192
+ ...el,
193
+ name: date,
194
+ };
195
});
- setCsvData(dateFormatData);
196
197
+ setCsvData(fmtData);
198
}, [data]);
199
200
const linearConfiguration = result
0 commit comments