Skip to content

Commit d5b3958

Browse files
committed
scope & groups types
1 parent f70ee2e commit d5b3958

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

web/src/model/flow-query.ts

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,18 @@ export type PacketLoss = 'dropped' | 'hasDrops' | 'sent' | 'all';
88
export type MetricFunction = 'count' | 'sum' | 'avg' | 'min' | 'max' | 'p90' | 'p99' | 'rate';
99
export type StatFunction = MetricFunction | 'last';
1010
export type MetricType = 'Flows' | 'DnsFlows' | Field;
11-
export type FlowScope = 'app' | 'cluster' | 'zone' | 'host' | 'namespace' | 'owner' | 'resource' | string;
11+
// scope are configurable and can be any string
12+
// such as 'app', 'cluster', 'zone', 'host', 'namespace', 'owner', 'resource'...
13+
export type FlowScope = string;
1214
export type AggregateBy = FlowScope | Field;
1315
export type NodeType = FlowScope | 'unknown';
14-
export type Groups =
15-
| 'clusters'
16-
| 'clusters+zones'
17-
| 'clusters+hosts'
18-
| 'clusters+namespaces'
19-
| 'clusters+owners'
20-
| 'zones'
21-
| 'zones+hosts'
22-
| 'zones+namespaces'
23-
| 'zones+owners'
24-
| 'hosts'
25-
| 'hosts+namespaces'
26-
| 'hosts+owners'
27-
| 'namespaces'
28-
| 'namespaces+owners'
29-
| 'owners'
30-
| string;
16+
// groups are configurable and can be any string
17+
// such as 'clusters', 'clusters+zones', 'clusters+hosts', 'clusters+namespaces', 'clusters+owners',
18+
// 'zones', 'zones+hosts', 'zones+namespaces', 'zones+owners',
19+
// 'hosts', 'hosts+namespaces', 'hosts+owners',
20+
// 'namespaces', 'namespaces+owners',
21+
// 'owners'...
22+
export type Groups = string;
3123

3224
export interface FlowQuery {
3325
timeRange?: number;

0 commit comments

Comments
 (0)