From 8187a367de53f5cdc8fa9a7259ec394a7ab60d46 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Mon, 6 Mar 2023 17:58:37 +0200 Subject: [PATCH 1/5] UI: Fix entities table widget cell background style --- .../modules/home/components/widget/lib/table-widget.models.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts b/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts index 3ef074c91a..68e89ef8d0 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/table-widget.models.ts @@ -457,6 +457,7 @@ export function constructTableCssString(widgetConfig: WidgetConfig): string { '}\n' + '.mat-mdc-table .mat-mdc-cell {\n' + 'color: ' + mdDark + ';\n' + + 'background-color: rgba(0, 0, 0, 0);\n' + '}\n' + '.mat-mdc-table .mat-mdc-cell button.mat-mdc-icon-button mat-icon {\n' + 'color: ' + mdDarkSecondary + ';\n' + From c9ae2767ff647270cda798eb8749d58c7bb8ef4d Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Mon, 6 Mar 2023 18:21:46 +0200 Subject: [PATCH 2/5] UI: Fix markdown widget css --- .../home/components/widget/lib/markdown-widget.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/markdown-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/markdown-widget.component.ts index c71affe5c1..4a922b3f71 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/markdown-widget.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/markdown-widget.component.ts @@ -80,7 +80,7 @@ export class MarkdownWidgetComponent extends PageComponent implements OnInit { const cssParser = new cssjs(); cssParser.testMode = false; this.markdownClass += '-' + hashCode(cssString); - cssParser.cssPreviewNamespace = this.markdownClass; + cssParser.cssPreviewNamespace = 'tb-default .' + this.markdownClass; cssParser.createStyleElement(this.markdownClass, cssString); } const pageSize = isDefinedAndNotNull(this.ctx.widgetConfig.pageSize) && From 58faac366b3b38c878e9655c91b1e31a35cff776 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Mon, 6 Mar 2023 18:40:50 +0200 Subject: [PATCH 3/5] fixed upgrade script --- application/src/main/data/upgrade/3.4.4/schema_update.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/src/main/data/upgrade/3.4.4/schema_update.sql b/application/src/main/data/upgrade/3.4.4/schema_update.sql index e54c6a9e7e..47d7c9e4d8 100644 --- a/application/src/main/data/upgrade/3.4.4/schema_update.sql +++ b/application/src/main/data/upgrade/3.4.4/schema_update.sql @@ -38,4 +38,4 @@ UPDATE user_credentials SET additional_info = json_build_object('userPasswordHistory', (u.additional_info::json -> 'userPasswordHistory')) FROM tb_user u WHERE user_credentials.user_id = u.id AND u.additional_info::jsonb ? 'userPasswordHistory'; -UPDATE tb_user SET additional_info = tb_user.additional_info::jsonb - 'userPasswordHistory'; \ No newline at end of file +UPDATE tb_user SET additional_info = tb_user.additional_info::jsonb - 'userPasswordHistory' WHERE additional_info::jsonb ? 'userPasswordHistory'; \ No newline at end of file From cb500840f7626586a5232b6f397d19aa74a2e3ea Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Mon, 6 Mar 2023 18:47:07 +0200 Subject: [PATCH 4/5] UI: Improve dashboard page CSS --- .../home/components/dashboard-page/dashboard-page.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts index ed434bc944..0150597b50 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts @@ -492,7 +492,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC const cssParser = new cssjs(); cssParser.testMode = false; this.dashboardPageClass = 'tb-dashboard-page-css-' + guid(); - cssParser.cssPreviewNamespace = this.dashboardPageClass; + cssParser.cssPreviewNamespace = 'tb-default .' + this.dashboardPageClass; cssParser.createStyleElement(this.dashboardPageClass, cssString); } } From 5df4f0baf099c887f1816e7949120a3a19d7694f Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Tue, 7 Mar 2023 10:12:34 +0200 Subject: [PATCH 5/5] UI: Fix deepClone function --- ui-ngx/src/app/core/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui-ngx/src/app/core/utils.ts b/ui-ngx/src/app/core/utils.ts index 992ddec310..4018fd491f 100644 --- a/ui-ngx/src/app/core/utils.ts +++ b/ui-ngx/src/app/core/utils.ts @@ -304,7 +304,7 @@ export function deepClone(target: T, ignoreFields?: string[]): T { (target as any[]).forEach((v) => { cp.push(v); }); return cp.map((n: any) => deepClone(n)) as any; } - if (typeof target === 'object' && Object.keys(target).length) { + if (typeof target === 'object') { const cp = {...(target as { [key: string]: any })} as { [key: string]: any }; Object.keys(cp).forEach(k => { if (!ignoreFields || ignoreFields.indexOf(k) === -1) {