fix: image editor fit view incorrect, do not query gguf files when gguf unchecked
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { SimpleCard } from '@/components/card-wrapper/simple-card';
|
||||
import PageTools from '@/components/page-tools';
|
||||
import { ExportOutlined } from '@ant-design/icons';
|
||||
import { useIntl } from '@umijs/max';
|
||||
@@ -95,11 +94,11 @@ const UsageInner: FC<{ paddingRight: string }> = ({ paddingRight }) => {
|
||||
{intl.formatMessage({ id: 'common.button.export' })}
|
||||
</Button>
|
||||
</FilterWrapper>
|
||||
<SimpleCard
|
||||
{/* <SimpleCard
|
||||
dataList={dataList}
|
||||
height={80}
|
||||
bordered={true}
|
||||
></SimpleCard>
|
||||
></SimpleCard> */}
|
||||
<RequestTokenInner
|
||||
requestData={requestTokenData.requestData}
|
||||
xAxisData={requestTokenData.xAxisData}
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import CardWrapper from '@/components/card-wrapper';
|
||||
import { SimpleCard } from '@/components/card-wrapper/simple-card';
|
||||
import MixLineBar from '@/components/echarts/mix-line-bar';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import dayjs from 'dayjs';
|
||||
import React from 'react';
|
||||
import { baseColorMap } from '../../config';
|
||||
|
||||
interface RequestTokenInnerProps {
|
||||
requestData: {
|
||||
@@ -22,9 +23,24 @@ const labelFormatter = (v: any) => {
|
||||
};
|
||||
|
||||
const dataList = [
|
||||
{ label: '100M', value: 'Completion Tokens' },
|
||||
{ label: '50M', value: 'Prompt Tokens' },
|
||||
{ label: '120K', value: 'API Requests' }
|
||||
{
|
||||
label: '100M',
|
||||
value: 'Completion Tokens',
|
||||
iconType: 'roundRect',
|
||||
color: baseColorMap.base
|
||||
},
|
||||
{
|
||||
label: '50M',
|
||||
value: 'Prompt Tokens',
|
||||
iconType: 'roundRect',
|
||||
color: baseColorMap.baseR3
|
||||
},
|
||||
{
|
||||
label: '120K',
|
||||
value: 'API Requests',
|
||||
iconType: 'circle',
|
||||
color: baseColorMap.baseR1
|
||||
}
|
||||
];
|
||||
|
||||
const legendData = [
|
||||
@@ -35,31 +51,10 @@ const legendData = [
|
||||
|
||||
const RequestTokenInner: React.FC<RequestTokenInnerProps> = (props) => {
|
||||
const { requestData, tokenData, xAxisData } = props;
|
||||
const intl = useIntl();
|
||||
|
||||
return (
|
||||
<CardWrapper style={{ width: '100%' }}>
|
||||
{/* <Row style={{ width: '100%' }}>
|
||||
<Col span={12}>
|
||||
<LineChart
|
||||
title={intl.formatMessage({ id: 'dashboard.apirequest' })}
|
||||
seriesData={requestData}
|
||||
xAxisData={xAxisData}
|
||||
height={360}
|
||||
labelFormatter={labelFormatter}
|
||||
></LineChart>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
<BarChart
|
||||
title={intl.formatMessage({ id: 'dashboard.tokens' })}
|
||||
seriesData={tokenData}
|
||||
xAxisData={xAxisData}
|
||||
height={360}
|
||||
labelFormatter={labelFormatter}
|
||||
></BarChart>
|
||||
</Col>
|
||||
</Row> */}
|
||||
{/* <SimpleCard dataList={dataList} height={80}></SimpleCard> */}
|
||||
<SimpleCard dataList={dataList} height={80}></SimpleCard>
|
||||
<MixLineBar
|
||||
chartData={{
|
||||
line: requestData,
|
||||
|
||||
@@ -13,7 +13,7 @@ const TopUser: React.FC<TopUserProps> = (props) => {
|
||||
|
||||
return (
|
||||
<CardWrapper>
|
||||
<HBar seriesData={userData} xAxisData={topUserList} height={512}></HBar>
|
||||
<HBar seriesData={userData} xAxisData={topUserList} height={496}></HBar>
|
||||
</CardWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
import dayjs from 'dayjs';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
const baseColorMap = {
|
||||
baseL2: 'rgba(13,171,219,0.8)',
|
||||
baseL1: 'rgba(0,34,255,0.8)',
|
||||
base: 'rgba(0,85,255,0.8)',
|
||||
baseR1: 'rgba(0,255,233,0.8)',
|
||||
baseR2: 'rgba(48,0,255,0.8)',
|
||||
baseR3: 'rgba(85,167,255,0.8)'
|
||||
};
|
||||
import { baseColorMap } from '../../config';
|
||||
|
||||
interface RequestTokenData {
|
||||
requestData: {
|
||||
|
||||
@@ -70,3 +70,12 @@ export const exportTableColumns = [
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
export const baseColorMap = {
|
||||
baseL2: 'rgba(13,171,219,0.8)',
|
||||
baseL1: 'rgba(0,34,255,0.8)',
|
||||
base: 'rgba(0,85,255,0.8)',
|
||||
baseR1: 'rgba(0,255,233,0.8)',
|
||||
baseR2: 'rgba(48,0,255,0.8)',
|
||||
baseR3: 'rgba(85,167,255,0.8)'
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user