[修改]删除了updatetoetcd的page页面、widget排布
This commit is contained in:
@@ -7,7 +7,9 @@ use Filament\Widgets\ChartWidget;
|
||||
|
||||
class PrometheusMemory extends ChartWidget
|
||||
{
|
||||
protected static ?string $heading = 'Chart';
|
||||
protected static ?int $sort = 3;
|
||||
|
||||
protected static ?string $heading = '内存占用率';
|
||||
|
||||
protected function getData(): array
|
||||
{
|
||||
@@ -34,7 +36,7 @@ class PrometheusMemory extends ChartWidget
|
||||
'labels' => $labels,
|
||||
'datasets' => [
|
||||
[
|
||||
'label' => 'Memory Usage (%)',
|
||||
'label' => '内存占用率 (%)',
|
||||
'data' => $data,
|
||||
'borderColor' => '#4CAF50',
|
||||
'backgroundColor' => 'rgba(76, 175, 80, 0.2)',
|
||||
|
||||
@@ -11,6 +11,8 @@ use Spatie\Activitylog\ActivityLogStatus;
|
||||
|
||||
class UpdateConfigWidget extends Widget
|
||||
{
|
||||
protected static ?int $sort = 2;
|
||||
|
||||
protected static string $view = 'filament.widgets.update-config-widget';
|
||||
|
||||
public function updateSettingsToEtcd()
|
||||
|
||||
@@ -43,8 +43,9 @@ class AdminPanelProvider extends PanelProvider
|
||||
->widgets([
|
||||
Widgets\AccountWidget::class,
|
||||
// Widgets\FilamentInfoWidget::class,
|
||||
UpdateConfigWidget::class,
|
||||
PrometheusMemory::class,
|
||||
UpdateConfigWidget::class,
|
||||
|
||||
])
|
||||
->middleware([
|
||||
EncryptCookies::class,
|
||||
@@ -59,8 +60,6 @@ class AdminPanelProvider extends PanelProvider
|
||||
])
|
||||
->authMiddleware([
|
||||
Authenticate::class,
|
||||
])->resources([
|
||||
config('filament-logger.activity_resource')
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<x-filament::page>
|
||||
<form wire:submit.prevent="updateSettingsToEtcd" class="space-y-6">
|
||||
{{$this->form }}
|
||||
<div class="flex flex-wrap items-center gap-4 justify-start">
|
||||
<x-filament::button type="submit">
|
||||
导出配置到ETCD
|
||||
</x-filament::button>
|
||||
</div>
|
||||
</form>
|
||||
</x-filament::page>
|
||||
Reference in New Issue
Block a user