-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: minor updates to explorer field accessors #2416
Merged
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
95c7e99
fix: minor updates to explorer field accessors
23nobody 1578143
fix: lint
23nobody 1497335
fix: fix for lint supress
23nobody e4e2b7a
fix: minor fix
23nobody 39ab6dc
fix: minor fix
23nobody 0a53e16
Merge branch 'main' into explorer-ht-changes
23nobody aed6253
fix: nit fix
23nobody File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ import { | |
import { Filter, FilterAttribute, ToggleItem } from '@hypertrace/components'; | ||
import { isEmpty, isNil } from 'lodash-es'; | ||
import { concat, EMPTY, Observable, Subject } from 'rxjs'; | ||
import { map, take } from 'rxjs/operators'; | ||
import { map } from 'rxjs/operators'; | ||
import { CartesianSeriesVisualizationType } from '../../shared/components/cartesian/chart'; | ||
import { | ||
ExploreOrderBy, | ||
|
@@ -156,7 +156,7 @@ export class ExplorerComponent { | |
|
||
public constructor( | ||
private readonly metadataService: MetadataService, | ||
private readonly navigationService: NavigationService, | ||
protected readonly navigationService: NavigationService, | ||
private readonly timeDurationService: TimeDurationService, | ||
private readonly preferenceService: PreferenceService, | ||
@Inject(EXPLORER_DASHBOARD_BUILDER_FACTORY) explorerDashboardBuilderFactory: ExplorerDashboardBuilderFactory, | ||
|
@@ -167,10 +167,7 @@ export class ExplorerComponent { | |
this.resultsExpanded$ = this.preferenceService.get(ExplorerComponent.RESULTS_EXPANDED_PREFERENCE, true); | ||
this.resultsDashboard$ = this.explorerDashboardBuilder.resultsDashboard$; | ||
this.vizDashboard$ = this.explorerDashboardBuilder.visualizationDashboard$; | ||
this.initialState$ = activatedRoute.queryParamMap.pipe( | ||
take(1), | ||
map(paramMap => this.mapToInitialState(paramMap)) | ||
); | ||
this.initialState$ = activatedRoute.queryParamMap.pipe(map(paramMap => this.mapToInitialState(paramMap))); | ||
this.currentContext$ = concat( | ||
this.initialState$.pipe(map(value => value.contextToggle.value.dashboardContext)), | ||
this.contextChangeSubject | ||
|
@@ -398,12 +395,15 @@ export const enum ScopeQueryParam { | |
EndpointTraces = 'endpoint-traces', | ||
Spans = 'spans' | ||
} | ||
const enum ExplorerQueryParam { | ||
|
||
export const enum ExplorerQueryParam { | ||
Scope = 'scope', | ||
Interval = 'interval', | ||
Group = 'group', | ||
OtherGroup = 'other', | ||
GroupLimit = 'limit', | ||
Series = 'series', | ||
Order = 'order' | ||
Order = 'order', | ||
// eslint-disable-next-line @typescript-eslint/no-shadow | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does the linter think this is shadowing? If it actually is, please adjust name rather than ignoring linter There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated to |
||
Filter = 'filter' | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you verified this doesn't lead to any cycles that would need to be handled (applying initial state updates the url, which applies state again)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked using
tap
on the observable. There are no cycles as such, only thing is that asinitialState$
is subscribed at the outermost div on the template, it re-renders all the components everytime we apply a new query instead of updating just the states.