chore: replace components with core-ui, upgrade eslint
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
import AutoTooltip from '@/components/auto-tooltip';
|
||||
import PageTools from '@/components/page-tools';
|
||||
import { modelCategoriesMap } from '@/pages/llmodels/config';
|
||||
import { convertFileSize } from '@/utils';
|
||||
import { AutoTooltip, PageTools } from '@gpustack/core-ui';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Col, Row, Table } from 'antd';
|
||||
import { useContext } from 'react';
|
||||
import { DashboardContext } from '../config/dashboard-context';
|
||||
|
||||
const NACategories = [
|
||||
modelCategoriesMap.llm,
|
||||
modelCategoriesMap.embedding,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import LineChart from '@/components/echarts/line-chart';
|
||||
import { LineChart } from '@gpustack/core-ui';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import dayjs from 'dayjs';
|
||||
import _ from 'lodash';
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
import CardWrapper from '@/components/card-wrapper';
|
||||
import GaugeChart from '@/components/echarts/gauge';
|
||||
import PageTools from '@/components/page-tools';
|
||||
import BaseSelect from '@/components/seal-form/base/select';
|
||||
import { queryClusterList } from '@/pages/cluster-management/apis';
|
||||
import {
|
||||
BaseSelect,
|
||||
CardWrapper,
|
||||
GaugeChart,
|
||||
PageTools
|
||||
} from '@gpustack/core-ui';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Col, Row } from 'antd';
|
||||
import _ from 'lodash';
|
||||
import { useContext, useEffect, useMemo, useState } from 'react';
|
||||
import { DashboardContext } from '../config/dashboard-context';
|
||||
import ResourceUtilization from './resource-utilization';
|
||||
|
||||
const smallChartHeight = 190;
|
||||
const largeChartHeight = 400;
|
||||
const resourceChartHeight = 400;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import AutoTooltip from '@/components/auto-tooltip';
|
||||
import ModalFooter from '@/components/modal-footer';
|
||||
import ScrollerModal from '@/components/scroller-modal';
|
||||
import { exportJsonToExcel } from '@/utils/excel-reader';
|
||||
import { AutoTooltip, ModalFooter, ScrollerModal } from '@gpustack/core-ui';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Table, TableColumnType } from 'antd';
|
||||
import dayjs from 'dayjs';
|
||||
@@ -10,7 +8,6 @@ import { DASHBOARD_USAGE_API } from '../../apis';
|
||||
import { TableRow } from '../../config/types';
|
||||
import FilterBar from './filter-bar';
|
||||
import useUsageData from './use-usage-data';
|
||||
|
||||
const ExportData: React.FC<{
|
||||
open: boolean;
|
||||
onCancel: () => void;
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import AutoTooltip from '@/components/auto-tooltip';
|
||||
import SealCascader from '@/components/seal-form/seal-cascader';
|
||||
import SimpleSelect from '@/components/seal-form/simple-select';
|
||||
import ProviderLogo from '@/pages/maas-provider/components/provider-logo';
|
||||
import { DownloadOutlined } from '@ant-design/icons';
|
||||
import {
|
||||
AutoTooltip,
|
||||
Cascader as SealCascader,
|
||||
SimpleSelect
|
||||
} from '@gpustack/core-ui';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { Button, DatePicker, Tooltip } from 'antd';
|
||||
import dayjs from 'dayjs';
|
||||
@@ -10,7 +12,6 @@ import React from 'react';
|
||||
import { DASHBOARD_STATS_API } from '../../apis';
|
||||
import useRangePickerPreset from '../../hooks/use-rangepicker-preset';
|
||||
import FilterBarCss from '../../styles/filter-bar.less';
|
||||
|
||||
const DefaultDateConfig = {
|
||||
maxRange: 60,
|
||||
defaultRange: 29
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import CardWrapper from '@/components/card-wrapper';
|
||||
import { SimpleCard } from '@/components/card-wrapper/simple-card';
|
||||
import MixLineBar from '@/components/echarts/mix-line-bar';
|
||||
import { formatLargeNumber } from '@/utils';
|
||||
import { CardWrapper, MixLineBarChart, SimpleCard } from '@gpustack/core-ui';
|
||||
import { Button } from 'antd';
|
||||
import dayjs from 'dayjs';
|
||||
import React, { useMemo } from 'react';
|
||||
@@ -103,7 +101,7 @@ const RequestTokenInner: React.FC<RequestTokenInnerProps> = (props) => {
|
||||
<CardWrapperBox>
|
||||
<CardWrapper style={{ width: '100%', position: 'relative' }}>
|
||||
<SimpleCard dataList={totalData} height={80}></SimpleCard>
|
||||
<MixLineBar
|
||||
<MixLineBarChart
|
||||
chartData={{
|
||||
line: requestData,
|
||||
bar: tokenData
|
||||
@@ -114,7 +112,7 @@ const RequestTokenInner: React.FC<RequestTokenInnerProps> = (props) => {
|
||||
smooth={false}
|
||||
legendData={legendData}
|
||||
labelFormatter={labelFormatter}
|
||||
></MixLineBar>
|
||||
></MixLineBarChart>
|
||||
</CardWrapper>
|
||||
</CardWrapperBox>
|
||||
);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import CardWrapper from '@/components/card-wrapper';
|
||||
import HBar from '@/components/echarts/h-bar';
|
||||
import { CardWrapper, HBarChart } from '@gpustack/core-ui';
|
||||
import React from 'react';
|
||||
|
||||
interface TopUserProps {
|
||||
@@ -13,12 +12,12 @@ const TopUser: React.FC<TopUserProps> = (props) => {
|
||||
|
||||
return (
|
||||
<CardWrapper>
|
||||
<HBar
|
||||
<HBarChart
|
||||
seriesData={userData}
|
||||
xAxisData={topUserList}
|
||||
height={440}
|
||||
maxItems={10}
|
||||
></HBar>
|
||||
></HBarChart>
|
||||
</CardWrapper>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user