From 646d092c1ffff0d3e8c30009c987ce6b5cc84332 Mon Sep 17 00:00:00 2001 From: Sandeep Kumar Sharma Date: Thu, 1 Jul 2021 11:46:51 +0530 Subject: [PATCH 1/2] feat: adding link support for topology widget --- projects/dashboards/src/public-api.ts | 1 + .../topology-widget-renderer.component.ts | 6 ++++- .../widgets/topology/topology-widget.model.ts | 22 ++++++++++++++++++- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/projects/dashboards/src/public-api.ts b/projects/dashboards/src/public-api.ts index a785350dd..ddf7fcc75 100644 --- a/projects/dashboards/src/public-api.ts +++ b/projects/dashboards/src/public-api.ts @@ -18,5 +18,6 @@ export * from './widgets/widget-renderer'; export * from './widgets/interactive-data-widget-renderer'; export * from './widgets/header/widget-header.model'; export * from './widgets/container/container-widget.model'; +export * from './widgets/link/link-widget.model'; export * from './dashboard.module'; diff --git a/projects/observability/src/shared/dashboard/widgets/topology/topology-widget-renderer.component.ts b/projects/observability/src/shared/dashboard/widgets/topology/topology-widget-renderer.component.ts index bbd466543..51ecb7cb5 100644 --- a/projects/observability/src/shared/dashboard/widgets/topology/topology-widget-renderer.component.ts +++ b/projects/observability/src/shared/dashboard/widgets/topology/topology-widget-renderer.component.ts @@ -34,7 +34,11 @@ import { TopologyWidgetModel } from './topology-widget.model'; changeDetection: ChangeDetectionStrategy.OnPush, template: `
- +
diff --git a/projects/observability/src/shared/dashboard/widgets/topology/topology-widget.model.ts b/projects/observability/src/shared/dashboard/widgets/topology/topology-widget.model.ts index a4006b6d8..b81eb2368 100644 --- a/projects/observability/src/shared/dashboard/widgets/topology/topology-widget.model.ts +++ b/projects/observability/src/shared/dashboard/widgets/topology/topology-widget.model.ts @@ -1,4 +1,13 @@ -import { BOOLEAN_PROPERTY, Model, ModelApi, ModelProperty, STRING_PROPERTY } from '@hypertrace/hyperdash'; +import { LinkWidgetModel } from '@hypertrace/dashboards'; +import { + BOOLEAN_PROPERTY, + Model, + ModelApi, + ModelModelPropertyTypeInstance, + ModelProperty, + ModelPropertyType, + STRING_PROPERTY +} from '@hypertrace/hyperdash'; import { ModelInject, MODEL_API } from '@hypertrace/hyperdash-angular'; import { Observable } from 'rxjs'; import { TopologyData, TopologyDataSourceModel } from '../../data/graphql/topology/topology-data-source.model'; @@ -16,6 +25,17 @@ export class TopologyWidgetModel { }) public title?: string; + @ModelProperty({ + key: 'link', + required: false, + // tslint:disable-next-line: no-object-literal-type-assertion + type: { + key: ModelPropertyType.TYPE, + defaultModelClass: LinkWidgetModel + } as ModelModelPropertyTypeInstance + }) + public link?: LinkWidgetModel; + @ModelProperty({ key: 'showLegend', displayName: 'Show Legend', From 575ce17b7e2fd64b0791f67ced5e002e7b4b3c99 Mon Sep 17 00:00:00 2001 From: Sandeep Kumar Sharma Date: Thu, 1 Jul 2021 11:48:36 +0530 Subject: [PATCH 2/2] fix: console error for a test --- .../components/log-events/log-events-table.component.test.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/projects/distributed-tracing/src/shared/components/log-events/log-events-table.component.test.ts b/projects/distributed-tracing/src/shared/components/log-events/log-events-table.component.test.ts index ac311b73d..23c449c3d 100644 --- a/projects/distributed-tracing/src/shared/components/log-events/log-events-table.component.test.ts +++ b/projects/distributed-tracing/src/shared/components/log-events/log-events-table.component.test.ts @@ -29,14 +29,13 @@ describe('LogEventsTableComponent', () => { test('should render data correctly for sheet view', fakeAsync(() => { spectator = createHost( - ``, + ``, { hostProps: { logEvents: [ { attributes: { attr1: 1, attr2: 2 }, summary: 'test', timestamp: '2021-04-30T12:23:57.889149Z' } ], - logEventsTableViewType: LogEventsTableViewType.Condensed, - startTime: 1619785437887 + logEventsTableViewType: LogEventsTableViewType.Condensed } } );