Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions frontend/app/components/trace_viewer/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ xprof_ng_module(
"@org_xprof//frontend/app/common/angular:angular_material_progress_bar",
"@org_xprof//frontend/app/common/constants",
"@org_xprof//frontend/app/common/interfaces",
"@org_xprof//frontend/app/components/diagnostics_view",
"@org_xprof//frontend/app/components/trace_viewer_container",
"@org_xprof//frontend/app/components/trace_viewer_v2:app_bundle_ts",
"@org_xprof//frontend/app/pipes",
Expand Down
13 changes: 11 additions & 2 deletions frontend/app/services/data_service_v2/data_service_v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {API_PREFIX, CAPTURE_PROFILE_API, CONFIG_API, DATA_API, DATA_CSV_API, GRA
import {FileExtensionType} from 'org_xprof/frontend/app/common/constants/enums';
import {CaptureProfileOptions, CaptureProfileResponse, ProfilerConfig, } from 'org_xprof/frontend/app/common/interfaces/capture_profile';
import {DataTable} from 'org_xprof/frontend/app/common/interfaces/data_table';
import {type Diagnostics} from 'org_xprof/frontend/app/common/interfaces/diagnostics';
import {HostMetadata} from 'org_xprof/frontend/app/common/interfaces/hosts';
import {type SmartSuggestionReport} from 'org_xprof/frontend/app/common/interfaces/smart_suggestion.jsonpb_decls';
import * as utils from 'org_xprof/frontend/app/common/utils/utils';
Expand Down Expand Up @@ -56,7 +57,8 @@ export class DataServiceV2 implements DataServiceV2Interface {
console.log(error);
let errorMessage = '';
if (error.status === 0) {
errorMessage = 'Request failed : Unable to get the profile data';
errorMessage =
'Request failed : Unable to get the profile data';
} else {
const urlObj = new URL(error.url || '');
const errorString = typeof error.error === 'object' ?
Expand Down Expand Up @@ -210,7 +212,8 @@ export class DataServiceV2 implements DataServiceV2Interface {
if (runPath) {
linkParams.set('run_path', runPath);
}
return `${window.parent.location.origin}?${linkParams.toString()}#profile`;
return `${window.parent.location.origin}?${
linkParams.toString()}#profile`;
}
return '';
}
Expand Down Expand Up @@ -407,6 +410,12 @@ export class DataServiceV2 implements DataServiceV2Interface {
return of('');
}

getTraceViewerDiagnostics(sessionId: string, host?: string):
Observable<Diagnostics> {
// Not implemented for 3P.
return of({info: [], warnings: [], errors: []});
}

getSearchParams(): URLSearchParams {
return new URLSearchParams(
window.sessionStorage.getItem('searchParams') || '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import {InjectionToken} from '@angular/core';
import {ProfilerConfig} from 'org_xprof/frontend/app/common/interfaces/capture_profile';
import {DataTable} from 'org_xprof/frontend/app/common/interfaces/data_table';
import {type Diagnostics} from 'org_xprof/frontend/app/common/interfaces/diagnostics';
import {GraphTypeObject} from 'org_xprof/frontend/app/common/interfaces/graph_viewer';
import {HostMetadata} from 'org_xprof/frontend/app/common/interfaces/hosts';
import {type SmartSuggestionReport} from 'org_xprof/frontend/app/common/interfaces/smart_suggestion.jsonpb_decls';
Expand All @@ -32,9 +33,8 @@ export interface DataServiceV2Interface {
parameters?: Map<string, string>,
): string;

getSmartSuggestions(
sessionId: string,
parameters?: Map<string, string>): Observable<SmartSuggestionReport | null>;
getSmartSuggestions(sessionId: string, parameters?: Map<string, string>):
Observable<SmartSuggestionReport|null>;

// Returns a string of comma separated module names.
getModuleList(sessionId: string, graphType?: string): Observable<string>;
Expand Down Expand Up @@ -79,6 +79,8 @@ export interface DataServiceV2Interface {
sessionId: string, host: string,
params: Map<string, string>): Observable<DataTable|null>;

getTraceViewerDiagnostics(sessionId: string, host?: string):
Observable<Diagnostics>;
getOpProfileSummary(data: OpProfileData): OpProfileSummary[];
// TODO(b/429042977): Do not include Custom Call text for provenance nodes.
getCustomCallTextLink(
Expand Down