Skip to content

Commit 586fa33

Browse files
committed
Add sort/filter attributes to repos
1 parent 4a9e213 commit 586fa33

77 files changed

Lines changed: 2146 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/Restify/AccessPointRepository.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,38 @@ class AccessPointRepository extends Repository
2222
'mac_addr',
2323
];
2424

25+
public static array $match = [
26+
'device_id' => 'integer',
27+
'name' => 'text',
28+
'radio_number' => 'integer',
29+
'type' => 'text',
30+
'mac_addr' => 'text',
31+
'channel' => 'integer',
32+
'txpow' => 'integer',
33+
'radioutil' => 'integer',
34+
'numasoclients' => 'integer',
35+
'nummonclients' => 'integer',
36+
'numactbssid' => 'integer',
37+
'nummonbssid' => 'integer',
38+
'interference' => 'integer',
39+
];
40+
41+
public static array $sort = [
42+
'device_id',
43+
'name',
44+
'radio_number',
45+
'type',
46+
'mac_addr',
47+
'channel',
48+
'txpow',
49+
'radioutil',
50+
'numasoclients',
51+
'nummonclients',
52+
'numactbssid',
53+
'nummonbssid',
54+
'interference',
55+
];
56+
2557
public static function related(): array
2658
{
2759
return [

app/Restify/AlertLogRepository.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,20 @@ class AlertLogRepository extends Repository
1515

1616
public static string $title = 'id';
1717

18+
public static array $match = [
19+
'device_id' => 'integer',
20+
'rule_id' => 'integer',
21+
'state' => 'integer',
22+
'time_logged' => 'datetime',
23+
];
24+
25+
public static array $sort = [
26+
'device_id',
27+
'rule_id',
28+
'state',
29+
'time_logged',
30+
];
31+
1832
public static function related(): array
1933
{
2034
return [

app/Restify/AlertRepository.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,24 @@ class AlertRepository extends Repository
2020

2121
public static array $search = [];
2222

23+
public static array $match = [
24+
'device_id' => 'integer',
25+
'rule_id' => 'integer',
26+
'state' => 'integer',
27+
'alerted' => 'integer',
28+
'open' => 'integer',
29+
'timestamp' => 'datetime',
30+
];
31+
32+
public static array $sort = [
33+
'device_id',
34+
'rule_id',
35+
'state',
36+
'alerted',
37+
'open',
38+
'timestamp',
39+
];
40+
2341
public static function related(): array
2442
{
2543
return [

app/Restify/AlertRuleRepository.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,20 @@ class AlertRuleRepository extends Repository
1818
'name',
1919
];
2020

21+
public static array $match = [
22+
'name' => 'text',
23+
'severity' => 'text',
24+
'disabled' => 'integer',
25+
'invert_map' => 'integer',
26+
];
27+
28+
public static array $sort = [
29+
'name',
30+
'severity',
31+
'disabled',
32+
'invert_map',
33+
];
34+
2135
public static function related(): array
2236
{
2337
return [

app/Restify/AlertScheduleRepository.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,22 @@ class AlertScheduleRepository extends Repository
1717
'title',
1818
];
1919

20+
public static array $match = [
21+
'title' => 'text',
22+
'recurring' => 'integer',
23+
'start' => 'datetime',
24+
'end' => 'datetime',
25+
'status' => 'text',
26+
];
27+
28+
public static array $sort = [
29+
'title',
30+
'recurring',
31+
'start',
32+
'end',
33+
'status',
34+
];
35+
2036
public function fields(RestifyRequest $request): array
2137
{
2238
return [

app/Restify/AlertTemplateRepository.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,16 @@ class AlertTemplateRepository extends Repository
1717
'name',
1818
];
1919

20+
public static array $match = [
21+
'name' => 'text',
22+
'title' => 'text',
23+
];
24+
25+
public static array $sort = [
26+
'name',
27+
'title',
28+
];
29+
2030
public function fields(RestifyRequest $request): array
2131
{
2232
return [

app/Restify/AlertTransportRepository.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ class AlertTransportRepository extends Repository
1717
'transport_name',
1818
];
1919

20+
public static array $match = [
21+
'transport_name' => 'text',
22+
'transport_type' => 'text',
23+
'is_default' => 'bool',
24+
];
25+
26+
public static array $sort = [
27+
'transport_name',
28+
'transport_type',
29+
'is_default',
30+
];
31+
2032
public function fields(RestifyRequest $request): array
2133
{
2234
return [

app/Restify/ApplicationRepository.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,24 @@ class ApplicationRepository extends Repository
2222
'app_instance',
2323
];
2424

25+
public static array $match = [
26+
'device_id' => 'integer',
27+
'app_type' => 'text',
28+
'app_instance' => 'text',
29+
'app_status' => 'text',
30+
'app_state' => 'text',
31+
'discovered' => 'integer',
32+
];
33+
34+
public static array $sort = [
35+
'device_id',
36+
'app_type',
37+
'app_instance',
38+
'app_status',
39+
'app_state',
40+
'discovered',
41+
];
42+
2543
public static function related(): array
2644
{
2745
return [

app/Restify/AuthLogRepository.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,20 @@ class AuthLogRepository extends Repository
1919
'address',
2020
];
2121

22+
public static array $match = [
23+
'datetime' => 'datetime',
24+
'user' => 'text',
25+
'address' => 'text',
26+
'result' => 'text',
27+
];
28+
29+
public static array $sort = [
30+
'datetime',
31+
'user',
32+
'address',
33+
'result',
34+
];
35+
2236
public function fields(RestifyRequest $request): array
2337
{
2438
return [

app/Restify/AvailabilityRepository.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ class AvailabilityRepository extends Repository
1717

1818
public static string $title = 'duration';
1919

20+
public static array $match = [
21+
'device_id' => 'integer',
22+
'duration' => 'integer',
23+
'availability_perc' => 'integer',
24+
];
25+
26+
public static array $sort = [
27+
'device_id',
28+
'duration',
29+
'availability_perc',
30+
];
31+
2032
public function fields(RestifyRequest $request): array
2133
{
2234
return [

0 commit comments

Comments
 (0)