@cqa-lib/cqa-ui 1.1.93 → 1.1.94
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/execution-screen/db-query-execution-item/db-query-execution-item.component.mjs +124 -0
- package/esm2020/lib/execution-screen/db-verification-step/db-verification-step.component.mjs +289 -0
- package/esm2020/lib/execution-screen/execution-step.models.mjs +1 -1
- package/esm2020/lib/ui-kit.module.mjs +17 -5
- package/esm2020/public-api.mjs +3 -1
- package/fesm2015/cqa-lib-cqa-ui.mjs +424 -5
- package/fesm2015/cqa-lib-cqa-ui.mjs.map +1 -1
- package/fesm2020/cqa-lib-cqa-ui.mjs +413 -5
- package/fesm2020/cqa-lib-cqa-ui.mjs.map +1 -1
- package/lib/execution-screen/db-query-execution-item/db-query-execution-item.component.d.ts +33 -0
- package/lib/execution-screen/db-verification-step/db-verification-step.component.d.ts +69 -0
- package/lib/execution-screen/execution-step.models.d.ts +33 -1
- package/lib/ui-kit.module.d.ts +19 -17
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/styles.css +1 -1
|
@@ -11286,6 +11286,404 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
11286
11286
|
type: Input
|
|
11287
11287
|
}] } });
|
|
11288
11288
|
|
|
11289
|
+
class DbQueryExecutionItemComponent {
|
|
11290
|
+
constructor(cdr) {
|
|
11291
|
+
this.cdr = cdr;
|
|
11292
|
+
this.isExpanded = false;
|
|
11293
|
+
this.responseTableColumns = [];
|
|
11294
|
+
this.emptyStateConfig = {
|
|
11295
|
+
title: 'No Data',
|
|
11296
|
+
description: 'No data returned from this query.',
|
|
11297
|
+
imageUrl: EMPTY_STATE_IMAGES.DASHBOARD,
|
|
11298
|
+
actions: [],
|
|
11299
|
+
};
|
|
11300
|
+
this.pageIndex = 0;
|
|
11301
|
+
this.pageSize = 10;
|
|
11302
|
+
}
|
|
11303
|
+
ngOnInit() {
|
|
11304
|
+
this.setupResponseTableColumns();
|
|
11305
|
+
}
|
|
11306
|
+
toggle() {
|
|
11307
|
+
this.isExpanded = !this.isExpanded;
|
|
11308
|
+
if (this.isExpanded) {
|
|
11309
|
+
this.setupResponseTableColumns();
|
|
11310
|
+
}
|
|
11311
|
+
this.cdr.markForCheck();
|
|
11312
|
+
this.cdr.detectChanges();
|
|
11313
|
+
}
|
|
11314
|
+
copyQuery() {
|
|
11315
|
+
if (this.queryResult?.query) {
|
|
11316
|
+
navigator.clipboard.writeText(this.queryResult.query).then(() => {
|
|
11317
|
+
});
|
|
11318
|
+
}
|
|
11319
|
+
}
|
|
11320
|
+
copyResponse() {
|
|
11321
|
+
const response = JSON.stringify(this.queryResult.data, null, 2);
|
|
11322
|
+
navigator.clipboard.writeText(response).then(() => {
|
|
11323
|
+
});
|
|
11324
|
+
}
|
|
11325
|
+
formatDuration(seconds) {
|
|
11326
|
+
if (seconds < 1) {
|
|
11327
|
+
return `${(seconds * 1000).toFixed(0)}ms`;
|
|
11328
|
+
}
|
|
11329
|
+
if (seconds < 60 && !Number.isInteger(seconds)) {
|
|
11330
|
+
return `${seconds.toFixed(1)}s`;
|
|
11331
|
+
}
|
|
11332
|
+
const hours = Math.floor(seconds / 3600);
|
|
11333
|
+
const minutes = Math.floor((seconds % 3600) / 60);
|
|
11334
|
+
const secs = Math.floor(seconds % 60);
|
|
11335
|
+
const parts = [];
|
|
11336
|
+
if (hours > 0) {
|
|
11337
|
+
parts.push(`${hours}h`);
|
|
11338
|
+
}
|
|
11339
|
+
if (minutes > 0) {
|
|
11340
|
+
parts.push(`${minutes}m`);
|
|
11341
|
+
}
|
|
11342
|
+
if (secs > 0 || (hours === 0 && minutes === 0)) {
|
|
11343
|
+
parts.push(`${secs}s`);
|
|
11344
|
+
}
|
|
11345
|
+
return parts.join(' ');
|
|
11346
|
+
}
|
|
11347
|
+
get isEmptyResponse() {
|
|
11348
|
+
return this.queryResult?.data?.length === 0;
|
|
11349
|
+
}
|
|
11350
|
+
setupResponseTableColumns() {
|
|
11351
|
+
const data = this.queryResult?.data || [];
|
|
11352
|
+
if (data.length === 0) {
|
|
11353
|
+
this.responseTableColumns = [];
|
|
11354
|
+
return;
|
|
11355
|
+
}
|
|
11356
|
+
// Get all unique keys from the data objects
|
|
11357
|
+
const firstItem = data[0];
|
|
11358
|
+
if (typeof firstItem !== 'object' || firstItem === null) {
|
|
11359
|
+
this.responseTableColumns = [];
|
|
11360
|
+
return;
|
|
11361
|
+
}
|
|
11362
|
+
const keys = Object.keys(firstItem);
|
|
11363
|
+
this.responseTableColumns = keys.map(key => ({
|
|
11364
|
+
fieldId: key,
|
|
11365
|
+
fieldName: key,
|
|
11366
|
+
fieldValue: key,
|
|
11367
|
+
isShow: true,
|
|
11368
|
+
weight: 1,
|
|
11369
|
+
render: (row) => {
|
|
11370
|
+
const value = row[key] ?? '-';
|
|
11371
|
+
const displayValue = value === null || value === undefined ? '' : String(value);
|
|
11372
|
+
return `
|
|
11373
|
+
<div class="cqa-text-[12px] cqa-text-[#0F172B]">
|
|
11374
|
+
${this.escapeHtml(displayValue)}
|
|
11375
|
+
</div>
|
|
11376
|
+
`;
|
|
11377
|
+
}
|
|
11378
|
+
}));
|
|
11379
|
+
}
|
|
11380
|
+
escapeHtml(text) {
|
|
11381
|
+
const div = document.createElement('div');
|
|
11382
|
+
div.textContent = text;
|
|
11383
|
+
return div.innerHTML;
|
|
11384
|
+
}
|
|
11385
|
+
onPageChange(event) {
|
|
11386
|
+
this.pageIndex = event.pageIndex;
|
|
11387
|
+
this.pageSize = event.pageSize;
|
|
11388
|
+
}
|
|
11389
|
+
}
|
|
11390
|
+
DbQueryExecutionItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DbQueryExecutionItemComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
11391
|
+
DbQueryExecutionItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: DbQueryExecutionItemComponent, selector: "cqa-db-query-execution-item", inputs: { queryNumber: "queryNumber", queryKey: "queryKey", queryResult: "queryResult", status: "status", variableName: "variableName" }, host: { classAttribute: "cqa-ui-root" }, ngImport: i0, template: "<div class=\"cqa-border !cqa-border-b-2 cqa-border-solid cqa-rounded-lg cqa-overflow-hidden\" [ngClass]=\"{'cqa-bg-[#F8FAFC] cqa-border-[#E2E8F0]': status === 'passed', 'cqa-bg-[#FEF2F2] cqa-border-[#FFC9C9]': status === 'failed'}\">\n <!-- Header (Collapsed View) -->\n <div \n class=\"cqa-flex cqa-items-center cqa-justify-between cqa-px-4 cqa-py-2 cqa-cursor-pointer\"\n (click)=\"toggle()\"\n role=\"button\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-3 cqa-flex-1\">\n <span class=\"cqa-font-semibold cqa-text-[10px] cqa-text-[#314158]\">Query {{ queryNumber }}</span>\n \n <!-- Status Badge -->\n <cqa-badge class=\"cqa-mb-0.5\"\n *ngIf=\"status === 'passed'\"\n label=\"Passed\"\n backgroundColor=\"#DCFCE7\"\n textColor=\"#22C55E\"\n inlineStyles=\"border-radius: 50px;\"\n icon=\"check_circle\"\n size=\"small\">\n </cqa-badge>\n <cqa-badge class=\"cqa-mb-0.5\"\n *ngIf=\"status === 'failed'\"\n label=\"Failed\"\n backgroundColor=\"#FEE2E2\"\n textColor=\"#DC2626\"\n icon=\"error\"\n inlineStyles=\"border-radius: 50px;\"\n size=\"small\">\n </cqa-badge>\n \n <span class=\"cqa-text-[10px] cqa-leading-[15px] cqa-text-[#62748E]\" *ngIf=\"queryResult?.duration || queryResult?.data?.length > 0\">\n {{ formatDuration(queryResult?.duration) }}\n <span *ngIf=\"queryResult?.data?.length > 0 && queryResult?.duration\"> \u2022 </span>\n <span *ngIf=\"queryResult?.data?.length > 0\">{{ queryResult?.data?.length || 0 }} rows</span>\n </span>\n </div>\n \n <div class=\"cqa-flex cqa-items-center cqa-gap-2\">\n <button\n (click)=\"copyQuery(); $event.stopPropagation()\"\n class=\"cqa-flex cqa-items-center cqa-gap-1 cqa-px-2 cqa-py-1 cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-text-[#45556C] cqa-bg-transparent cqa-cursor-pointer\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.33332 10.6667H3.99999C3.64637 10.6667 3.30723 10.5263 3.05718 10.2762C2.80713 10.0262 2.66666 9.68704 2.66666 9.33341V4.00008C2.66666 3.64646 2.80713 3.30732 3.05718 3.05727C3.30723 2.80722 3.64637 2.66675 3.99999 2.66675H9.33332C9.68695 2.66675 10.0261 2.80722 10.2761 3.05727C10.5262 3.30732 10.6667 3.64646 10.6667 4.00008V5.33341M6.66666 13.3334H12C12.3536 13.3334 12.6928 13.1929 12.9428 12.9429C13.1928 12.6928 13.3333 12.3537 13.3333 12.0001V6.66675C13.3333 6.31313 13.1928 5.97399 12.9428 5.72394C12.6928 5.47389 12.3536 5.33341 12 5.33341H6.66666C6.31303 5.33341 5.9739 5.47389 5.72385 5.72394C5.4738 5.97399 5.33332 6.31313 5.33332 6.66675V12.0001C5.33332 12.3537 5.4738 12.6928 5.72385 12.9429C5.9739 13.1929 6.31303 13.3334 6.66666 13.3334Z\" stroke=\"#636363\" stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n Copy Query\n </button>\n <button\n (click)=\"copyResponse(); $event.stopPropagation()\"\n class=\"cqa-flex cqa-items-center cqa-gap-1 cqa-px-2 cqa-py-1 cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-text-[#45556C] cqa-bg-transparent cqa-cursor-pointer\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.33332 10.6667H3.99999C3.64637 10.6667 3.30723 10.5263 3.05718 10.2762C2.80713 10.0262 2.66666 9.68704 2.66666 9.33341V4.00008C2.66666 3.64646 2.80713 3.30732 3.05718 3.05727C3.30723 2.80722 3.64637 2.66675 3.99999 2.66675H9.33332C9.68695 2.66675 10.0261 2.80722 10.2761 3.05727C10.5262 3.30732 10.6667 3.64646 10.6667 4.00008V5.33341M6.66666 13.3334H12C12.3536 13.3334 12.6928 13.1929 12.9428 12.9429C13.1928 12.6928 13.3333 12.3537 13.3333 12.0001V6.66675C13.3333 6.31313 13.1928 5.97399 12.9428 5.72394C12.6928 5.47389 12.3536 5.33341 12 5.33341H6.66666C6.31303 5.33341 5.9739 5.47389 5.72385 5.72394C5.4738 5.97399 5.33332 6.31313 5.33332 6.66675V12.0001C5.33332 12.3537 5.4738 12.6928 5.72385 12.9429C5.9739 13.1929 6.31303 13.3334 6.66666 13.3334Z\" stroke=\"#636363\" stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n Copy Response\n </button>\n \n <!-- Chevron Icon -->\n <svg \n [class.cqa-rotate-180]=\"isExpanded\" \n class=\"cqa-transition-transform cqa-ml-2\" \n width=\"14\" \n height=\"14\" \n viewBox=\"0 0 14 14\" \n fill=\"none\" \n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M3.5 5L7 8.5L10.5 5\" stroke=\"#9CA3AF\" stroke-width=\"0.833333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </div>\n </div>\n\n <!-- Expanded Content -->\n <div *ngIf=\"isExpanded === true\" class=\"cqa-bg-white cqa-border-t cqa-border-b-0 cqa-border-l-0 cqa-border-r-0 cqa-border-solid\" [ngClass]=\"{'cqa-border-[#E2E8F0]': status === 'passed', 'cqa-border-[#FFC9C9]': status === 'failed'}\">\n <!-- Query Section -->\n <div class=\"cqa-px-4 cqa-py-3\">\n <div class=\"cqa-text-[12px] cqa-leading-[16px] cqa-font-semibold cqa-text-[#314158] cqa-mb-2\">Query</div>\n <div class=\"cqa-relative cqa-bg-[#0F172B] cqa-rounded-[10px] cqa-p-3 cqa-overflow-hidden\">\n <button\n (click)=\"copyQuery()\"\n class=\"cqa-absolute cqa-top-2 cqa-right-2 cqa-p-1.5 cqa-cursor-pointer hover:cqa-bg-[#334155] cqa-rounded\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.33332 10.6667H3.99999C3.64637 10.6667 3.30723 10.5263 3.05718 10.2762C2.80713 10.0262 2.66666 9.68704 2.66666 9.33341V4.00008C2.66666 3.64646 2.80713 3.30732 3.05718 3.05727C3.30723 2.80722 3.64637 2.66675 3.99999 2.66675H9.33332C9.68695 2.66675 10.0261 2.80722 10.2761 3.05727C10.5262 3.30732 10.6667 3.64646 10.6667 4.00008V5.33341M6.66666 13.3334H12C12.3536 13.3334 12.6928 13.1929 12.9428 12.9429C13.1928 12.6928 13.3333 12.3537 13.3333 12.0001V6.66675C13.3333 6.31313 13.1928 5.97399 12.9428 5.72394C12.6928 5.47389 12.3536 5.33341 12 5.33341H6.66666C6.31303 5.33341 5.9739 5.47389 5.72385 5.72394C5.4738 5.97399 5.33332 6.31313 5.33332 6.66675V12.0001C5.33332 12.3537 5.4738 12.6928 5.72385 12.9429C5.9739 13.1929 6.31303 13.3334 6.66666 13.3334Z\" stroke=\"#94A3B8\" stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n <pre class=\"cqa-text-[10px] cqa-leading-[15px] cqa-text-[#F1F5F9] cqa-font-mono cqa-whitespace-pre-wrap cqa-overflow-x-auto cqa-m-0\"><code>{{ queryResult?.query }}</code></pre>\n </div>\n <div *ngIf=\"variableName\" class=\"cqa-mt-4 cqa-text-[10px] cqa-leading-[15px] cqa-text-[#45556C]\">\n Stored as variable: <span class=\"cqa-font-medium cqa-bg-[#F1F5F9] cqa-px-1 cqa-rounded-[4px] cqa-text-[#45556C]\">{{ variableName }}</span>\n </div>\n\n <div class=\"cqa-flex cqa-items-center cqa-justify-between cqa-mt-4\" *ngIf=\"queryResult?.data\">\n <div class=\"cqa-text-[12px] cqa-text-[#314158]\">Response</div>\n <button\n (click)=\"copyResponse()\"\n class=\"cqa-cursor-pointer cqa-rounded\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.33332 10.6667H3.99999C3.64637 10.6667 3.30723 10.5263 3.05718 10.2762C2.80713 10.0262 2.66666 9.68704 2.66666 9.33341V4.00008C2.66666 3.64646 2.80713 3.30732 3.05718 3.05727C3.30723 2.80722 3.64637 2.66675 3.99999 2.66675H9.33332C9.68695 2.66675 10.0261 2.80722 10.2761 3.05727C10.5262 3.30732 10.6667 3.64646 10.6667 4.00008V5.33341M6.66666 13.3334H12C12.3536 13.3334 12.6928 13.1929 12.9428 12.9429C13.1928 12.6928 13.3333 12.3537 13.3333 12.0001V6.66675C13.3333 6.31313 13.1928 5.97399 12.9428 5.72394C12.6928 5.47389 12.3536 5.33341 12 5.33341H6.66666C6.31303 5.33341 5.9739 5.47389 5.72385 5.72394C5.4738 5.97399 5.33332 6.31313 5.33332 6.66675V12.0001C5.33332 12.3537 5.4738 12.6928 5.72385 12.9429C5.9739 13.1929 6.31303 13.3334 6.66666 13.3334Z\" stroke=\"#636363\" stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n </div>\n \n <cqa-table-template\n *ngIf=\"!isEmptyResponse && queryResult?.data\"\n [columns]=\"responseTableColumns\"\n [data]=\"queryResult?.data || []\"\n [pageIndex]=\"pageIndex\"\n [pageSize]=\"pageSize\"\n [isEmptyState]=\"isEmptyResponse\"\n [emptyStateConfig]=\"emptyStateConfig\"\n [showSearchBar]=\"false\"\n [showFilterButton]=\"false\"\n [showSettingsButton]=\"false\"\n [showAutoRefreshButton]=\"false\"\n [showOtherButton]=\"false\"\n [showFilterPanel]=\"false\"\n [serverSidePagination]=\"false\"\n (pageChange)=\"onPageChange($event)\">\n </cqa-table-template>\n \n <div *ngIf=\"isEmptyResponse\" class=\"cqa-text-[10px] cqa-text-[#45556C] cqa-py-4 cqa-text-center\">\n No data returned from this query.\n </div>\n </div>\n </div>\n</div>\n\n", components: [{ type: BadgeComponent, selector: "cqa-badge", inputs: ["type", "label", "icon", "iconLibrary", "variant", "size", "backgroundColor", "textColor", "borderColor", "iconBackgroundColor", "iconColor", "iconSize", "inlineStyles", "key", "value", "keyTextColor", "valueTextColor", "isLoading"] }, { type: TableTemplateComponent, selector: "cqa-table-template", inputs: ["searchPlaceholder", "searchValue", "showClear", "showSearchBar", "filterConfig", "showFilterPanel", "showFilterButton", "otherButtonLabel", "otherButtonVariant", "showOtherButton", "showActionButton", "showSettingsButton", "showAutoRefreshButton", "data", "isEmptyState", "emptyStateConfig", "actions", "chips", "filterApplied", "columns", "selectedAutoRefreshInterval", "pageIndex", "pageSize", "serverSidePagination", "totalElements", "isTableLoading", "isTableDataLoading"], outputs: ["onSearchChange", "onApplyFilterClick", "onResetFilterClick", "onClearAll", "removeChip", "pageChange", "onReload", "onAutoRefreshClick"] }], directives: [{ type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
11392
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DbQueryExecutionItemComponent, decorators: [{
|
|
11393
|
+
type: Component,
|
|
11394
|
+
args: [{ selector: 'cqa-db-query-execution-item', host: { class: 'cqa-ui-root' }, template: "<div class=\"cqa-border !cqa-border-b-2 cqa-border-solid cqa-rounded-lg cqa-overflow-hidden\" [ngClass]=\"{'cqa-bg-[#F8FAFC] cqa-border-[#E2E8F0]': status === 'passed', 'cqa-bg-[#FEF2F2] cqa-border-[#FFC9C9]': status === 'failed'}\">\n <!-- Header (Collapsed View) -->\n <div \n class=\"cqa-flex cqa-items-center cqa-justify-between cqa-px-4 cqa-py-2 cqa-cursor-pointer\"\n (click)=\"toggle()\"\n role=\"button\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-3 cqa-flex-1\">\n <span class=\"cqa-font-semibold cqa-text-[10px] cqa-text-[#314158]\">Query {{ queryNumber }}</span>\n \n <!-- Status Badge -->\n <cqa-badge class=\"cqa-mb-0.5\"\n *ngIf=\"status === 'passed'\"\n label=\"Passed\"\n backgroundColor=\"#DCFCE7\"\n textColor=\"#22C55E\"\n inlineStyles=\"border-radius: 50px;\"\n icon=\"check_circle\"\n size=\"small\">\n </cqa-badge>\n <cqa-badge class=\"cqa-mb-0.5\"\n *ngIf=\"status === 'failed'\"\n label=\"Failed\"\n backgroundColor=\"#FEE2E2\"\n textColor=\"#DC2626\"\n icon=\"error\"\n inlineStyles=\"border-radius: 50px;\"\n size=\"small\">\n </cqa-badge>\n \n <span class=\"cqa-text-[10px] cqa-leading-[15px] cqa-text-[#62748E]\" *ngIf=\"queryResult?.duration || queryResult?.data?.length > 0\">\n {{ formatDuration(queryResult?.duration) }}\n <span *ngIf=\"queryResult?.data?.length > 0 && queryResult?.duration\"> \u2022 </span>\n <span *ngIf=\"queryResult?.data?.length > 0\">{{ queryResult?.data?.length || 0 }} rows</span>\n </span>\n </div>\n \n <div class=\"cqa-flex cqa-items-center cqa-gap-2\">\n <button\n (click)=\"copyQuery(); $event.stopPropagation()\"\n class=\"cqa-flex cqa-items-center cqa-gap-1 cqa-px-2 cqa-py-1 cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-text-[#45556C] cqa-bg-transparent cqa-cursor-pointer\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.33332 10.6667H3.99999C3.64637 10.6667 3.30723 10.5263 3.05718 10.2762C2.80713 10.0262 2.66666 9.68704 2.66666 9.33341V4.00008C2.66666 3.64646 2.80713 3.30732 3.05718 3.05727C3.30723 2.80722 3.64637 2.66675 3.99999 2.66675H9.33332C9.68695 2.66675 10.0261 2.80722 10.2761 3.05727C10.5262 3.30732 10.6667 3.64646 10.6667 4.00008V5.33341M6.66666 13.3334H12C12.3536 13.3334 12.6928 13.1929 12.9428 12.9429C13.1928 12.6928 13.3333 12.3537 13.3333 12.0001V6.66675C13.3333 6.31313 13.1928 5.97399 12.9428 5.72394C12.6928 5.47389 12.3536 5.33341 12 5.33341H6.66666C6.31303 5.33341 5.9739 5.47389 5.72385 5.72394C5.4738 5.97399 5.33332 6.31313 5.33332 6.66675V12.0001C5.33332 12.3537 5.4738 12.6928 5.72385 12.9429C5.9739 13.1929 6.31303 13.3334 6.66666 13.3334Z\" stroke=\"#636363\" stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n Copy Query\n </button>\n <button\n (click)=\"copyResponse(); $event.stopPropagation()\"\n class=\"cqa-flex cqa-items-center cqa-gap-1 cqa-px-2 cqa-py-1 cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-text-[#45556C] cqa-bg-transparent cqa-cursor-pointer\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.33332 10.6667H3.99999C3.64637 10.6667 3.30723 10.5263 3.05718 10.2762C2.80713 10.0262 2.66666 9.68704 2.66666 9.33341V4.00008C2.66666 3.64646 2.80713 3.30732 3.05718 3.05727C3.30723 2.80722 3.64637 2.66675 3.99999 2.66675H9.33332C9.68695 2.66675 10.0261 2.80722 10.2761 3.05727C10.5262 3.30732 10.6667 3.64646 10.6667 4.00008V5.33341M6.66666 13.3334H12C12.3536 13.3334 12.6928 13.1929 12.9428 12.9429C13.1928 12.6928 13.3333 12.3537 13.3333 12.0001V6.66675C13.3333 6.31313 13.1928 5.97399 12.9428 5.72394C12.6928 5.47389 12.3536 5.33341 12 5.33341H6.66666C6.31303 5.33341 5.9739 5.47389 5.72385 5.72394C5.4738 5.97399 5.33332 6.31313 5.33332 6.66675V12.0001C5.33332 12.3537 5.4738 12.6928 5.72385 12.9429C5.9739 13.1929 6.31303 13.3334 6.66666 13.3334Z\" stroke=\"#636363\" stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n Copy Response\n </button>\n \n <!-- Chevron Icon -->\n <svg \n [class.cqa-rotate-180]=\"isExpanded\" \n class=\"cqa-transition-transform cqa-ml-2\" \n width=\"14\" \n height=\"14\" \n viewBox=\"0 0 14 14\" \n fill=\"none\" \n xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M3.5 5L7 8.5L10.5 5\" stroke=\"#9CA3AF\" stroke-width=\"0.833333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </div>\n </div>\n\n <!-- Expanded Content -->\n <div *ngIf=\"isExpanded === true\" class=\"cqa-bg-white cqa-border-t cqa-border-b-0 cqa-border-l-0 cqa-border-r-0 cqa-border-solid\" [ngClass]=\"{'cqa-border-[#E2E8F0]': status === 'passed', 'cqa-border-[#FFC9C9]': status === 'failed'}\">\n <!-- Query Section -->\n <div class=\"cqa-px-4 cqa-py-3\">\n <div class=\"cqa-text-[12px] cqa-leading-[16px] cqa-font-semibold cqa-text-[#314158] cqa-mb-2\">Query</div>\n <div class=\"cqa-relative cqa-bg-[#0F172B] cqa-rounded-[10px] cqa-p-3 cqa-overflow-hidden\">\n <button\n (click)=\"copyQuery()\"\n class=\"cqa-absolute cqa-top-2 cqa-right-2 cqa-p-1.5 cqa-cursor-pointer hover:cqa-bg-[#334155] cqa-rounded\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.33332 10.6667H3.99999C3.64637 10.6667 3.30723 10.5263 3.05718 10.2762C2.80713 10.0262 2.66666 9.68704 2.66666 9.33341V4.00008C2.66666 3.64646 2.80713 3.30732 3.05718 3.05727C3.30723 2.80722 3.64637 2.66675 3.99999 2.66675H9.33332C9.68695 2.66675 10.0261 2.80722 10.2761 3.05727C10.5262 3.30732 10.6667 3.64646 10.6667 4.00008V5.33341M6.66666 13.3334H12C12.3536 13.3334 12.6928 13.1929 12.9428 12.9429C13.1928 12.6928 13.3333 12.3537 13.3333 12.0001V6.66675C13.3333 6.31313 13.1928 5.97399 12.9428 5.72394C12.6928 5.47389 12.3536 5.33341 12 5.33341H6.66666C6.31303 5.33341 5.9739 5.47389 5.72385 5.72394C5.4738 5.97399 5.33332 6.31313 5.33332 6.66675V12.0001C5.33332 12.3537 5.4738 12.6928 5.72385 12.9429C5.9739 13.1929 6.31303 13.3334 6.66666 13.3334Z\" stroke=\"#94A3B8\" stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n <pre class=\"cqa-text-[10px] cqa-leading-[15px] cqa-text-[#F1F5F9] cqa-font-mono cqa-whitespace-pre-wrap cqa-overflow-x-auto cqa-m-0\"><code>{{ queryResult?.query }}</code></pre>\n </div>\n <div *ngIf=\"variableName\" class=\"cqa-mt-4 cqa-text-[10px] cqa-leading-[15px] cqa-text-[#45556C]\">\n Stored as variable: <span class=\"cqa-font-medium cqa-bg-[#F1F5F9] cqa-px-1 cqa-rounded-[4px] cqa-text-[#45556C]\">{{ variableName }}</span>\n </div>\n\n <div class=\"cqa-flex cqa-items-center cqa-justify-between cqa-mt-4\" *ngIf=\"queryResult?.data\">\n <div class=\"cqa-text-[12px] cqa-text-[#314158]\">Response</div>\n <button\n (click)=\"copyResponse()\"\n class=\"cqa-cursor-pointer cqa-rounded\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.33332 10.6667H3.99999C3.64637 10.6667 3.30723 10.5263 3.05718 10.2762C2.80713 10.0262 2.66666 9.68704 2.66666 9.33341V4.00008C2.66666 3.64646 2.80713 3.30732 3.05718 3.05727C3.30723 2.80722 3.64637 2.66675 3.99999 2.66675H9.33332C9.68695 2.66675 10.0261 2.80722 10.2761 3.05727C10.5262 3.30732 10.6667 3.64646 10.6667 4.00008V5.33341M6.66666 13.3334H12C12.3536 13.3334 12.6928 13.1929 12.9428 12.9429C13.1928 12.6928 13.3333 12.3537 13.3333 12.0001V6.66675C13.3333 6.31313 13.1928 5.97399 12.9428 5.72394C12.6928 5.47389 12.3536 5.33341 12 5.33341H6.66666C6.31303 5.33341 5.9739 5.47389 5.72385 5.72394C5.4738 5.97399 5.33332 6.31313 5.33332 6.66675V12.0001C5.33332 12.3537 5.4738 12.6928 5.72385 12.9429C5.9739 13.1929 6.31303 13.3334 6.66666 13.3334Z\" stroke=\"#636363\" stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n </div>\n \n <cqa-table-template\n *ngIf=\"!isEmptyResponse && queryResult?.data\"\n [columns]=\"responseTableColumns\"\n [data]=\"queryResult?.data || []\"\n [pageIndex]=\"pageIndex\"\n [pageSize]=\"pageSize\"\n [isEmptyState]=\"isEmptyResponse\"\n [emptyStateConfig]=\"emptyStateConfig\"\n [showSearchBar]=\"false\"\n [showFilterButton]=\"false\"\n [showSettingsButton]=\"false\"\n [showAutoRefreshButton]=\"false\"\n [showOtherButton]=\"false\"\n [showFilterPanel]=\"false\"\n [serverSidePagination]=\"false\"\n (pageChange)=\"onPageChange($event)\">\n </cqa-table-template>\n \n <div *ngIf=\"isEmptyResponse\" class=\"cqa-text-[10px] cqa-text-[#45556C] cqa-py-4 cqa-text-center\">\n No data returned from this query.\n </div>\n </div>\n </div>\n</div>\n\n", styles: [] }]
|
|
11395
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { queryNumber: [{
|
|
11396
|
+
type: Input
|
|
11397
|
+
}], queryKey: [{
|
|
11398
|
+
type: Input
|
|
11399
|
+
}], queryResult: [{
|
|
11400
|
+
type: Input
|
|
11401
|
+
}], status: [{
|
|
11402
|
+
type: Input
|
|
11403
|
+
}], variableName: [{
|
|
11404
|
+
type: Input
|
|
11405
|
+
}] } });
|
|
11406
|
+
|
|
11407
|
+
class DbVerificationStepComponent extends BaseStepComponent {
|
|
11408
|
+
constructor() {
|
|
11409
|
+
super(...arguments);
|
|
11410
|
+
this.verificationFilter = 'all';
|
|
11411
|
+
this.filterSegments = [
|
|
11412
|
+
{ label: 'All', value: 'all' },
|
|
11413
|
+
{ label: 'Failed only', value: 'failed' },
|
|
11414
|
+
{ label: 'Passed only', value: 'passed' },
|
|
11415
|
+
];
|
|
11416
|
+
this.verificationTableColumns = [];
|
|
11417
|
+
this.emptyStateConfig = {
|
|
11418
|
+
title: 'No Assertions',
|
|
11419
|
+
description: 'No verification assertions found for this database query.',
|
|
11420
|
+
imageUrl: EMPTY_STATE_IMAGES.DASHBOARD,
|
|
11421
|
+
actions: [],
|
|
11422
|
+
};
|
|
11423
|
+
this.pageIndex = 0;
|
|
11424
|
+
this.pageSize = 10;
|
|
11425
|
+
// Cached query results to avoid recreating components on every change detection
|
|
11426
|
+
this.cachedQueryResults = [];
|
|
11427
|
+
}
|
|
11428
|
+
ngOnInit() {
|
|
11429
|
+
this.updateConfig();
|
|
11430
|
+
this.setupTableColumns();
|
|
11431
|
+
this.updateCachedQueryResults();
|
|
11432
|
+
super.ngOnInit();
|
|
11433
|
+
if (this.expanded !== undefined) {
|
|
11434
|
+
this.isExpanded = this.expanded;
|
|
11435
|
+
}
|
|
11436
|
+
}
|
|
11437
|
+
getStatus() {
|
|
11438
|
+
return this.config?.status || this.status;
|
|
11439
|
+
}
|
|
11440
|
+
ngOnChanges(changes) {
|
|
11441
|
+
// Update config when inputs change
|
|
11442
|
+
if (changes['dbTestResult'] || changes['dbConfig'] || changes['expanded'] || changes['status'] || changes['duration']) {
|
|
11443
|
+
this.updateConfig();
|
|
11444
|
+
if (changes['dbTestResult']) {
|
|
11445
|
+
this.setupTableColumns();
|
|
11446
|
+
this.updateCachedQueryResults();
|
|
11447
|
+
}
|
|
11448
|
+
}
|
|
11449
|
+
// Update expanded state if changed
|
|
11450
|
+
if (changes['expanded'] && this.expanded !== undefined) {
|
|
11451
|
+
this.isExpanded = this.expanded;
|
|
11452
|
+
}
|
|
11453
|
+
}
|
|
11454
|
+
updateConfig() {
|
|
11455
|
+
this.config = {
|
|
11456
|
+
id: this.id,
|
|
11457
|
+
testStepResultId: this.testStepResultId,
|
|
11458
|
+
stepNumber: this.stepNumber,
|
|
11459
|
+
title: this.title,
|
|
11460
|
+
status: this.status,
|
|
11461
|
+
duration: this.duration,
|
|
11462
|
+
type: 'db-verification',
|
|
11463
|
+
dbTestResult: this.dbTestResult,
|
|
11464
|
+
dbConfig: this.dbConfig,
|
|
11465
|
+
timingBreakdown: this.timingBreakdown,
|
|
11466
|
+
expanded: this.expanded,
|
|
11467
|
+
};
|
|
11468
|
+
}
|
|
11469
|
+
toggleHeader() {
|
|
11470
|
+
this.toggle();
|
|
11471
|
+
}
|
|
11472
|
+
updateCachedQueryResults() {
|
|
11473
|
+
if (!this.dbTestResult?.results) {
|
|
11474
|
+
this.cachedQueryResults = [];
|
|
11475
|
+
return;
|
|
11476
|
+
}
|
|
11477
|
+
this.cachedQueryResults = Object.entries(this.dbTestResult.results).map(([key, result]) => ({ key, result }));
|
|
11478
|
+
}
|
|
11479
|
+
getQueryResults() {
|
|
11480
|
+
return this.cachedQueryResults;
|
|
11481
|
+
}
|
|
11482
|
+
trackByQueryKey(index, item) {
|
|
11483
|
+
return item.key;
|
|
11484
|
+
}
|
|
11485
|
+
getTotalRowsReturned() {
|
|
11486
|
+
if (!this.dbTestResult?.results)
|
|
11487
|
+
return 0;
|
|
11488
|
+
return Object.values(this.dbTestResult.results).reduce((total, result) => {
|
|
11489
|
+
return total + (Array.isArray(result.data) ? result.data.length : 0);
|
|
11490
|
+
}, 0);
|
|
11491
|
+
}
|
|
11492
|
+
getQueryStatus(queryKey) {
|
|
11493
|
+
if (!this.dbTestResult?.assertionResults)
|
|
11494
|
+
return 'passed';
|
|
11495
|
+
const queryAssertions = this.dbTestResult.assertionResults.filter(assertion => assertion.variableName === queryKey);
|
|
11496
|
+
if (queryAssertions.length === 0)
|
|
11497
|
+
return 'passed';
|
|
11498
|
+
return queryAssertions.every(a => a.passed) ? 'passed' : 'failed';
|
|
11499
|
+
}
|
|
11500
|
+
getFilteredAssertions() {
|
|
11501
|
+
if (!this.dbTestResult?.assertionResults)
|
|
11502
|
+
return [];
|
|
11503
|
+
switch (this.verificationFilter) {
|
|
11504
|
+
case 'failed':
|
|
11505
|
+
return this.dbTestResult.assertionResults.filter(a => !a.passed);
|
|
11506
|
+
case 'passed':
|
|
11507
|
+
return this.dbTestResult.assertionResults.filter(a => a.passed);
|
|
11508
|
+
default:
|
|
11509
|
+
return this.dbTestResult.assertionResults;
|
|
11510
|
+
}
|
|
11511
|
+
}
|
|
11512
|
+
setVerificationFilter(filter) {
|
|
11513
|
+
this.verificationFilter = filter;
|
|
11514
|
+
}
|
|
11515
|
+
onFilterChange(value) {
|
|
11516
|
+
this.verificationFilter = value;
|
|
11517
|
+
}
|
|
11518
|
+
setupTableColumns() {
|
|
11519
|
+
this.verificationTableColumns = [
|
|
11520
|
+
{
|
|
11521
|
+
fieldId: 'jsonPath',
|
|
11522
|
+
fieldName: 'JSON path',
|
|
11523
|
+
fieldValue: 'jsonPath',
|
|
11524
|
+
isShow: true,
|
|
11525
|
+
weight: 2,
|
|
11526
|
+
render: (row) => {
|
|
11527
|
+
return `
|
|
11528
|
+
<div class="cqa-text-[12px] cqa-text-[#4B5563] cqa-font-mono">
|
|
11529
|
+
${this.escapeHtml(row.jsonPath)}
|
|
11530
|
+
</div>
|
|
11531
|
+
`;
|
|
11532
|
+
}
|
|
11533
|
+
},
|
|
11534
|
+
{
|
|
11535
|
+
fieldId: 'verificationType',
|
|
11536
|
+
fieldName: 'Verification type',
|
|
11537
|
+
fieldValue: 'verificationType',
|
|
11538
|
+
isShow: true,
|
|
11539
|
+
weight: 1.5,
|
|
11540
|
+
render: (row) => {
|
|
11541
|
+
return `
|
|
11542
|
+
<div class="cqa-text-[12px] cqa-text-[#4B5563]">
|
|
11543
|
+
${this.escapeHtml(this.formatVerificationType(row.verificationType))}
|
|
11544
|
+
</div>
|
|
11545
|
+
`;
|
|
11546
|
+
}
|
|
11547
|
+
},
|
|
11548
|
+
{
|
|
11549
|
+
fieldId: 'actualValue',
|
|
11550
|
+
fieldName: 'Actual value',
|
|
11551
|
+
fieldValue: 'actualValue',
|
|
11552
|
+
isShow: true,
|
|
11553
|
+
weight: 1.5,
|
|
11554
|
+
render: (row) => {
|
|
11555
|
+
const value = typeof row.actualValue === 'object' ? JSON.stringify(row.actualValue) : String(row.actualValue);
|
|
11556
|
+
return `
|
|
11557
|
+
<div class="cqa-text-[12px] cqa-text-[#4B5563]">
|
|
11558
|
+
${this.escapeHtml(value)}
|
|
11559
|
+
</div>
|
|
11560
|
+
`;
|
|
11561
|
+
}
|
|
11562
|
+
},
|
|
11563
|
+
{
|
|
11564
|
+
fieldId: 'expectedValue',
|
|
11565
|
+
fieldName: 'Expected value',
|
|
11566
|
+
fieldValue: 'expectedValue',
|
|
11567
|
+
isShow: true,
|
|
11568
|
+
weight: 1.5,
|
|
11569
|
+
render: (row) => {
|
|
11570
|
+
const value = typeof row.expectedValue === 'object' ? JSON.stringify(row.expectedValue) : String(row.expectedValue);
|
|
11571
|
+
return `
|
|
11572
|
+
<div class="cqa-text-[12px] cqa-text-[#4B5563]">
|
|
11573
|
+
${this.escapeHtml(value)}
|
|
11574
|
+
</div>
|
|
11575
|
+
`;
|
|
11576
|
+
}
|
|
11577
|
+
},
|
|
11578
|
+
{
|
|
11579
|
+
fieldId: 'result',
|
|
11580
|
+
fieldName: 'Result',
|
|
11581
|
+
fieldValue: 'passed',
|
|
11582
|
+
isShow: true,
|
|
11583
|
+
weight: 1,
|
|
11584
|
+
render: (row) => {
|
|
11585
|
+
if (row.passed) {
|
|
11586
|
+
return `
|
|
11587
|
+
<span class="cqa-inline-block cqa-text-center cqa-w-11 cqa-px-2 cqa-py-1 cqa-rounded-[5px] cqa-text-[12px] cqa-bg-[#2E7D32] cqa-text-[#FFFFFF]">
|
|
11588
|
+
Pass
|
|
11589
|
+
</span>
|
|
11590
|
+
`;
|
|
11591
|
+
}
|
|
11592
|
+
else {
|
|
11593
|
+
return `
|
|
11594
|
+
<span class="cqa-inline-block cqa-text-center cqa-w-11 cqa-px-2 cqa-py-1 cqa-rounded-[5px] cqa-text-[12px] cqa-bg-[#DC2626] cqa-text-[#FFFFFF]">
|
|
11595
|
+
Fail
|
|
11596
|
+
</span>
|
|
11597
|
+
`;
|
|
11598
|
+
}
|
|
11599
|
+
}
|
|
11600
|
+
},
|
|
11601
|
+
];
|
|
11602
|
+
}
|
|
11603
|
+
escapeHtml(text) {
|
|
11604
|
+
const div = document.createElement('div');
|
|
11605
|
+
div.textContent = text;
|
|
11606
|
+
return div.innerHTML;
|
|
11607
|
+
}
|
|
11608
|
+
getTableData() {
|
|
11609
|
+
return this.getFilteredAssertions();
|
|
11610
|
+
}
|
|
11611
|
+
get isEmptyTable() {
|
|
11612
|
+
return this.getTableData().length === 0;
|
|
11613
|
+
}
|
|
11614
|
+
onPageChange(event) {
|
|
11615
|
+
this.pageIndex = event.pageIndex;
|
|
11616
|
+
this.pageSize = event.pageSize;
|
|
11617
|
+
}
|
|
11618
|
+
copyQuery(query) {
|
|
11619
|
+
navigator.clipboard.writeText(query).then(() => {
|
|
11620
|
+
});
|
|
11621
|
+
}
|
|
11622
|
+
copyResponse(queryResult) {
|
|
11623
|
+
const response = JSON.stringify(queryResult.data, null, 2);
|
|
11624
|
+
navigator.clipboard.writeText(response).then(() => {
|
|
11625
|
+
});
|
|
11626
|
+
}
|
|
11627
|
+
copyEnvironment() {
|
|
11628
|
+
if (this.dbConfig?.name) {
|
|
11629
|
+
navigator.clipboard.writeText(this.dbConfig.name).then(() => {
|
|
11630
|
+
});
|
|
11631
|
+
}
|
|
11632
|
+
}
|
|
11633
|
+
getFailureMessage() {
|
|
11634
|
+
if (!this.dbTestResult || this.dbTestResult.allAssertionsPassed)
|
|
11635
|
+
return null;
|
|
11636
|
+
const failedAssertion = this.dbTestResult.assertionResults?.find(a => !a.passed);
|
|
11637
|
+
if (failedAssertion) {
|
|
11638
|
+
const queryKey = failedAssertion.variableName;
|
|
11639
|
+
const queryIndex = this.getQueryResults().findIndex(q => q.key === queryKey) + 1;
|
|
11640
|
+
return `Assertion failed in Query ${queryIndex}. Expected value "${failedAssertion.expectedValue}" but got "${failedAssertion.actualValue}".`;
|
|
11641
|
+
}
|
|
11642
|
+
return null;
|
|
11643
|
+
}
|
|
11644
|
+
formatVerificationType(type) {
|
|
11645
|
+
const typeMap = {
|
|
11646
|
+
'equals': 'Equals',
|
|
11647
|
+
'not_equals': 'Not Equals',
|
|
11648
|
+
'contains': 'Contains',
|
|
11649
|
+
'not_contains': 'Not Contains',
|
|
11650
|
+
'greater_than': 'Greater Than',
|
|
11651
|
+
'less_than': 'Less Than',
|
|
11652
|
+
'greater_than_or_equals': 'Greater Than Or Equals',
|
|
11653
|
+
'less_than_or_equals': 'Less Than Or Equals',
|
|
11654
|
+
'exists': 'Exists',
|
|
11655
|
+
'not_exists': 'Not Exists',
|
|
11656
|
+
};
|
|
11657
|
+
return typeMap[type] || type;
|
|
11658
|
+
}
|
|
11659
|
+
}
|
|
11660
|
+
DbVerificationStepComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DbVerificationStepComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
11661
|
+
DbVerificationStepComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: DbVerificationStepComponent, selector: "cqa-db-verification-step", inputs: { id: "id", testStepResultId: "testStepResultId", stepNumber: "stepNumber", title: "title", status: "status", duration: "duration", timingBreakdown: "timingBreakdown", expanded: "expanded", dbTestResult: "dbTestResult", dbConfig: "dbConfig" }, host: { classAttribute: "cqa-ui-root" }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div>\n <!-- Header -->\n <div\n class=\"cqa-flex cqa-items-center cqa-gap-2 cqa-p-2 cqa-cursor-pointer\"\n (click)=\"toggleHeader()\"\n style=\"border-bottom: 1px solid #F3F4F6\">\n \n <!-- Status Icon -->\n <!-- Success -->\n <div *ngIf=\"getStatus().toLowerCase() === 'success'\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.9005 4.99999C11.1289 6.12064 10.9662 7.28571 10.4395 8.30089C9.91279 9.31608 9.054 10.12 8.00631 10.5787C6.95862 11.0373 5.78536 11.1229 4.6822 10.8212C3.57904 10.5195 2.61265 9.84869 1.94419 8.92071C1.27573 7.99272 0.945611 6.86361 1.00888 5.72169C1.07215 4.57976 1.52499 3.49404 2.29188 2.64558C3.05876 1.79712 4.09334 1.23721 5.22308 1.05922C6.35282 0.881233 7.50944 1.09592 8.50005 1.66749\" stroke=\"#22C55E\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M4.5 5.5L6 7L11 2\" stroke=\"#22C55E\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </div>\n <!-- Failure -->\n <div *ngIf=\"getStatus().toLowerCase() === 'failure' || getStatus().toLowerCase() === 'failed'\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 11C8.76142 11 11 8.76142 11 6C11 3.23858 8.76142 1 6 1C3.23858 1 1 3.23858 1 6C1 8.76142 3.23858 11 6 11Z\" stroke=\"#DC2626\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M7.5 4.5L4.5 7.5\" stroke=\"#DC2626\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M4.5 4.5L7.5 7.5\" stroke=\"#DC2626\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </div>\n <!-- Pending -->\n <div *ngIf=\"getStatus().toLowerCase() === 'pending'\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 11C8.76142 11 11 8.76142 11 6C11 3.23858 8.76142 1 6 1C3.23858 1 1 3.23858 1 6C1 8.76142 3.23858 11 6 11Z\" stroke=\"#9CA3AF\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M6 3V6L8 7\" stroke=\"#9CA3AF\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </div>\n <!-- Running - Show spinner -->\n <div *ngIf=\"getStatus().toLowerCase() === 'running'\">\n <svg class=\"cqa-animate-spin cqa-text-[#3B82F6]\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"6\" cy=\"6\" r=\"5\" stroke=\"currentColor\" stroke-width=\"1.5\" fill=\"none\" opacity=\"0.25\"/>\n <path d=\"M6 1A5 5 0 0 1 11 6\" stroke=\"currentColor\" stroke-width=\"1.5\" fill=\"none\" stroke-linecap=\"round\"/>\n </svg>\n </div>\n\n <div><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"16\" viewBox=\"0 0 20 16\" fill=\"none\">\n <rect width=\"20\" height=\"16\" rx=\"4\" fill=\"#F0F0F1\"/>\n <path d=\"M13.5 3.5H6.5C5.95 3.5 5.5 3.95 5.5 4.5V11.5C5.5 12.05 5.95 12.5 6.5 12.5H13.5C14.05 12.5 14.5 12.05 14.5 11.5V4.5C14.5 3.95 14.05 3.5 13.5 3.5ZM13.5 4.5V6H6.5V4.5H13.5ZM13.5 7V9H6.5V7H13.5ZM6.5 11.5V10H13.5V11.5H6.5Z\" fill=\"#212122\"/>\n </svg></div>\n\n <!-- Step Number and Title -->\n <div class=\"cqa-font-bold cqa-flex-1 cqa-text-[#334155] cqa-text-[11px] cqa-leading-[13px]\">\n {{ stepNumber }}. <span [innerHTML]=\"title\"></span> \n \n <span class=\"cqa-ml-1 cqa-px-1.5 cqa-py-0.5 cqa-rounded-full cqa-font-medium cqa-text-[#212122] cqa-bg-[#F0F0F1] cqa-text-[10px] cqa-leading-[15px] cqa-min-w-max\">\n Database\n </span>\n\n </div>\n <div class=\"cqa-flex cqa-items-center cqa-gap-1\">\n <span class=\"cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-text-[#9CA3AF]\">\n {{ formatDuration(duration) }}\n </span>\n <svg [class.cqa-rotate-180]=\"isExpanded\" class=\"cqa-transition-transform\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.5 5L7 8.5L10.5 5\" stroke=\"#9CA3AF\" stroke-width=\"0.833333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </div>\n </div>\n\n <!-- Expanded Content -->\n <div *ngIf=\"isExpanded && dbTestResult\" class=\"cqa-p-2 !cqa-pl-9 !cqa-pr-6 cqa-bg-white\">\n <!-- Summary Bar -->\n <div class=\"cqa-mb-1.5 cqa-p-3 cqa-bg-[#FCFCFC] cqa-rounded-[6px] cqa-flex cqa-flex-col cqa-gap-2\" style=\"border: 1px solid #E5E7EB;\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-4\">\n <!-- Status Badge -->\n <cqa-badge\n *ngIf=\"getStatus().toLowerCase() === 'failure' || getStatus().toLowerCase() === 'failed'\"\n label=\"FAIL\"\n backgroundColor=\"#DC2626\"\n textColor=\"#FFFFFF\"\n size=\"small\">\n </cqa-badge>\n <cqa-badge\n *ngIf=\"getStatus().toLowerCase() === 'success'\"\n label=\"PASS\"\n backgroundColor=\"#22C55E\"\n textColor=\"#FFFFFF\"\n size=\"small\">\n </cqa-badge>\n\n <div class=\"cqa-h-[19px] cqa-w-[1px] cqa-bg-[#E5E7EB]\"></div>\n \n <!-- Summary Stats -->\n <div class=\"cqa-flex cqa-items-center cqa-gap-4 cqa-text-[11px] cqa-leading-[16px] cqa-text-[#6B7280]\">\n <span class=\"cqa-font-medium cqa-text-[10px] cqa-text-[#111827]\">Total Time: <span class=\"cqa-text-[#4B5563]\">{{ formatDuration(duration) }}</span></span>\n <span class=\"cqa-font-medium cqa-text-[10px] cqa-text-[#111827]\">Queries: <span class=\"cqa-text-[#4B5563]\">{{ cachedQueryResults?.length || 0 }}</span></span>\n <span class=\"cqa-font-medium cqa-text-[10px] cqa-text-[#111827]\">Assertions: <span class=\"cqa-text-[#4B5563]\">{{ dbTestResult?.assertionResults?.length || 0 }}</span></span>\n <span class=\"cqa-font-medium cqa-text-[10px] cqa-text-[#111827]\">Rows Returned: <span class=\"cqa-text-[#4B5563]\">{{ getTotalRowsReturned() }}</span></span>\n </div>\n </div>\n\n <!-- Failure Banner -->\n <div \n *ngIf=\"getFailureMessage()\"\n class=\"cqa-flex cqa-px-2 cqa-py-1 cqa-bg-[#FEF2F2] cqa-rounded-[4px]\" style=\"border: 1px solid #FEE2E2;\">\n <span class=\"cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-text-[#B91C1C]\">\n {{ getFailureMessage() }}\n </span>\n </div>\n </div>\n\n <!-- Database Environment Section -->\n <div *ngIf=\"dbConfig\" class=\"cqa-mb-1.5\">\n <div class=\"cqa-text-[12px] cqa-font-semibold cqa-text-[#0B0B0B] cqa-mb-2\">Database environment</div>\n <div class=\"cqa-bg-white cqa-rounded-lg cqa-border cqa-border-solid cqa-border-[#E5E7EB] cqa-px-4 cqa-py-2 cqa-relative cqa-flex cqa-flex-wrap cqa-gap-3\">\n <!-- Environment -->\n <div class=\"\">\n <div class=\"cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-text-[#45556C] cqa-mb-1\">Environment</div>\n <div class=\"cqa-flex cqa-items-center cqa-gap-4\">\n <span class=\"cqa-text-[10px] cqa-leading-[15px] cqa-text-[#0F172B]\">{{ dbConfig.name }}</span>\n <span (click)=\"copyEnvironment()\" class=\"cqa-cursor-pointer\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.33332 10.6667H3.99999C3.64637 10.6667 3.30723 10.5263 3.05718 10.2762C2.80713 10.0262 2.66666 9.68704 2.66666 9.33341V4.00008C2.66666 3.64646 2.80713 3.30732 3.05718 3.05727C3.30723 2.80722 3.64637 2.66675 3.99999 2.66675H9.33332C9.68695 2.66675 10.0261 2.80722 10.2761 3.05727C10.5262 3.30732 10.6667 3.64646 10.6667 4.00008V5.33341M6.66666 13.3334H12C12.3536 13.3334 12.6928 13.1929 12.9428 12.9429C13.1928 12.6928 13.3333 12.3537 13.3333 12.0001V6.66675C13.3333 6.31313 13.1928 5.97399 12.9428 5.72394C12.6928 5.47389 12.3536 5.33341 12 5.33341H6.66666C6.31303 5.33341 5.9739 5.47389 5.72385 5.72394C5.4738 5.97399 5.33332 6.31313 5.33332 6.66675V12.0001C5.33332 12.3537 5.4738 12.6928 5.72385 12.9429C5.9739 13.1929 6.31303 13.3334 6.66666 13.3334Z\" stroke=\"#636363\" stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </span>\n </div>\n </div>\n \n <div class=\"\">\n <div class=\"cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-text-[#45556C] cqa-mb-1\">Type</div>\n <div class=\"cqa-text-[10px] cqa-leading-[15px] cqa-text-[#0F172B]\">{{ dbConfig.dbType }}</div>\n </div>\n </div>\n </div>\n\n <div class=\"cqa-mb-1.5\">\n <div class=\"cqa-text-[12px] cqa-font-semibold cqa-text-[#0B0B0B] cqa-mb-2\">Query Execution</div>\n <div class=\"cqa-flex cqa-flex-col cqa-gap-2 cqa-px-4 cqa-py-2 cqa-bg-white cqa-rounded-[10px]\" style=\"border: 1px solid #E2E8F0;\">\n <cqa-db-query-execution-item\n *ngFor=\"let queryItem of cachedQueryResults; let i = index; trackBy: trackByQueryKey\"\n [queryNumber]=\"i + 1\"\n [queryKey]=\"queryItem.key\"\n [queryResult]=\"queryItem.result\"\n [status]=\"getQueryStatus(queryItem.key)\"\n [variableName]=\"queryItem.key\">\n </cqa-db-query-execution-item>\n </div>\n </div>\n\n <!-- Verification Section -->\n <div *ngIf=\"dbTestResult.assertionResults && dbTestResult.assertionResults.length > 0\">\n <div class=\"cqa-text-[12px] cqa-font-semibold cqa-text-[#0B0B0B] cqa-mb-2\">Verification</div> \n <!-- Verification Table -->\n <div class=\"cqa-bg-white cqa-rounded-[10px] cqa-px-4 cqa-py-2 cqa-overflow-hidden\" style=\"border: 1px solid #E2E8F0;\">\n <!-- Segment Control for Filters -->\n <cqa-segment-control\n [segments]=\"filterSegments\"\n [value]=\"verificationFilter\"\n (valueChange)=\"onFilterChange($event)\">\n </cqa-segment-control>\n <cqa-table-template\n [columns]=\"verificationTableColumns\"\n [data]=\"getTableData()\"\n [pageIndex]=\"pageIndex\"\n [pageSize]=\"pageSize\"\n [isEmptyState]=\"isEmptyTable\"\n [emptyStateConfig]=\"emptyStateConfig\"\n [showSearchBar]=\"false\"\n [showFilterButton]=\"false\"\n [showSettingsButton]=\"false\"\n [showAutoRefreshButton]=\"false\"\n [showOtherButton]=\"false\"\n [showFilterPanel]=\"false\"\n [serverSidePagination]=\"false\"\n (pageChange)=\"onPageChange($event)\">\n </cqa-table-template>\n </div>\n </div>\n\n <!-- Timing Breakdown -->\n <div *ngIf=\"timingBreakdown\" class=\"cqa-flex cqa-items-center cqa-justify-end cqa-gap-5 cqa-pt-4 cqa-px-4 cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-text-[#9CA3AF]\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-2\">\n <div><svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 11C8.76142 11 11 8.76142 11 6C11 3.23858 8.76142 1 6 1C3.23858 1 1 3.23858 1 6C1 8.76142 3.23858 11 6 11Z\" stroke=\"#9CA3AF\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M6 3V6L8 7\" stroke=\"#9CA3AF\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg></div>\n <span>Timing breakdown</span>\n </div>\n <span class=\"cqa-text-dialog-muted cqa-flex cqa-items-center cqa-gap-3\">\n <div>\n App <span class=\"cqa-text-[#374151]\">{{ formatDuration(timingBreakdown.app) }}</span>\n </div>\n <div><svg width=\"1\" height=\"11\" viewBox=\"0 0 1 11\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M-3.8147e-06 10.32V-7.15256e-07H0.959996V10.32H-3.8147e-06Z\" fill=\"#E5E7EB\"/></svg></div>\n <div>\n Tool <span class=\"cqa-text-[#374151]\">{{ formatDuration(timingBreakdown.tool) }}</span>\n </div>\n </span>\n </div>\n </div>\n</div>\n\n", components: [{ type: BadgeComponent, selector: "cqa-badge", inputs: ["type", "label", "icon", "iconLibrary", "variant", "size", "backgroundColor", "textColor", "borderColor", "iconBackgroundColor", "iconColor", "iconSize", "inlineStyles", "key", "value", "keyTextColor", "valueTextColor", "isLoading"] }, { type: DbQueryExecutionItemComponent, selector: "cqa-db-query-execution-item", inputs: ["queryNumber", "queryKey", "queryResult", "status", "variableName"] }, { type: SegmentControlComponent, selector: "cqa-segment-control", inputs: ["segments", "value", "disabled"], outputs: ["valueChange"] }, { type: TableTemplateComponent, selector: "cqa-table-template", inputs: ["searchPlaceholder", "searchValue", "showClear", "showSearchBar", "filterConfig", "showFilterPanel", "showFilterButton", "otherButtonLabel", "otherButtonVariant", "showOtherButton", "showActionButton", "showSettingsButton", "showAutoRefreshButton", "data", "isEmptyState", "emptyStateConfig", "actions", "chips", "filterApplied", "columns", "selectedAutoRefreshInterval", "pageIndex", "pageSize", "serverSidePagination", "totalElements", "isTableLoading", "isTableDataLoading"], outputs: ["onSearchChange", "onApplyFilterClick", "onResetFilterClick", "onClearAll", "removeChip", "pageChange", "onReload", "onAutoRefreshClick"] }], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
11662
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: DbVerificationStepComponent, decorators: [{
|
|
11663
|
+
type: Component,
|
|
11664
|
+
args: [{ selector: 'cqa-db-verification-step', host: { class: 'cqa-ui-root' }, template: "<div>\n <!-- Header -->\n <div\n class=\"cqa-flex cqa-items-center cqa-gap-2 cqa-p-2 cqa-cursor-pointer\"\n (click)=\"toggleHeader()\"\n style=\"border-bottom: 1px solid #F3F4F6\">\n \n <!-- Status Icon -->\n <!-- Success -->\n <div *ngIf=\"getStatus().toLowerCase() === 'success'\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.9005 4.99999C11.1289 6.12064 10.9662 7.28571 10.4395 8.30089C9.91279 9.31608 9.054 10.12 8.00631 10.5787C6.95862 11.0373 5.78536 11.1229 4.6822 10.8212C3.57904 10.5195 2.61265 9.84869 1.94419 8.92071C1.27573 7.99272 0.945611 6.86361 1.00888 5.72169C1.07215 4.57976 1.52499 3.49404 2.29188 2.64558C3.05876 1.79712 4.09334 1.23721 5.22308 1.05922C6.35282 0.881233 7.50944 1.09592 8.50005 1.66749\" stroke=\"#22C55E\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M4.5 5.5L6 7L11 2\" stroke=\"#22C55E\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </div>\n <!-- Failure -->\n <div *ngIf=\"getStatus().toLowerCase() === 'failure' || getStatus().toLowerCase() === 'failed'\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 11C8.76142 11 11 8.76142 11 6C11 3.23858 8.76142 1 6 1C3.23858 1 1 3.23858 1 6C1 8.76142 3.23858 11 6 11Z\" stroke=\"#DC2626\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M7.5 4.5L4.5 7.5\" stroke=\"#DC2626\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M4.5 4.5L7.5 7.5\" stroke=\"#DC2626\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </div>\n <!-- Pending -->\n <div *ngIf=\"getStatus().toLowerCase() === 'pending'\">\n <svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 11C8.76142 11 11 8.76142 11 6C11 3.23858 8.76142 1 6 1C3.23858 1 1 3.23858 1 6C1 8.76142 3.23858 11 6 11Z\" stroke=\"#9CA3AF\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M6 3V6L8 7\" stroke=\"#9CA3AF\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </div>\n <!-- Running - Show spinner -->\n <div *ngIf=\"getStatus().toLowerCase() === 'running'\">\n <svg class=\"cqa-animate-spin cqa-text-[#3B82F6]\" width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"6\" cy=\"6\" r=\"5\" stroke=\"currentColor\" stroke-width=\"1.5\" fill=\"none\" opacity=\"0.25\"/>\n <path d=\"M6 1A5 5 0 0 1 11 6\" stroke=\"currentColor\" stroke-width=\"1.5\" fill=\"none\" stroke-linecap=\"round\"/>\n </svg>\n </div>\n\n <div><svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"16\" viewBox=\"0 0 20 16\" fill=\"none\">\n <rect width=\"20\" height=\"16\" rx=\"4\" fill=\"#F0F0F1\"/>\n <path d=\"M13.5 3.5H6.5C5.95 3.5 5.5 3.95 5.5 4.5V11.5C5.5 12.05 5.95 12.5 6.5 12.5H13.5C14.05 12.5 14.5 12.05 14.5 11.5V4.5C14.5 3.95 14.05 3.5 13.5 3.5ZM13.5 4.5V6H6.5V4.5H13.5ZM13.5 7V9H6.5V7H13.5ZM6.5 11.5V10H13.5V11.5H6.5Z\" fill=\"#212122\"/>\n </svg></div>\n\n <!-- Step Number and Title -->\n <div class=\"cqa-font-bold cqa-flex-1 cqa-text-[#334155] cqa-text-[11px] cqa-leading-[13px]\">\n {{ stepNumber }}. <span [innerHTML]=\"title\"></span> \n \n <span class=\"cqa-ml-1 cqa-px-1.5 cqa-py-0.5 cqa-rounded-full cqa-font-medium cqa-text-[#212122] cqa-bg-[#F0F0F1] cqa-text-[10px] cqa-leading-[15px] cqa-min-w-max\">\n Database\n </span>\n\n </div>\n <div class=\"cqa-flex cqa-items-center cqa-gap-1\">\n <span class=\"cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-text-[#9CA3AF]\">\n {{ formatDuration(duration) }}\n </span>\n <svg [class.cqa-rotate-180]=\"isExpanded\" class=\"cqa-transition-transform\" width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M3.5 5L7 8.5L10.5 5\" stroke=\"#9CA3AF\" stroke-width=\"0.833333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </div>\n </div>\n\n <!-- Expanded Content -->\n <div *ngIf=\"isExpanded && dbTestResult\" class=\"cqa-p-2 !cqa-pl-9 !cqa-pr-6 cqa-bg-white\">\n <!-- Summary Bar -->\n <div class=\"cqa-mb-1.5 cqa-p-3 cqa-bg-[#FCFCFC] cqa-rounded-[6px] cqa-flex cqa-flex-col cqa-gap-2\" style=\"border: 1px solid #E5E7EB;\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-4\">\n <!-- Status Badge -->\n <cqa-badge\n *ngIf=\"getStatus().toLowerCase() === 'failure' || getStatus().toLowerCase() === 'failed'\"\n label=\"FAIL\"\n backgroundColor=\"#DC2626\"\n textColor=\"#FFFFFF\"\n size=\"small\">\n </cqa-badge>\n <cqa-badge\n *ngIf=\"getStatus().toLowerCase() === 'success'\"\n label=\"PASS\"\n backgroundColor=\"#22C55E\"\n textColor=\"#FFFFFF\"\n size=\"small\">\n </cqa-badge>\n\n <div class=\"cqa-h-[19px] cqa-w-[1px] cqa-bg-[#E5E7EB]\"></div>\n \n <!-- Summary Stats -->\n <div class=\"cqa-flex cqa-items-center cqa-gap-4 cqa-text-[11px] cqa-leading-[16px] cqa-text-[#6B7280]\">\n <span class=\"cqa-font-medium cqa-text-[10px] cqa-text-[#111827]\">Total Time: <span class=\"cqa-text-[#4B5563]\">{{ formatDuration(duration) }}</span></span>\n <span class=\"cqa-font-medium cqa-text-[10px] cqa-text-[#111827]\">Queries: <span class=\"cqa-text-[#4B5563]\">{{ cachedQueryResults?.length || 0 }}</span></span>\n <span class=\"cqa-font-medium cqa-text-[10px] cqa-text-[#111827]\">Assertions: <span class=\"cqa-text-[#4B5563]\">{{ dbTestResult?.assertionResults?.length || 0 }}</span></span>\n <span class=\"cqa-font-medium cqa-text-[10px] cqa-text-[#111827]\">Rows Returned: <span class=\"cqa-text-[#4B5563]\">{{ getTotalRowsReturned() }}</span></span>\n </div>\n </div>\n\n <!-- Failure Banner -->\n <div \n *ngIf=\"getFailureMessage()\"\n class=\"cqa-flex cqa-px-2 cqa-py-1 cqa-bg-[#FEF2F2] cqa-rounded-[4px]\" style=\"border: 1px solid #FEE2E2;\">\n <span class=\"cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-text-[#B91C1C]\">\n {{ getFailureMessage() }}\n </span>\n </div>\n </div>\n\n <!-- Database Environment Section -->\n <div *ngIf=\"dbConfig\" class=\"cqa-mb-1.5\">\n <div class=\"cqa-text-[12px] cqa-font-semibold cqa-text-[#0B0B0B] cqa-mb-2\">Database environment</div>\n <div class=\"cqa-bg-white cqa-rounded-lg cqa-border cqa-border-solid cqa-border-[#E5E7EB] cqa-px-4 cqa-py-2 cqa-relative cqa-flex cqa-flex-wrap cqa-gap-3\">\n <!-- Environment -->\n <div class=\"\">\n <div class=\"cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-text-[#45556C] cqa-mb-1\">Environment</div>\n <div class=\"cqa-flex cqa-items-center cqa-gap-4\">\n <span class=\"cqa-text-[10px] cqa-leading-[15px] cqa-text-[#0F172B]\">{{ dbConfig.name }}</span>\n <span (click)=\"copyEnvironment()\" class=\"cqa-cursor-pointer\">\n <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.33332 10.6667H3.99999C3.64637 10.6667 3.30723 10.5263 3.05718 10.2762C2.80713 10.0262 2.66666 9.68704 2.66666 9.33341V4.00008C2.66666 3.64646 2.80713 3.30732 3.05718 3.05727C3.30723 2.80722 3.64637 2.66675 3.99999 2.66675H9.33332C9.68695 2.66675 10.0261 2.80722 10.2761 3.05727C10.5262 3.30732 10.6667 3.64646 10.6667 4.00008V5.33341M6.66666 13.3334H12C12.3536 13.3334 12.6928 13.1929 12.9428 12.9429C13.1928 12.6928 13.3333 12.3537 13.3333 12.0001V6.66675C13.3333 6.31313 13.1928 5.97399 12.9428 5.72394C12.6928 5.47389 12.3536 5.33341 12 5.33341H6.66666C6.31303 5.33341 5.9739 5.47389 5.72385 5.72394C5.4738 5.97399 5.33332 6.31313 5.33332 6.66675V12.0001C5.33332 12.3537 5.4738 12.6928 5.72385 12.9429C5.9739 13.1929 6.31303 13.3334 6.66666 13.3334Z\" stroke=\"#636363\" stroke-width=\"1.33333\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>\n </span>\n </div>\n </div>\n \n <div class=\"\">\n <div class=\"cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-text-[#45556C] cqa-mb-1\">Type</div>\n <div class=\"cqa-text-[10px] cqa-leading-[15px] cqa-text-[#0F172B]\">{{ dbConfig.dbType }}</div>\n </div>\n </div>\n </div>\n\n <div class=\"cqa-mb-1.5\">\n <div class=\"cqa-text-[12px] cqa-font-semibold cqa-text-[#0B0B0B] cqa-mb-2\">Query Execution</div>\n <div class=\"cqa-flex cqa-flex-col cqa-gap-2 cqa-px-4 cqa-py-2 cqa-bg-white cqa-rounded-[10px]\" style=\"border: 1px solid #E2E8F0;\">\n <cqa-db-query-execution-item\n *ngFor=\"let queryItem of cachedQueryResults; let i = index; trackBy: trackByQueryKey\"\n [queryNumber]=\"i + 1\"\n [queryKey]=\"queryItem.key\"\n [queryResult]=\"queryItem.result\"\n [status]=\"getQueryStatus(queryItem.key)\"\n [variableName]=\"queryItem.key\">\n </cqa-db-query-execution-item>\n </div>\n </div>\n\n <!-- Verification Section -->\n <div *ngIf=\"dbTestResult.assertionResults && dbTestResult.assertionResults.length > 0\">\n <div class=\"cqa-text-[12px] cqa-font-semibold cqa-text-[#0B0B0B] cqa-mb-2\">Verification</div> \n <!-- Verification Table -->\n <div class=\"cqa-bg-white cqa-rounded-[10px] cqa-px-4 cqa-py-2 cqa-overflow-hidden\" style=\"border: 1px solid #E2E8F0;\">\n <!-- Segment Control for Filters -->\n <cqa-segment-control\n [segments]=\"filterSegments\"\n [value]=\"verificationFilter\"\n (valueChange)=\"onFilterChange($event)\">\n </cqa-segment-control>\n <cqa-table-template\n [columns]=\"verificationTableColumns\"\n [data]=\"getTableData()\"\n [pageIndex]=\"pageIndex\"\n [pageSize]=\"pageSize\"\n [isEmptyState]=\"isEmptyTable\"\n [emptyStateConfig]=\"emptyStateConfig\"\n [showSearchBar]=\"false\"\n [showFilterButton]=\"false\"\n [showSettingsButton]=\"false\"\n [showAutoRefreshButton]=\"false\"\n [showOtherButton]=\"false\"\n [showFilterPanel]=\"false\"\n [serverSidePagination]=\"false\"\n (pageChange)=\"onPageChange($event)\">\n </cqa-table-template>\n </div>\n </div>\n\n <!-- Timing Breakdown -->\n <div *ngIf=\"timingBreakdown\" class=\"cqa-flex cqa-items-center cqa-justify-end cqa-gap-5 cqa-pt-4 cqa-px-4 cqa-text-[10px] cqa-leading-[15px] cqa-font-medium cqa-text-[#9CA3AF]\">\n <div class=\"cqa-flex cqa-items-center cqa-gap-2\">\n <div><svg width=\"12\" height=\"12\" viewBox=\"0 0 12 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M6 11C8.76142 11 11 8.76142 11 6C11 3.23858 8.76142 1 6 1C3.23858 1 1 3.23858 1 6C1 8.76142 3.23858 11 6 11Z\" stroke=\"#9CA3AF\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/><path d=\"M6 3V6L8 7\" stroke=\"#9CA3AF\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg></div>\n <span>Timing breakdown</span>\n </div>\n <span class=\"cqa-text-dialog-muted cqa-flex cqa-items-center cqa-gap-3\">\n <div>\n App <span class=\"cqa-text-[#374151]\">{{ formatDuration(timingBreakdown.app) }}</span>\n </div>\n <div><svg width=\"1\" height=\"11\" viewBox=\"0 0 1 11\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M-3.8147e-06 10.32V-7.15256e-07H0.959996V10.32H-3.8147e-06Z\" fill=\"#E5E7EB\"/></svg></div>\n <div>\n Tool <span class=\"cqa-text-[#374151]\">{{ formatDuration(timingBreakdown.tool) }}</span>\n </div>\n </span>\n </div>\n </div>\n</div>\n\n", styles: [] }]
|
|
11665
|
+
}], propDecorators: { id: [{
|
|
11666
|
+
type: Input
|
|
11667
|
+
}], testStepResultId: [{
|
|
11668
|
+
type: Input
|
|
11669
|
+
}], stepNumber: [{
|
|
11670
|
+
type: Input
|
|
11671
|
+
}], title: [{
|
|
11672
|
+
type: Input
|
|
11673
|
+
}], status: [{
|
|
11674
|
+
type: Input
|
|
11675
|
+
}], duration: [{
|
|
11676
|
+
type: Input
|
|
11677
|
+
}], timingBreakdown: [{
|
|
11678
|
+
type: Input
|
|
11679
|
+
}], expanded: [{
|
|
11680
|
+
type: Input
|
|
11681
|
+
}], dbTestResult: [{
|
|
11682
|
+
type: Input
|
|
11683
|
+
}], dbConfig: [{
|
|
11684
|
+
type: Input
|
|
11685
|
+
}] } });
|
|
11686
|
+
|
|
11289
11687
|
class UiKitModule {
|
|
11290
11688
|
constructor(iconRegistry) {
|
|
11291
11689
|
iconRegistry.registerFontClassAlias('material-symbols-outlined', 'material-symbols-outlined');
|
|
@@ -11358,7 +11756,9 @@ UiKitModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "1
|
|
|
11358
11756
|
ExecutionResultModalComponent,
|
|
11359
11757
|
ProgressIndicatorComponent,
|
|
11360
11758
|
StepProgressCardComponent,
|
|
11361
|
-
StepStatusCardComponent
|
|
11759
|
+
StepStatusCardComponent,
|
|
11760
|
+
DbVerificationStepComponent,
|
|
11761
|
+
DbQueryExecutionItemComponent], imports: [CommonModule,
|
|
11362
11762
|
FormsModule,
|
|
11363
11763
|
ReactiveFormsModule,
|
|
11364
11764
|
MatIconModule,
|
|
@@ -11440,7 +11840,9 @@ UiKitModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "1
|
|
|
11440
11840
|
ExecutionResultModalComponent,
|
|
11441
11841
|
ProgressIndicatorComponent,
|
|
11442
11842
|
StepProgressCardComponent,
|
|
11443
|
-
StepStatusCardComponent
|
|
11843
|
+
StepStatusCardComponent,
|
|
11844
|
+
DbVerificationStepComponent,
|
|
11845
|
+
DbQueryExecutionItemComponent] });
|
|
11444
11846
|
UiKitModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: UiKitModule, providers: [
|
|
11445
11847
|
{ provide: OverlayContainer, useClass: TailwindOverlayContainer },
|
|
11446
11848
|
{
|
|
@@ -11457,6 +11859,7 @@ UiKitModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "1
|
|
|
11457
11859
|
['file-download', FileDownloadStepComponent],
|
|
11458
11860
|
['document-verification', DocumentVerificationStepComponent],
|
|
11459
11861
|
['live-execution', LiveExecutionStepComponent],
|
|
11862
|
+
['db-verification', DbVerificationStepComponent],
|
|
11460
11863
|
])
|
|
11461
11864
|
}
|
|
11462
11865
|
], imports: [[
|
|
@@ -11549,7 +11952,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
11549
11952
|
ExecutionResultModalComponent,
|
|
11550
11953
|
ProgressIndicatorComponent,
|
|
11551
11954
|
StepProgressCardComponent,
|
|
11552
|
-
StepStatusCardComponent
|
|
11955
|
+
StepStatusCardComponent,
|
|
11956
|
+
DbVerificationStepComponent,
|
|
11957
|
+
DbQueryExecutionItemComponent
|
|
11553
11958
|
],
|
|
11554
11959
|
imports: [
|
|
11555
11960
|
CommonModule,
|
|
@@ -11637,7 +12042,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
11637
12042
|
ExecutionResultModalComponent,
|
|
11638
12043
|
ProgressIndicatorComponent,
|
|
11639
12044
|
StepProgressCardComponent,
|
|
11640
|
-
StepStatusCardComponent
|
|
12045
|
+
StepStatusCardComponent,
|
|
12046
|
+
DbVerificationStepComponent,
|
|
12047
|
+
DbQueryExecutionItemComponent
|
|
11641
12048
|
],
|
|
11642
12049
|
providers: [
|
|
11643
12050
|
{ provide: OverlayContainer, useClass: TailwindOverlayContainer },
|
|
@@ -11655,6 +12062,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
11655
12062
|
['file-download', FileDownloadStepComponent],
|
|
11656
12063
|
['document-verification', DocumentVerificationStepComponent],
|
|
11657
12064
|
['live-execution', LiveExecutionStepComponent],
|
|
12065
|
+
['db-verification', DbVerificationStepComponent],
|
|
11658
12066
|
])
|
|
11659
12067
|
}
|
|
11660
12068
|
]
|
|
@@ -11795,5 +12203,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImpor
|
|
|
11795
12203
|
* Generated bundle index. Do not edit.
|
|
11796
12204
|
*/
|
|
11797
12205
|
|
|
11798
|
-
export { AIAgentStepComponent, ActionMenuButtonComponent, AiDebugAlertComponent, AiReasoningComponent, ApiStepComponent, BadgeComponent, BasicStepComponent, ButtonComponent, ChartCardComponent, ColumnVisibilityComponent, CompareRunsComponent, ConditionStepComponent, ConfigurationCardComponent, ConsoleAlertComponent, CoverageModuleCardComponent, CustomInputComponent, CustomTextareaComponent, DEFAULT_METADATA_COLOR, DIALOG_DATA, DIALOG_REF, DashboardHeaderComponent, DaterangepickerComponent, DaterangepickerDirective, DialogComponent, DialogRef, DialogService, DocumentVerificationStepComponent, DropdownButtonComponent, DynamicCellContainerDirective, DynamicCellTemplateDirective, DynamicFilterComponent, DynamicHeaderTemplateDirective, DynamicSelectFieldComponent, DynamicTableComponent, EMPTY_STATE_IMAGES, EMPTY_STATE_PRESETS, EmptyStateComponent, ExecutionResultModalComponent, FailedStepCardComponent, FailedStepComponent, FailedTestCasesCardComponent, FileDownloadStepComponent, FullTableLoaderComponent, HeatErrorMapCellComponent, InsightCardComponent, IterationsLoopComponent, LiveExecutionStepComponent, LoopStepComponent, MainStepCollapseComponent, MetricsCardComponent, NetworkRequestComponent, OtherButtonComponent, PRIORITY_COLORS, PaginationComponent, ProgressIndicatorComponent, ProgressTextCardComponent, RESULT_COLORS, RunHistoryCardComponent, STATUS_COLORS, SearchBarComponent, SegmentControlComponent, SelectedFiltersComponent, SelfHealAnalysisComponent, SimulatorComponent, StepGroupComponent, StepProgressCardComponent, StepRendererComponent, StepStatusCardComponent, TableActionToolbarComponent, TableDataLoaderComponent, TableTemplateComponent, TailwindOverlayContainer, TestDistributionCardComponent, UiKitModule, UpdatedFailedStepComponent, ViewMoreFailedStepButtonComponent, VisualComparisonComponent, VisualDifferenceModalComponent, getEmptyStatePreset, getMetadataColor, getMetadataValueStyle };
|
|
12206
|
+
export { AIAgentStepComponent, ActionMenuButtonComponent, AiDebugAlertComponent, AiReasoningComponent, ApiStepComponent, BadgeComponent, BasicStepComponent, ButtonComponent, ChartCardComponent, ColumnVisibilityComponent, CompareRunsComponent, ConditionStepComponent, ConfigurationCardComponent, ConsoleAlertComponent, CoverageModuleCardComponent, CustomInputComponent, CustomTextareaComponent, DEFAULT_METADATA_COLOR, DIALOG_DATA, DIALOG_REF, DashboardHeaderComponent, DaterangepickerComponent, DaterangepickerDirective, DbQueryExecutionItemComponent, DbVerificationStepComponent, DialogComponent, DialogRef, DialogService, DocumentVerificationStepComponent, DropdownButtonComponent, DynamicCellContainerDirective, DynamicCellTemplateDirective, DynamicFilterComponent, DynamicHeaderTemplateDirective, DynamicSelectFieldComponent, DynamicTableComponent, EMPTY_STATE_IMAGES, EMPTY_STATE_PRESETS, EmptyStateComponent, ExecutionResultModalComponent, FailedStepCardComponent, FailedStepComponent, FailedTestCasesCardComponent, FileDownloadStepComponent, FullTableLoaderComponent, HeatErrorMapCellComponent, InsightCardComponent, IterationsLoopComponent, LiveExecutionStepComponent, LoopStepComponent, MainStepCollapseComponent, MetricsCardComponent, NetworkRequestComponent, OtherButtonComponent, PRIORITY_COLORS, PaginationComponent, ProgressIndicatorComponent, ProgressTextCardComponent, RESULT_COLORS, RunHistoryCardComponent, STATUS_COLORS, SearchBarComponent, SegmentControlComponent, SelectedFiltersComponent, SelfHealAnalysisComponent, SimulatorComponent, StepGroupComponent, StepProgressCardComponent, StepRendererComponent, StepStatusCardComponent, TableActionToolbarComponent, TableDataLoaderComponent, TableTemplateComponent, TailwindOverlayContainer, TestDistributionCardComponent, UiKitModule, UpdatedFailedStepComponent, ViewMoreFailedStepButtonComponent, VisualComparisonComponent, VisualDifferenceModalComponent, getEmptyStatePreset, getMetadataColor, getMetadataValueStyle };
|
|
11799
12207
|
//# sourceMappingURL=cqa-lib-cqa-ui.mjs.map
|