diff --git a/web/src/components/line-chart/index.tsx b/web/src/components/line-chart/index.tsx index 6c032206f..81ae954b7 100644 --- a/web/src/components/line-chart/index.tsx +++ b/web/src/components/line-chart/index.tsx @@ -50,9 +50,10 @@ const data = [ interface IProps extends CategoricalChartProps { data?: Array<{ xAxis: string; yAxis: number }>; + showLegend?: boolean; } -const RagLineChart = ({ data }: IProps) => { +const RagLineChart = ({ data, showLegend = false }: IProps) => { return ( { - + {showLegend && } { + const { t } = useTranslate('chat'); + const chartList = useSelectChartStatsList(); + const list = + chartList[statsType]?.map((x) => ({ + ...x, + xAxis: formatDate(x.xAxis), + })) ?? []; + + return ( +
+ {t(camelCase(statsType))} + +
+ ); +}; + const ChatOverviewModal = ({ visible, hideModal, dialog, }: IModalProps & { dialog: IDialog }) => { const { t } = useTranslate('chat'); - const chartList = useSelectChartStatsList(); const { visible: apiKeyVisible, hideModal: hideApiKeyModal, @@ -53,6 +70,8 @@ const ChatOverviewModal = ({ title={t('overview')} open={visible} onCancel={hideModal} + cancelButtonProps={{ style: { display: 'none' } }} + onOk={hideModal} width={'100vw'} > @@ -76,14 +95,8 @@ const ChatOverviewModal = ({ - + - {t('publicUrl')} - {/* - {urlWithToken} - - - */} @@ -101,12 +114,12 @@ const ChatOverviewModal = ({ />
- {Object.keys(chartList).map((x) => ( -
- {t(camelCase(x))} - -
- ))} + + + + + +
= { omit(payload, ['dialogId']), ); if (data.retcode === 0) { + message.success(i18n.t('message.deleted')); yield put({ type: 'listToken', payload: { dialog_id: payload.dialogId },