fix: 修复终端统计组件字段名称错误
- 将 is_active 改为 is_online(与数据库表结构一致) - 更新描述文本从'激活'改为'在线'
This commit is contained in:
@@ -17,7 +17,7 @@ class TerminalStatsWidget extends BaseWidget
|
|||||||
{
|
{
|
||||||
// 统计终端数据
|
// 统计终端数据
|
||||||
$totalTerminals = Terminal::count();
|
$totalTerminals = Terminal::count();
|
||||||
$activeTerminals = Terminal::where('is_active', true)->count();
|
$onlineTerminals = Terminal::where('is_online', true)->count();
|
||||||
|
|
||||||
// 统计知识库关联
|
// 统计知识库关联
|
||||||
$totalKnowledgeBases = TerminalKnowledgeBase::count();
|
$totalKnowledgeBases = TerminalKnowledgeBase::count();
|
||||||
@@ -36,7 +36,7 @@ class TerminalStatsWidget extends BaseWidget
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
Stat::make('终端总数', $totalTerminals)
|
Stat::make('终端总数', $totalTerminals)
|
||||||
->description("{$activeTerminals} 个激活")
|
->description("{$onlineTerminals} 个在线")
|
||||||
->descriptionIcon('heroicon-m-computer-desktop')
|
->descriptionIcon('heroicon-m-computer-desktop')
|
||||||
->color('primary')
|
->color('primary')
|
||||||
->url(route('filament.admin.resources.terminals.index')),
|
->url(route('filament.admin.resources.terminals.index')),
|
||||||
|
|||||||
Reference in New Issue
Block a user