feat: 自定义仪表板,添加知识库和终端统计组件
- 创建自定义 Dashboard 页面替换默认仪表板 - 新增 KnowledgeBaseStatsWidget 显示知识库统计信息 - 文档总数、转换完成数、转换失败数、处理中数量 - 知识库分组数量 - 转换成功率计算 - 新增 TerminalStatsWidget 显示终端统计信息 - 终端总数和激活状态 - 知识库关联数、提示词配置数 - 今日同步成功/失败统计 - 移除默认的 FilamentInfoWidget - 统计卡片支持点击跳转到相关管理页面
This commit is contained in:
25
app/Filament/Pages/Dashboard.php
Normal file
25
app/Filament/Pages/Dashboard.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Filament\Pages;
|
||||
|
||||
use Filament\Pages\Dashboard as BaseDashboard;
|
||||
|
||||
class Dashboard extends BaseDashboard
|
||||
{
|
||||
protected static ?string $navigationLabel = '仪表板';
|
||||
|
||||
protected static ?string $title = '仪表板';
|
||||
|
||||
public function getWidgets(): array
|
||||
{
|
||||
return [
|
||||
\App\Filament\Widgets\KnowledgeBaseStatsWidget::class,
|
||||
\App\Filament\Widgets\TerminalStatsWidget::class,
|
||||
];
|
||||
}
|
||||
|
||||
public function getColumns(): int | string | array
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user