Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
0f2af0c
feat: brusha dded to cartesian chart
jyothishjose6190 Sep 27, 2021
549f224
feat: cartesian chart select(brush)
jyothishjose6190 Sep 27, 2021
8530baa
feat: cartesian drilldown - completed
jyothishjose6190 Sep 28, 2021
46e458d
feat: cartesian drilldown - model and interaction handler added
jyothishjose6190 Oct 6, 2021
07ee0a2
feat: timerange drilldown
jyothishjose6190 Oct 9, 2021
bc87e54
feat: timerange drilldown
jyothishjose6190 Oct 9, 2021
9aa0c21
feat: cartesian drilldown select method changed
jyothishjose6190 Oct 18, 2021
32182d4
feat: cartesian drilldown select method changed
jyothishjose6190 Oct 18, 2021
434295b
feat: cartesian drilldown select method changed
jyothishjose6190 Oct 18, 2021
51f77ee
feat: cartesian drilldown - test cases added
jyothishjose6190 Oct 20, 2021
51a42a3
feat: cartesian drilldown - test cases added
jyothishjose6190 Oct 20, 2021
f34823c
feat: cartesian drilldown - test cases added
jyothishjose6190 Oct 20, 2021
bcff653
feat: cartesian drilldown - test cases added
jyothishjose6190 Oct 21, 2021
69142df
feat: cartesian drilldown - test cases added
jyothishjose6190 Oct 21, 2021
8863cee
feat: cartesian drilldown - test cases added
jyothishjose6190 Oct 22, 2021
36f6370
feat: context menu added
jyothishjose6190 Oct 25, 2021
6a94b79
feat: context menu added
jyothishjose6190 Oct 25, 2021
1b0638e
feat: context menu added
jyothishjose6190 Oct 28, 2021
0e2a82a
feat: selected points are converted to timestamp
jyothishjose6190 Nov 2, 2021
3b595cf
feat: context menu moved to renderer component
jyothishjose6190 Nov 3, 2021
2436cec
feat: context menu location changed
jyothishjose6190 Nov 3, 2021
b91cf4e
feat: context menu location changed
jyothishjose6190 Nov 3, 2021
60de5f0
feat: context menu location changed
jyothishjose6190 Nov 3, 2021
6d7b684
feat: context menu moved to interaction handler
jyothishjose6190 Nov 11, 2021
a86efe9
feat: fixed lint issues
jyothishjose6190 Nov 11, 2021
06a1479
feat: updated test cases
jyothishjose6190 Nov 11, 2021
450c6ad
feat: updated show contxt menu
jyothishjose6190 Nov 17, 2021
da4413b
feat: cartesian drilldown - showing context menu optionally
jyothishjose6190 Nov 17, 2021
8e05d70
feat: cartesian chart - test cases updated
jyothishjose6190 Nov 18, 2021
c961d97
feat: cartesian chart - test cases updated
jyothishjose6190 Nov 18, 2021
7982ef9
feat: cartesian chart - test cases updated
jyothishjose6190 Nov 18, 2021
1e7e16f
feat: cartesian chart - test cases updated
jyothishjose6190 Nov 18, 2021
c694b6b
feat: cartesian chart - test cases updated
jyothishjose6190 Nov 18, 2021
d28b8e8
feat: cartesian drilldown comments
jyothishjose6190 Nov 30, 2021
8433204
feat: cartesian drilldown comments
jyothishjose6190 Dec 1, 2021
e83a51b
feat: cartesia chart update bug fixed
jyothishjose6190 Dec 1, 2021
2c4f9be
feat: context menu test cases updated
jyothishjose6190 Dec 7, 2021
5c5dc7a
feat: context menu test cases updated
jyothishjose6190 Dec 7, 2021
0907153
feat: context menu test cases updated
jyothishjose6190 Dec 7, 2021
dbca607
feat: merge conflict fixed
jyothishjose6190 Dec 7, 2021
a6f6fad
feat: set time range option added
jyothishjose6190 Jan 5, 2022
82ea0d2
feat: context menu navigation handler added
jyothishjose6190 Jan 10, 2022
8f39e00
feat: updated imports and test cases
jyothishjose6190 Jan 14, 2022
35fa74f
feat: updated imports and test cases
jyothishjose6190 Jan 17, 2022
3017b4f
feat: updated imports and test cases
jyothishjose6190 Jan 17, 2022
1c71ad6
feat: updated imports and test cases
jyothishjose6190 Jan 17, 2022
f3e86aa
feat: updated imports and test cases
jyothishjose6190 Jan 17, 2022
f224c1b
feat: updated imports and test cases
jyothishjose6190 Jan 19, 2022
e5e3731
feat: updated imports and test cases
jyothishjose6190 Jan 19, 2022
3a1b067
feat: updated imports and test cases
jyothishjose6190 Jan 20, 2022
78513fd
Merge branch 'main' into cartesian_drilldown
jyothishjose6190 Jan 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions projects/common/src/time/time-range.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,11 @@ describe('Time range service', () => {
});
});
});

test('returns custom time filter', () => {
const spectator = buildService();
expect(spectator.service.toQueryParams(new Date(1642296703000), new Date(1642396703000))).toStrictEqual({
['time']: new FixedTimeRange(new Date(1642296703000), new Date(1642396703000)).toUrlString()
});
});
});
10 changes: 9 additions & 1 deletion projects/common/src/time/time-range.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core';
import { isEmpty } from 'lodash-es';
import { EMPTY, ReplaySubject } from 'rxjs';
import { catchError, defaultIfEmpty, filter, map, switchMap, take } from 'rxjs/operators';
import { NavigationService } from '../navigation/navigation.service';
import { NavigationService, QueryParamObject } from '../navigation/navigation.service';
import { ReplayObservable } from '../utilities/rxjs/rxjs-utils';
import { FixedTimeRange } from './fixed-time-range';
import { RelativeTimeRange } from './relative-time-range';
Expand Down Expand Up @@ -110,4 +110,12 @@ export class TimeRangeService {
public static toFixedTimeRange(startTime: Date, endTime: Date): FixedTimeRange {
return new FixedTimeRange(startTime, endTime);
}

public toQueryParams(startTime: Date, endTime: Date): QueryParamObject {
const newTimeRange = new FixedTimeRange(startTime, endTime);

return {
[TimeRangeService.TIME_RANGE_QUERY_PARAM]: newTimeRange.toUrlString()
};
}
}
5 changes: 5 additions & 0 deletions projects/components/src/popover/popover-position-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ export class PopoverPositionBuilder {
return globalPosition.centerHorizontally().centerVertically();
case PopoverFixedPositionLocation.Right:
return globalPosition.right('0').top('0');

case PopoverFixedPositionLocation.Custom:
return globalPosition
.left(`${popoverPosition.customLocation!.x}px`)
.top(`${popoverPosition.customLocation!.y}px`);
case PopoverFixedPositionLocation.RightUnderHeader:
default:
return globalPosition.right('0').top(this.headerHeight ?? '0');
Expand Down
7 changes: 6 additions & 1 deletion projects/components/src/popover/popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ export interface PopoverRelativePosition {
export interface PopoverFixedPosition {
type: PopoverPositionType.Fixed;
location: PopoverFixedPositionLocation;
customLocation?: {
x: number;
y: number;
};
}

export type PopoverPosition =
Expand Down Expand Up @@ -65,7 +69,8 @@ export const enum PopoverRelativePositionLocation {
export const enum PopoverFixedPositionLocation {
RightUnderHeader,
Centered,
Right
Right,
Custom
}

export const POPOVER_DATA = new InjectionToken<unknown>('POPOVER_DATA');
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,10 @@ export const apiMetricsDashboard: DashboardDefaultConfiguration = {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler'
}
},
{
type: 'container-widget',
Expand Down Expand Up @@ -336,7 +339,11 @@ export const apiMetricsDashboard: DashboardDefaultConfiguration = {
type: 'entity-error-percentage-timeseries-data-source'
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler',
'show-context-menu': true
}
},
{
type: 'cartesian-widget',
Expand Down Expand Up @@ -375,7 +382,11 @@ export const apiMetricsDashboard: DashboardDefaultConfiguration = {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler',
'show-context-menu': true
}
}
]
}
Expand Down Expand Up @@ -410,7 +421,11 @@ export const apiMetricsDashboard: DashboardDefaultConfiguration = {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler',
'show-context-menu': true
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,10 @@ export const apiOverviewDashboard: DashboardDefaultConfiguration = {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler'
}
},
{
type: 'cartesian-widget',
Expand Down Expand Up @@ -389,7 +392,10 @@ export const apiOverviewDashboard: DashboardDefaultConfiguration = {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler'
}
},
{
type: 'cartesian-widget',
Expand Down Expand Up @@ -483,7 +489,10 @@ export const apiOverviewDashboard: DashboardDefaultConfiguration = {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler'
}
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ export const backendMetricsDashboard: DashboardDefaultConfiguration = {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler'
}
},
{
type: 'container-widget',
Expand Down Expand Up @@ -320,7 +323,11 @@ export const backendMetricsDashboard: DashboardDefaultConfiguration = {
type: 'entity-error-percentage-timeseries-data-source'
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler',
'show-context-menu': true
}
},
{
type: 'cartesian-widget',
Expand All @@ -343,7 +350,11 @@ export const backendMetricsDashboard: DashboardDefaultConfiguration = {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler',
'show-context-menu': true
}
}
]
}
Expand Down Expand Up @@ -378,7 +389,11 @@ export const backendMetricsDashboard: DashboardDefaultConfiguration = {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler',
'show-context-menu': true
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,10 @@ export class BackendOverviewComponent {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler'
}
},
{
type: 'cartesian-widget',
Expand Down Expand Up @@ -365,7 +368,10 @@ export class BackendOverviewComponent {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler'
}
},
{
type: 'cartesian-widget',
Expand Down Expand Up @@ -443,7 +449,10 @@ export class BackendOverviewComponent {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler'
}
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,10 @@ export const serviceMetricsDashboard: DashboardDefaultConfiguration = {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler'
}
},
{
type: 'container-widget',
Expand Down Expand Up @@ -336,7 +339,11 @@ export const serviceMetricsDashboard: DashboardDefaultConfiguration = {
type: 'entity-error-percentage-timeseries-data-source'
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler',
'show-context-menu': true
}
},
{
type: 'cartesian-widget',
Expand Down Expand Up @@ -375,7 +382,11 @@ export const serviceMetricsDashboard: DashboardDefaultConfiguration = {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler',
'show-context-menu': true
}
}
]
}
Expand Down Expand Up @@ -410,7 +421,11 @@ export const serviceMetricsDashboard: DashboardDefaultConfiguration = {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler',
'show-context-menu': true
}
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,11 @@ export const serviceOverviewDashboard: DashboardDefaultConfiguration = {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler',
'show-context-menu': true
}
},
{
type: 'cartesian-widget',
Expand Down Expand Up @@ -433,7 +437,11 @@ export const serviceOverviewDashboard: DashboardDefaultConfiguration = {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler',
'show-context-menu': true
}
},
{
type: 'cartesian-widget',
Expand Down Expand Up @@ -527,7 +535,11 @@ export const serviceOverviewDashboard: DashboardDefaultConfiguration = {
}
}
}
]
],
'selection-handler': {
type: 'cartesian-explorer-selection-handler',
'show-context-menu': true
}
}
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ describe('Explorer dashboard builder', () => {
type: 'cartesian-widget',
'selectable-interval': false,
'series-from-data': true,
'legend-position': LegendPosition.Bottom
'legend-position': LegendPosition.Bottom,
'selection-handler': {
type: 'cartesian-explorer-selection-handler',
'show-context-menu': false
}
},
onReady: expect.any(Function)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ export class ExplorerDashboardBuilder {
type: 'cartesian-widget',
'selectable-interval': false,
'series-from-data': true,
'legend-position': LegendPosition.Bottom
'legend-position': LegendPosition.Bottom,
'selection-handler': {
type: 'cartesian-explorer-selection-handler',
'show-context-menu': false
}
},
onReady: dashboard => {
dashboard.createAndSetRootDataFromModelClass(ExplorerVisualizationCartesianDataSourceModel);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Renderer2 } from '@angular/core';
import { fakeAsync, tick } from '@angular/core/testing';
import { DomElementMeasurerService, selector } from '@hypertrace/common';
import { PopoverService } from '@hypertrace/components';
import { createHostFactory, mockProvider } from '@ngneat/spectator/jest';
import { LegendPosition } from '../legend/legend.component';
import { ChartTooltipBuilderService } from '../utils/chart-tooltip/chart-tooltip-builder.service';
Expand Down Expand Up @@ -29,7 +30,8 @@ describe('Cartesian Chart component', () => {
}),
getComputedTextLength: () => 0
}),
mockProvider(Renderer2)
mockProvider(Renderer2),
mockProvider(PopoverService)
]
});

Expand Down
Loading