refactor: remove syncing

This commit is contained in:
2026-03-16 13:56:10 +08:00
parent 58f42de9df
commit 8d30a0419d
18 changed files with 25 additions and 954 deletions

View File

@@ -43,24 +43,16 @@ class ViewTerminal extends ViewRecord
])
->columns(2),
Infolists\Components\Section::make('组态配置')
Infolists\Components\Section::make('组态配置')
->schema([
Infolists\Components\TextEntry::make('diagram_url')
->label('组态图URL')
->label('组态界面地址')
->copyable()
->placeholder('未设置')
->url(fn ($state) => $state)
->url(fn($state) => $state)
->openUrlInNewTab(),
]),
Infolists\Components\Section::make('显示配置')
->schema([
Infolists\Components\KeyValueEntry::make('display_config')
->label('显示参数')
->keyLabel('参数名称')
->valueLabel('参数值'),
]),
Infolists\Components\Section::make('知识库关联')
->schema([
Infolists\Components\RepeatableEntry::make('knowledgeBases')
@@ -103,49 +95,6 @@ class ViewTerminal extends ViewRecord
])
->columns(2),
Infolists\Components\Section::make('同步历史')
->schema([
Infolists\Components\RepeatableEntry::make('syncLogs')
->label('同步记录')
->schema([
Infolists\Components\TextEntry::make('status')
->label('状态')
->badge()
->formatStateUsing(fn (string $state): string => match ($state) {
'pending' => '待同步',
'syncing' => '同步中',
'synced' => '已同步',
'failed' => '失败',
default => '未知',
})
->color(fn (string $state): string => match ($state) {
'pending' => 'warning',
'syncing' => 'info',
'synced' => 'success',
'failed' => 'danger',
default => 'gray',
}),
Infolists\Components\TextEntry::make('created_at')
->label('创建时间')
->dateTime('Y-m-d H:i:s'),
Infolists\Components\TextEntry::make('synced_at')
->label('同步完成时间')
->dateTime('Y-m-d H:i:s')
->placeholder('未完成'),
Infolists\Components\TextEntry::make('error_message')
->label('错误信息')
->placeholder('无')
->color('danger')
->columnSpanFull(),
])
->columns(3)
->placeholder('暂无同步记录')
->contained(false),
])
->description('显示最近的配置同步记录,按时间倒序排列')
->collapsible()
->collapsed(),
Infolists\Components\Section::make('时间信息')
->schema([
Infolists\Components\TextEntry::make('created_at')