Skip to content

Commit a4c299c

Browse files
authored
Make Traces editable columns filterable for all data types that support it (#1434)
* feat: configure editable column types to show quick filters if supported * style: prettier
1 parent 46173bf commit a4c299c

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

projects/observability/src/pages/explorer/explorer-dashboard-builder.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,7 @@ export class ExplorerDashboardBuilder {
304304
title: 'API Boundary Type',
305305
width: '1',
306306
visible: false,
307+
filterable: true,
307308
value: {
308309
type: 'attribute-specification',
309310
attribute: 'apiBoundaryType'
@@ -317,6 +318,7 @@ export class ExplorerDashboardBuilder {
317318
title: 'API Discovery State',
318319
width: '1',
319320
visible: false,
321+
filterable: true,
320322
value: {
321323
type: 'attribute-specification',
322324
attribute: 'apiDiscoveryState'
@@ -330,6 +332,7 @@ export class ExplorerDashboardBuilder {
330332
title: 'API ID',
331333
width: '1',
332334
visible: false,
335+
filterable: true,
333336
value: {
334337
type: 'attribute-specification',
335338
attribute: 'apiId'
@@ -343,6 +346,7 @@ export class ExplorerDashboardBuilder {
343346
title: 'Entry Span ID',
344347
width: '1',
345348
visible: false,
349+
filterable: true,
346350
value: {
347351
type: 'attribute-specification',
348352
attribute: 'apiTraceId'
@@ -356,6 +360,7 @@ export class ExplorerDashboardBuilder {
356360
title: 'Service ID',
357361
width: '1',
358362
visible: false,
363+
filterable: true,
359364
value: {
360365
type: 'attribute-specification',
361366
attribute: 'serviceId'
@@ -369,6 +374,7 @@ export class ExplorerDashboardBuilder {
369374
title: 'Trace ID',
370375
width: '1',
371376
visible: false,
377+
filterable: true,
372378
value: {
373379
type: 'attribute-specification',
374380
attribute: 'traceId'
@@ -382,6 +388,7 @@ export class ExplorerDashboardBuilder {
382388
title: 'Request URL',
383389
width: '1',
384390
visible: false,
391+
filterable: true,
385392
value: {
386393
type: 'attribute-specification',
387394
attribute: 'requestUrl'
@@ -504,6 +511,7 @@ export class ExplorerDashboardBuilder {
504511
{
505512
type: 'table-widget-column',
506513
visible: false,
514+
filterable: true,
507515
value: {
508516
type: 'attribute-specification',
509517
attribute: 'traceId'

projects/observability/src/shared/dashboard/widgets/table/services/table-widget-columns.service.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ export class TableWidgetColumnsService {
5555
width: '1',
5656
visible: false,
5757
editable: true,
58-
filterable: this.isFilterable(attribute),
58+
filterable: this.isFilterable(attribute.type),
5959
specification: new SpecificationBuilder().attributeSpecificationForKey(attribute.name)
6060
};
6161
}
6262

63-
private isFilterable(attribute: AttributeMetadata): boolean {
64-
return this.filterBuilderLookupService.isBuildableType(toFilterAttributeType(attribute.type));
63+
private isFilterable(type?: AttributeMetadataType): boolean {
64+
return type === undefined ? false : this.filterBuilderLookupService.isBuildableType(toFilterAttributeType(type));
6565
}
6666

6767
private lookupDisplayType(type: AttributeMetadataType): string {

0 commit comments

Comments
 (0)