Skip to content

Commit a487c41

Browse files
committed
fix: allow entity datasources to allow toggling includeInactive query property
1 parent d8f87b6 commit a487c41

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

projects/observability/src/shared/dashboard/data/graphql/entity/entities-values-data-source.model.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ModelProperty, NUMBER_PROPERTY } from '@hypertrace/hyperdash';
1+
import { BOOLEAN_PROPERTY, ModelProperty, NUMBER_PROPERTY } from '@hypertrace/hyperdash';
22
import { Observable } from 'rxjs';
33
import { map } from 'rxjs/operators';
44
import { EntityType } from '../../../../graphql/model/schema/entity';
@@ -16,6 +16,12 @@ export abstract class EntitiesValuesDataSourceModel extends GraphQlDataSourceMod
1616
protected abstract specification: Specification;
1717
protected abstract entityType: EntityType;
1818

19+
@ModelProperty({
20+
key: 'includeInactive',
21+
type: BOOLEAN_PROPERTY.type
22+
})
23+
public includeInactive: boolean = false;
24+
1925
@ModelProperty({
2026
key: 'limit',
2127
type: NUMBER_PROPERTY.type
@@ -38,7 +44,8 @@ export abstract class EntitiesValuesDataSourceModel extends GraphQlDataSourceMod
3844
limit: this.limit,
3945
properties: [specification],
4046
timeRange: this.getTimeRangeOrThrow(),
41-
filters: inheritedFilters
47+
filters: inheritedFilters,
48+
includeInactive: this.includeInactive
4249
};
4350
}
4451
}

0 commit comments

Comments
 (0)