feat(trace viewer): show baseURL in Metadata pane
This commit is contained in:
parent
bdbe4795f1
commit
87d9e75878
|
|
@ -109,6 +109,7 @@ export class Tracing extends SdkObject implements InstrumentationListener, Snaps
|
||||||
this._contextCreatedEvent.browserName = context._browser.options.name;
|
this._contextCreatedEvent.browserName = context._browser.options.name;
|
||||||
this._contextCreatedEvent.channel = context._browser.options.channel;
|
this._contextCreatedEvent.channel = context._browser.options.channel;
|
||||||
this._contextCreatedEvent.options = context._options;
|
this._contextCreatedEvent.options = context._options;
|
||||||
|
this._contextCreatedEvent.baseURL = context._options.baseURL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ export type ContextEntry = {
|
||||||
startTime: number;
|
startTime: number;
|
||||||
endTime: number;
|
endTime: number;
|
||||||
browserName: string;
|
browserName: string;
|
||||||
|
baseURL?: string;
|
||||||
channel?: string;
|
channel?: string;
|
||||||
platform?: string;
|
platform?: string;
|
||||||
wallTime: number;
|
wallTime: number;
|
||||||
|
|
|
||||||
|
|
@ -85,6 +85,7 @@ export class TraceModernizer {
|
||||||
this._version = event.version;
|
this._version = event.version;
|
||||||
contextEntry.origin = event.origin;
|
contextEntry.origin = event.origin;
|
||||||
contextEntry.browserName = event.browserName;
|
contextEntry.browserName = event.browserName;
|
||||||
|
contextEntry.baseURL = event.baseURL;
|
||||||
contextEntry.channel = event.channel;
|
contextEntry.channel = event.channel;
|
||||||
contextEntry.title = event.title;
|
contextEntry.title = event.title;
|
||||||
contextEntry.platform = event.platform;
|
contextEntry.platform = event.platform;
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,14 @@
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.call-value {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a.call-value:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
.call-value::before {
|
.call-value::before {
|
||||||
content: '\00a0';
|
content: '\00a0';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,12 @@ export const MetadataView: React.FunctionComponent<{
|
||||||
if (!model)
|
if (!model)
|
||||||
return <></>;
|
return <></>;
|
||||||
return <div className='metadata-view vbox'>
|
return <div className='metadata-view vbox'>
|
||||||
|
{model.baseURL && (
|
||||||
|
<>
|
||||||
|
<div className='call-section' style={{ paddingTop: 2 }}>Time</div>
|
||||||
|
<div className='call-line'>baseURL:<a className='call-value string' href={model.baseURL} title={model.baseURL} target="_blank">{model.baseURL}</a></div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
<div className='call-section' style={{ paddingTop: 2 }}>Time</div>
|
<div className='call-section' style={{ paddingTop: 2 }}>Time</div>
|
||||||
{!!model.wallTime && <div className='call-line'>start time:<span className='call-value datetime' title={new Date(model.wallTime).toLocaleString()}>{new Date(model.wallTime).toLocaleString()}</span></div>}
|
{!!model.wallTime && <div className='call-line'>start time:<span className='call-value datetime' title={new Date(model.wallTime).toLocaleString()}>{new Date(model.wallTime).toLocaleString()}</span></div>}
|
||||||
<div className='call-line'>duration:<span className='call-value number' title={msToString(model.endTime - model.startTime)}>{msToString(model.endTime - model.startTime)}</span></div>
|
<div className='call-line'>duration:<span className='call-value number' title={msToString(model.endTime - model.startTime)}>{msToString(model.endTime - model.startTime)}</span></div>
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ export class MultiTraceModel {
|
||||||
readonly startTime: number;
|
readonly startTime: number;
|
||||||
readonly endTime: number;
|
readonly endTime: number;
|
||||||
readonly browserName: string;
|
readonly browserName: string;
|
||||||
|
readonly baseURL?: string;
|
||||||
readonly channel?: string;
|
readonly channel?: string;
|
||||||
readonly platform?: string;
|
readonly platform?: string;
|
||||||
readonly wallTime?: number;
|
readonly wallTime?: number;
|
||||||
|
|
@ -83,6 +84,7 @@ export class MultiTraceModel {
|
||||||
const libraryContext = contexts.find(context => context.origin === 'library');
|
const libraryContext = contexts.find(context => context.origin === 'library');
|
||||||
|
|
||||||
this.browserName = libraryContext?.browserName || '';
|
this.browserName = libraryContext?.browserName || '';
|
||||||
|
this.baseURL = libraryContext?.baseURL;
|
||||||
this.sdkLanguage = libraryContext?.sdkLanguage;
|
this.sdkLanguage = libraryContext?.sdkLanguage;
|
||||||
this.channel = libraryContext?.channel;
|
this.channel = libraryContext?.channel;
|
||||||
this.testIdAttributeName = libraryContext?.testIdAttributeName;
|
this.testIdAttributeName = libraryContext?.testIdAttributeName;
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@ export type ContextCreatedTraceEvent = {
|
||||||
options: BrowserContextEventOptions,
|
options: BrowserContextEventOptions,
|
||||||
sdkLanguage?: Language,
|
sdkLanguage?: Language,
|
||||||
testIdAttributeName?: string,
|
testIdAttributeName?: string,
|
||||||
|
baseURL?: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ScreencastFrameTraceEvent = {
|
export type ScreencastFrameTraceEvent = {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue