mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-12-26 01:35:58 +08:00
Compare commits
3 Commits
v0.6.11-al
...
v0.6.11-pr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4dbc2ad86d | ||
|
|
94479c2800 | ||
|
|
614903b524 |
@@ -85,7 +85,8 @@
|
|||||||
"test_all_started": "Channel testing started successfully, please refresh page to see results.",
|
"test_all_started": "Channel testing started successfully, please refresh page to see results.",
|
||||||
"delete_disabled_success": "Deleted all disabled channels, total: {{count}}",
|
"delete_disabled_success": "Deleted all disabled channels, total: {{count}}",
|
||||||
"balance_update_success": "Channel {{name}} balance updated successfully!",
|
"balance_update_success": "Channel {{name}} balance updated successfully!",
|
||||||
"all_balance_updated": "All enabled channel balances have been updated!"
|
"all_balance_updated": "All enabled channel balances have been updated!",
|
||||||
|
"operation_success": "Operation completed successfully!"
|
||||||
},
|
},
|
||||||
"edit": {
|
"edit": {
|
||||||
"title_edit": "Update Channel Information",
|
"title_edit": "Update Channel Information",
|
||||||
|
|||||||
@@ -85,7 +85,8 @@
|
|||||||
"test_all_started": "已成功开始测试渠道,请刷新页面查看结果。",
|
"test_all_started": "已成功开始测试渠道,请刷新页面查看结果。",
|
||||||
"delete_disabled_success": "已删除所有禁用渠道,共计 {{count}} 个",
|
"delete_disabled_success": "已删除所有禁用渠道,共计 {{count}} 个",
|
||||||
"balance_update_success": "渠道 {{name}} 余额更新成功!",
|
"balance_update_success": "渠道 {{name}} 余额更新成功!",
|
||||||
"all_balance_updated": "已更新完毕所有已启用渠道余额!"
|
"all_balance_updated": "已更新完毕所有已启用渠道余额!",
|
||||||
|
"operation_success": "操作成功完成!"
|
||||||
},
|
},
|
||||||
"edit": {
|
"edit": {
|
||||||
"title_edit": "更新渠道信息",
|
"title_edit": "更新渠道信息",
|
||||||
|
|||||||
@@ -1,19 +1,17 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, {useEffect, useState} from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import {useTranslation} from 'react-i18next';
|
||||||
import { Card, Grid, Header, Segment, Statistic } from 'semantic-ui-react';
|
import {Card, Grid} from 'semantic-ui-react';
|
||||||
import { API, showError } from '../../helpers';
|
|
||||||
import moment from 'moment';
|
|
||||||
import {
|
import {
|
||||||
LineChart,
|
Bar,
|
||||||
|
BarChart,
|
||||||
|
CartesianGrid,
|
||||||
|
Legend,
|
||||||
Line,
|
Line,
|
||||||
|
LineChart,
|
||||||
|
ResponsiveContainer,
|
||||||
|
Tooltip,
|
||||||
XAxis,
|
XAxis,
|
||||||
YAxis,
|
YAxis,
|
||||||
CartesianGrid,
|
|
||||||
Tooltip,
|
|
||||||
ResponsiveContainer,
|
|
||||||
BarChart,
|
|
||||||
Bar,
|
|
||||||
Legend,
|
|
||||||
} from 'recharts';
|
} from 'recharts';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import './Dashboard.css';
|
import './Dashboard.css';
|
||||||
@@ -244,7 +242,7 @@ const Dashboard = () => {
|
|||||||
<Card.Content>
|
<Card.Content>
|
||||||
<Card.Header>
|
<Card.Header>
|
||||||
{t('dashboard.charts.requests.title')}
|
{t('dashboard.charts.requests.title')}
|
||||||
<span className='stat-value'>{summaryData.todayRequests}</span>
|
{/* <span className='stat-value'>{summaryData.todayRequests}</span> */}
|
||||||
</Card.Header>
|
</Card.Header>
|
||||||
<div className='chart-container'>
|
<div className='chart-container'>
|
||||||
<ResponsiveContainer
|
<ResponsiveContainer
|
||||||
@@ -273,7 +271,7 @@ const Dashboard = () => {
|
|||||||
t('dashboard.charts.requests.tooltip'),
|
t('dashboard.charts.requests.tooltip'),
|
||||||
]}
|
]}
|
||||||
labelFormatter={(label) =>
|
labelFormatter={(label) =>
|
||||||
`${t('dashboard.tooltip.date')}: ${formatDate(label)}`
|
`${t('dashboard.statistics.tooltip.date')}: ${formatDate(label)}`
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Line
|
<Line
|
||||||
@@ -296,9 +294,9 @@ const Dashboard = () => {
|
|||||||
<Card.Content>
|
<Card.Content>
|
||||||
<Card.Header>
|
<Card.Header>
|
||||||
{t('dashboard.charts.quota.title')}
|
{t('dashboard.charts.quota.title')}
|
||||||
<span className='stat-value'>
|
{/* <span className='stat-value'>
|
||||||
${summaryData.todayQuota.toFixed(3)}
|
${summaryData.todayQuota.toFixed(3)}
|
||||||
</span>
|
</span> */}
|
||||||
</Card.Header>
|
</Card.Header>
|
||||||
<div className='chart-container'>
|
<div className='chart-container'>
|
||||||
<ResponsiveContainer
|
<ResponsiveContainer
|
||||||
@@ -327,7 +325,7 @@ const Dashboard = () => {
|
|||||||
t('dashboard.charts.quota.tooltip'),
|
t('dashboard.charts.quota.tooltip'),
|
||||||
]}
|
]}
|
||||||
labelFormatter={(label) =>
|
labelFormatter={(label) =>
|
||||||
`${t('dashboard.tooltip.date')}: ${formatDate(label)}`
|
`${t('dashboard.statistics.tooltip.date')}: ${formatDate(label)}`
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Line
|
<Line
|
||||||
@@ -350,7 +348,7 @@ const Dashboard = () => {
|
|||||||
<Card.Content>
|
<Card.Content>
|
||||||
<Card.Header>
|
<Card.Header>
|
||||||
{t('dashboard.charts.tokens.title')}
|
{t('dashboard.charts.tokens.title')}
|
||||||
<span className='stat-value'>{summaryData.todayTokens}</span>
|
{/* <span className='stat-value'>{summaryData.todayTokens}</span> */}
|
||||||
</Card.Header>
|
</Card.Header>
|
||||||
<div className='chart-container'>
|
<div className='chart-container'>
|
||||||
<ResponsiveContainer
|
<ResponsiveContainer
|
||||||
@@ -379,7 +377,7 @@ const Dashboard = () => {
|
|||||||
t('dashboard.charts.tokens.tooltip'),
|
t('dashboard.charts.tokens.tooltip'),
|
||||||
]}
|
]}
|
||||||
labelFormatter={(label) =>
|
labelFormatter={(label) =>
|
||||||
`${t('dashboard.tooltip.date')}: ${formatDate(label)}`
|
`${t('dashboard.statistics.tooltip.date')}: ${formatDate(label)}`
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Line
|
<Line
|
||||||
@@ -424,7 +422,7 @@ const Dashboard = () => {
|
|||||||
boxShadow: '0 2px 8px rgba(0,0,0,0.1)',
|
boxShadow: '0 2px 8px rgba(0,0,0,0.1)',
|
||||||
}}
|
}}
|
||||||
labelFormatter={(label) =>
|
labelFormatter={(label) =>
|
||||||
`${t('dashboard.tooltip.date')}: ${formatDate(label)}`
|
`${t('dashboard.statistics.tooltip.date')}: ${formatDate(label)}`
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<Legend
|
<Legend
|
||||||
|
|||||||
Reference in New Issue
Block a user