Skip to content

Commit

Permalink
[#noissue] Provide a different query-period for metric page
Browse files Browse the repository at this point in the history
  • Loading branch information
binDongKim committed Oct 11, 2022
1 parent 9f1bd6b commit 6454e6e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@ export class HostGroupAndHostListContainerComponent implements OnInit, OnDestroy
private translateReplaceService: TranslateReplaceService,
) {}

// TODO: Add search input box
ngOnInit() {
this.initI18nText();
this.newUrlStateNotificationService.onUrlStateChange$.pipe(
filter((urlService: NewUrlStateNotificationService) => urlService.hasValue(UrlPathId.HOST_GROUP) && urlService.isValueChanged(UrlPathId.HOST_GROUP)),
filter((urlService: NewUrlStateNotificationService) => urlService.hasValue(UrlPathId.HOST_GROUP) && (urlService.isValueChanged(UrlPathId.HOST_GROUP) || !urlService.hasValue(UrlPathId.HOST))),
map((urlService: NewUrlStateNotificationService) => urlService.getPathValue(UrlPathId.HOST_GROUP)),
tap((hostGroup: string) => this.selectedHostGroup = hostGroup),
switchMap((hostGroup: string) => this.hostGroupAndHostListDataService.getHostList(hostGroup).pipe(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class PeriodSelectorContainerComponent implements OnInit, OnDestroy {
hiddenComponent: boolean;
selectedPeriod: Period;
selectedEndTime: EndTime;
periodList: Array<Period>;
periodList: Period[];
maxPeriod: number;
isRealTimeMode: boolean;
showRealTimeButton: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ export class UrlRedirectorComponent {
// RouteInfoCollectorService를 통해 초기화 되는 UrlStateNotifactionService 의 URL 초기화 정보를 사용하면 안됨.
this.activatedRoute.data.subscribe((urlData: any) => {
const params = this.getUrlParams();

if (params.period) {
this.urlRouteManagerService.move({
url: [
urlData['path'] || params.startPath,
params.application,
params.application || params.hostGroup,
params.period
],
needServerTimeRequest: true
Expand All @@ -31,7 +32,7 @@ export class UrlRedirectorComponent {
this.urlRouteManagerService.move({
url: [
urlData['path'] || params.startPath,
params.application,
params.application || params.hostGroup,
this.webAppSettingDataService.getUserDefaultPeriod().getValueWithTime()
],
needServerTimeRequest: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ export class ComponentDefaultSettingDataService {
],
[UrlPath.TRANSACTION_VIEW]: [
new Period(20),
],
[UrlPath.METRIC]: [
new Period(5, 'Last'),
new Period(20),
new Period(60),
new Period(720),
new Period(1440),
new Period(10080),
new Period(20160),
new Period(40320),
]
};
private maxPeriodTime = 60 * 24 * 2; // 2day
Expand Down

0 comments on commit 6454e6e

Please sign in to comment.