diff --git a/frontend/app/components/Dashboard/components/MetricsList/ListView.tsx b/frontend/app/components/Dashboard/components/MetricsList/ListView.tsx index 7b92e4e7b..9b3c52d00 100644 --- a/frontend/app/components/Dashboard/components/MetricsList/ListView.tsx +++ b/frontend/app/components/Dashboard/components/MetricsList/ListView.tsx @@ -1,20 +1,19 @@ import React, { useState, useMemo } from 'react'; -import { Checkbox, Table, Typography } from 'antd'; +import { Checkbox, Table, Typography, Switch, Tag, Tooltip } from 'antd'; import MetricListItem from '../MetricListItem'; import { TablePaginationConfig, SorterResult } from 'antd/lib/table/interface'; import Widget from 'App/mstore/types/widget'; -import { LockOutlined, TeamOutlined } from ".store/@ant-design-icons-virtual-981121729b/package"; -import { Switch, Tag, Tooltip } from ".store/antd-virtual-9b6c8c01be/package"; +import { LockOutlined, TeamOutlined } from "@ant-design/icons"; const { Text } = Typography; -// interface Metric { -// metricId: number; -// name: string; -// owner: string; -// lastModified: string; -// visibility: string; -// } +interface Metric { + metricId: number; + name: string; + owner: string; + lastModified: string; + visibility: string; +} interface Props { list: Widget[]; diff --git a/frontend/app/components/Dashboard/components/WidgetOptions.tsx b/frontend/app/components/Dashboard/components/WidgetOptions.tsx index 8f92eb904..1aeb71b92 100644 --- a/frontend/app/components/Dashboard/components/WidgetOptions.tsx +++ b/frontend/app/components/Dashboard/components/WidgetOptions.tsx @@ -60,20 +60,22 @@ function WidgetOptions() { metric.metricOf != FilterKey.USERID && metric.metricOf != FilterKey.ERRORS && ( handleChange(info.key) - }} - > - + trigger={['click']} + menu={{ + selectable: true, + items: [ + { key: 'sessionCount', label: 'All Sessions' }, + { key: 'userCount', label: 'Unique Users' }, + ], + onClick: (info: { key: string }) => handleChange(info.key), + }} + > + )} {hasViewTypes ? : null} @@ -102,8 +104,10 @@ const SeriesTypeOptions = observer(({ metric }: { metric: any }) => { key, label: (
- {chartIcons[key]} -
{name}
+ <> + {chartIcons[key]} +
{name}
+
), })), @@ -112,11 +116,16 @@ const SeriesTypeOptions = observer(({ metric }: { metric: any }) => { }, }} > - @@ -167,9 +176,11 @@ const WidgetViewTypeOptions = observer(({ metric }: { metric: any }) => { items: allowedTypes[metric.metricType].map((key) => ({ key, label: ( -
- {chartIcons[key]} -
{chartTypes[key]}
+
+ <> + {chartIcons[key]} +
{chartTypes[key]}
+
), })), @@ -177,13 +188,17 @@ const WidgetViewTypeOptions = observer(({ metric }: { metric: any }) => { metric.updateKey('viewType', key); }, }} - > - diff --git a/frontend/app/components/Dashboard/components/WidgetView/CardViewMenu.tsx b/frontend/app/components/Dashboard/components/WidgetView/CardViewMenu.tsx index 51fcee429..5d3911320 100644 --- a/frontend/app/components/Dashboard/components/WidgetView/CardViewMenu.tsx +++ b/frontend/app/components/Dashboard/components/WidgetView/CardViewMenu.tsx @@ -1,4 +1,3 @@ -// Components/CardViewMenu.tsx import { useHistory } from 'react-router'; import { useStore } from 'App/mstore'; import { observer } from 'mobx-react-lite'; diff --git a/frontend/package.json b/frontend/package.json index 5e7c32e7f..189140af1 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -46,7 +46,7 @@ "jshint": "^2.11.1", "jspdf": "^2.5.1", "lottie-react": "^2.4.0", - "lucide-react": "^0.454.0", + "lucide-react": "0.454.0", "luxon": "^3.5.0", "microdiff": "^1.4.0", "mobx": "^6.13.3", diff --git a/frontend/yarn.lock b/frontend/yarn.lock index f3e479cf7..173942145 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -10637,12 +10637,12 @@ __metadata: languageName: node linkType: hard -"lucide-react@npm:^0.396.0": - version: 0.396.0 - resolution: "lucide-react@npm:0.396.0" +"lucide-react@npm:0.454.0": + version: 0.454.0 + resolution: "lucide-react@npm:0.454.0" peerDependencies: - react: ^16.5.1 || ^17.0.0 || ^18.0.0 - checksum: 10c1/f07aa9b36cf50488120893d9e7b6198927fb0dfce09a78a8e1c3051754d5a822f5b06088abd398a78c8b70b3723da5209e2b35eb0744f2f53e6c1995d9d885f2 + react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc + checksum: 10c1/74a826345610813f909a52e0c74c4ec374fb3c23fdae598670a7b80001610672afc97b7e887546164e7464e5ba69e2eb386ba1dbfbca73e4cb1f707a9a69dc3c languageName: node linkType: hard @@ -11624,7 +11624,7 @@ __metadata: jshint: "npm:^2.11.1" jspdf: "npm:^2.5.1" lottie-react: "npm:^2.4.0" - lucide-react: "npm:^0.396.0" + lucide-react: "npm:0.454.0" luxon: "npm:^3.5.0" microdiff: "npm:^1.4.0" mini-css-extract-plugin: "npm:^2.6.0"