Skip to content

Commit 015d2c8

Browse files
committed
feat: add more ui friendly filter options
Adds the ability to filter by dispatch ID and type in the ListMicrogridDispatches endpoint. Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent c08f291 commit 015d2c8

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

RELEASE_NOTES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
## New Features
2020

21+
- In the `DispatchFilter` message, new fields `dispatch_ids`, and `queries` were added to allow filtering dispatches by ID and a free-text search query across the `id` and `type` fields.
22+
2123
<!-- Here goes the main new features and examples or instructions on how to use them -->
2224

2325
## Bug Fixes

proto/frequenz/api/dispatch/v1/dispatch.proto

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,23 @@ message DispatchFilter {
301301

302302
// Optional filter by update time
303303
frequenz.api.common.v1alpha8.types.Interval update_time_interval = 8;
304+
305+
// Optional filter by dispatch IDs.
306+
// If this field is not set, dispatches with any ID will be included.
307+
// Multiple IDs are combined with an OR relationship.
308+
repeated uint64 dispatch_ids = 9;
309+
310+
// Optional free-text search filter.
311+
//
312+
// This filter is applied to the dispatch `id` and `type` fields.
313+
// The `queries` filter combines multiple queries with an OR relationship.
314+
//
315+
// ID tokens are preceded by a `#` so we can tell if an id is intended or a type.
316+
//
317+
// - input of [`#4`] will match only the record with id of `4`
318+
// - input of [`bar`] will match `bar` and `foobar`
319+
// - input of [`#4`, `#24`, `bar`, `foo`] will match ids of `4` and `24` and types `foo` `bar` `foobar` `foolish bartender`
320+
repeated string queries = 10;
304321
}
305322

306323
// Parameter for controlling which components a dispatch applies to

0 commit comments

Comments
 (0)