Spaces:
Running
Running
Update flare-ui/src/app/dialogs/api-edit-dialog/api-edit-dialog.component.html
Browse files
flare-ui/src/app/dialogs/api-edit-dialog/api-edit-dialog.component.html
CHANGED
@@ -358,29 +358,91 @@
|
|
358 |
<span>Failed: {{ testResult.error }}</span>
|
359 |
</div>
|
360 |
}
|
361 |
-
|
362 |
@if (testResult.response_time) {
|
363 |
<p><strong>Response Time:</strong> {{ testResult.response_time }}ms</p>
|
364 |
}
|
365 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
366 |
@if (testResult.response_body) {
|
367 |
-
<mat-
|
368 |
-
<mat-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
|
|
|
|
|
|
|
|
|
|
374 |
}
|
375 |
-
|
376 |
@if (testResult.request_body) {
|
377 |
-
<mat-
|
378 |
-
<mat-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
384 |
}
|
385 |
</div>
|
386 |
}
|
|
|
358 |
<span>Failed: {{ testResult.error }}</span>
|
359 |
</div>
|
360 |
}
|
361 |
+
|
362 |
@if (testResult.response_time) {
|
363 |
<p><strong>Response Time:</strong> {{ testResult.response_time }}ms</p>
|
364 |
}
|
365 |
+
|
366 |
+
@if (testResult.response_headers) {
|
367 |
+
<mat-expansion-panel>
|
368 |
+
<mat-expansion-panel-header>
|
369 |
+
<mat-panel-title>Response Headers</mat-panel-title>
|
370 |
+
</mat-expansion-panel-header>
|
371 |
+
<mat-form-field appearance="outline" class="full-width">
|
372 |
+
<mat-label>Headers</mat-label>
|
373 |
+
<textarea matInput
|
374 |
+
[value]="testResult.response_headers | json"
|
375 |
+
rows="6"
|
376 |
+
readonly></textarea>
|
377 |
+
</mat-form-field>
|
378 |
+
</mat-expansion-panel>
|
379 |
+
}
|
380 |
+
|
381 |
@if (testResult.response_body) {
|
382 |
+
<mat-expansion-panel [expanded]="true">
|
383 |
+
<mat-expansion-panel-header>
|
384 |
+
<mat-panel-title>Response Body</mat-panel-title>
|
385 |
+
</mat-expansion-panel-header>
|
386 |
+
<mat-form-field appearance="outline" class="full-width">
|
387 |
+
<mat-label>Response</mat-label>
|
388 |
+
<textarea matInput
|
389 |
+
[value]="testResult.response_body | json"
|
390 |
+
rows="12"
|
391 |
+
readonly></textarea>
|
392 |
+
</mat-form-field>
|
393 |
+
</mat-expansion-panel>
|
394 |
}
|
395 |
+
|
396 |
@if (testResult.request_body) {
|
397 |
+
<mat-expansion-panel>
|
398 |
+
<mat-expansion-panel-header>
|
399 |
+
<mat-panel-title>Request Details</mat-panel-title>
|
400 |
+
</mat-expansion-panel-header>
|
401 |
+
<mat-form-field appearance="outline" class="full-width">
|
402 |
+
<mat-label>Actual Request Sent</mat-label>
|
403 |
+
<textarea matInput
|
404 |
+
[value]="testResult.request_body | json"
|
405 |
+
rows="8"
|
406 |
+
readonly></textarea>
|
407 |
+
</mat-form-field>
|
408 |
+
|
409 |
+
@if (testResult.request_headers) {
|
410 |
+
<mat-form-field appearance="outline" class="full-width">
|
411 |
+
<mat-label>Request Headers</mat-label>
|
412 |
+
<textarea matInput
|
413 |
+
[value]="testResult.request_headers | json"
|
414 |
+
rows="6"
|
415 |
+
readonly></textarea>
|
416 |
+
</mat-form-field>
|
417 |
+
}
|
418 |
+
</mat-expansion-panel>
|
419 |
+
}
|
420 |
+
|
421 |
+
@if (testResult.extracted_values && testResult.extracted_values.length > 0) {
|
422 |
+
<mat-expansion-panel>
|
423 |
+
<mat-expansion-panel-header>
|
424 |
+
<mat-panel-title>Extracted Values</mat-panel-title>
|
425 |
+
</mat-expansion-panel-header>
|
426 |
+
<table mat-table [dataSource]="testResult.extracted_values" class="full-width">
|
427 |
+
<ng-container matColumnDef="variable">
|
428 |
+
<th mat-header-cell *matHeaderCellDef>Variable</th>
|
429 |
+
<td mat-cell *matCellDef="let element">{{ element.variable_name }}</td>
|
430 |
+
</ng-container>
|
431 |
+
|
432 |
+
<ng-container matColumnDef="value">
|
433 |
+
<th mat-header-cell *matHeaderCellDef>Value</th>
|
434 |
+
<td mat-cell *matCellDef="let element">{{ element.value }}</td>
|
435 |
+
</ng-container>
|
436 |
+
|
437 |
+
<ng-container matColumnDef="type">
|
438 |
+
<th mat-header-cell *matHeaderCellDef>Type</th>
|
439 |
+
<td mat-cell *matCellDef="let element">{{ element.type }}</td>
|
440 |
+
</ng-container>
|
441 |
+
|
442 |
+
<tr mat-header-row *matHeaderRowDef="['variable', 'value', 'type']"></tr>
|
443 |
+
<tr mat-row *matRowDef="let row; columns: ['variable', 'value', 'type'];"></tr>
|
444 |
+
</table>
|
445 |
+
</mat-expansion-panel>
|
446 |
}
|
447 |
</div>
|
448 |
}
|