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 2f8ec01011..8897684fe9 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 @@ -23,7 +23,7 @@ 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'; +UPDATE tb_user SET additional_info = tb_user.additional_info::jsonb - 'userPasswordHistory' WHERE additional_info::jsonb ? 'userPasswordHistory'; -- USER CREDENTIALS END @@ -346,4 +346,4 @@ BEGIN END $$; --- ALARM FUNCTIONS END \ No newline at end of file +-- ALARM FUNCTIONS END 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) { 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); } } 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) && 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' +