Skip to content

Commit dbe74ab

Browse files
authored
[Feature] Add Healhty to export and comments to column (alexjustesen#1856)
* Add Healhty to export and comments to column * remove label * Remove from table
1 parent d71000f commit dbe74ab

File tree

2 files changed

+26
-9
lines changed

2 files changed

+26
-9
lines changed

app/Filament/Exports/ResultExporter.php

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,39 +71,48 @@ public static function getColumns(): array
7171
ExportColumn::make('download_jitter')
7272
->state(function (Result $record): ?string {
7373
return $record->download_jitter;
74-
}),
74+
})
75+
->enabledByDefault(false),
7576
ExportColumn::make('upload_jitter')
7677
->state(function (Result $record): ?string {
7778
return $record->upload_jitter;
78-
}),
79+
})
80+
->enabledByDefault(false),
7981
ExportColumn::make('ping_jitter')
8082
->state(function (Result $record): ?string {
8183
return $record->ping_jitter;
82-
}),
84+
})
85+
->enabledByDefault(false),
8386
ExportColumn::make('upload_latency_high')
8487
->state(function (Result $record): ?string {
8588
return $record->upload_latency_high;
86-
}),
89+
})
90+
->enabledByDefault(false),
8791
ExportColumn::make('upload_latency_low')
8892
->state(function (Result $record): ?string {
8993
return $record->upload_latency_low;
90-
}),
94+
})
95+
->enabledByDefault(false),
9196
ExportColumn::make('upload_latency_avg')
9297
->state(function (Result $record): ?string {
9398
return $record->upload_latency_iqm;
94-
}),
99+
})
100+
->enabledByDefault(false),
95101
ExportColumn::make('download_latency_high')
96102
->state(function (Result $record): ?string {
97103
return $record->download_latency_high;
98-
}),
104+
})
105+
->enabledByDefault(false),
99106
ExportColumn::make('download_latency_low')
100107
->state(function (Result $record): ?string {
101108
return $record->download_latency_low;
102-
}),
109+
})
110+
->enabledByDefault(false),
103111
ExportColumn::make('download_latency_avg')
104112
->state(function (Result $record): ?string {
105113
return $record->download_latency_iqm;
106-
}),
114+
})
115+
->enabledByDefault(false),
107116
ExportColumn::make('result_url')
108117
->state(function (Result $record) {
109118
return $record->result_url;
@@ -118,6 +127,11 @@ public static function getColumns(): array
118127
->state(function (Result $record): string {
119128
return $record->scheduled ? 'Yes' : 'No';
120129
}),
130+
ExportColumn::make('healthy')
131+
->state(function (Result $record): string {
132+
return $record->healthy ? 'Yes' : 'No';
133+
})
134+
->enabledByDefault(false),
121135
ExportColumn::make('created_at'),
122136
ExportColumn::make('updated_at')
123137
->enabledByDefault(false),

app/Filament/Resources/ResultResource.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,11 @@ public static function form(Form $form): Form
139139
->content(fn (Result $result): ?string => $result->server_location),
140140
Forms\Components\Placeholder::make('server_host')
141141
->content(fn (Result $result): ?string => $result->server_host),
142+
Forms\Components\Placeholder::make('comment')
143+
->content(fn (Result $result): ?string => $result->comments),
142144
Forms\Components\Checkbox::make('scheduled'),
143145
Forms\Components\Checkbox::make('healthy'),
146+
144147
])
145148
->columns(1)
146149
->columnSpan([

0 commit comments

Comments
 (0)