File tree 3 files changed +12
-6
lines changed
3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ func cloneRequest(request CloneRequest) *http.Request {
80
80
81
81
// if the auth value is set, we need to base64 encode it and add it to the header.
82
82
if request .Auth != "" {
83
- encoded := base64 .StdEncoding .EncodeToString ([]byte (request .Auth ))
83
+ encoded := base64 .StdEncoding .EncodeToString ([]byte (ReplaceWithVariables ( request .Variables , request . Auth ) ))
84
84
// this will overwrite any existing auth header.
85
85
newReq .Header .Set ("Authorization" , fmt .Sprintf ("Basic %s" , encoded ))
86
86
}
Original file line number Diff line number Diff line change @@ -139,7 +139,10 @@ export class HttpTransactionItemComponent extends LitElement {
139
139
reqTime = req . timestamp ;
140
140
}
141
141
142
- const totalTime = respTime - reqTime ;
142
+ let totalTime = respTime - reqTime ;
143
+ if ( totalTime < 0 ) {
144
+ totalTime = 0 ;
145
+ }
143
146
144
147
return html `
145
148
< div class ="${ tClass } " @click ="${ this . setActive } ">
@@ -150,7 +153,9 @@ export class HttpTransactionItemComponent extends LitElement {
150
153
</ header >
151
154
${ delay }
152
155
< div class ="request-time ">
153
- ${ totalTime } ms < sl-icon name ="arrow-left-right "> </ sl-icon >
156
+ ${ ( totalTime > 10000 ) ? html `${ ( totalTime / 1000 ) . toFixed ( 1 ) } s` :
157
+ html `${ totalTime > 0 ? totalTime : null } ${ totalTime > 0 ? 'ms' : null } ` }
158
+ < sl-icon name ="arrow-left-right "> </ sl-icon >
154
159
</ div >
155
160
< div class ="transaction-status ">
156
161
${ this . hideControls ? '' : chainLink }
Original file line number Diff line number Diff line change 1
1
import { HttpResponse } from "@/model/http_transaction" ;
2
2
3
3
export function ExtractStatusStyleFromCode ( response : HttpResponse ) : string {
4
- if ( response . statusCode >= 200 && response . statusCode < 400 ) {
4
+ if ( response ? .statusCode >= 200 && response ? .statusCode < 400 ) {
5
5
return "http200"
6
6
}
7
- if ( response . statusCode >= 400 && response . statusCode < 500 ) {
7
+ if ( response ? .statusCode >= 400 && response ? .statusCode < 500 ) {
8
8
return "http400"
9
9
}
10
- if ( response . statusCode >= 500 ) {
10
+ if ( response ? .statusCode >= 500 ) {
11
11
return "http500"
12
12
}
13
+ return "pending"
13
14
}
14
15
15
16
export function ExtractHTTPCodeDefinition ( response : HttpResponse ) : string {
You can’t perform that action at this time.
0 commit comments