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 be447d1dde..5110b6121d 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
@@ -452,7 +452,7 @@ export function constructTableCssString(widgetConfig: WidgetConfig): string {
'.mat-mdc-table .mat-mdc-row .mat-mdc-cell.mat-mdc-table-sticky, .mat-mdc-table .mat-mdc-header-cell.mat-mdc-table-sticky {\n' +
'background-color: ' + origBackgroundColor + ';\n' +
'}\n' +
- '.mat-mdc-table .mat-mdc-cell {\n' +
+ '.mat-mdc-table .mat-mdc-row {\n' +
'color: ' + mdDark + ';\n' +
'background-color: rgba(0, 0, 0, 0);\n' +
'}\n' +
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.html
index 87283ec8ca..b07f490dcc 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.html
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/timeseries-table-widget.component.html
@@ -64,7 +64,7 @@
maxWidth: (source.timeseriesDatasource.countCellButtonAction * 48) + 'px',
width: (source.timeseriesDatasource.countCellButtonAction * 48) + 'px' }">
-
@@ -74,22 +74,22 @@
mat-icon-button [disabled]="isLoading$ | async"
matTooltip="{{ actionDescriptor.displayName }}"
matTooltipPosition="above"
- (click)="onActionButtonClick($event, row, actionDescriptor)">
+ (click)="onActionButtonClick($event, entity, actionDescriptor)">
{{actionDescriptor.icon}}
-
+
-
+
diff --git a/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.ts b/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.ts
index 8210f9a533..215c77a1bd 100644
--- a/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.ts
+++ b/ui-ngx/src/app/modules/home/components/wizard/device-wizard-dialog.component.ts
@@ -146,11 +146,8 @@ export class DeviceWizardDialogComponent extends DialogComponent 0) {
return this.deviceService.saveDeviceWithCredentials(deepTrim(device), deepTrim(this.credentialsFormGroup.value.credential)).pipe(
catchError((e: HttpErrorResponse) => {
diff --git a/ui-ngx/src/app/modules/home/pages/asset/asset.component.html b/ui-ngx/src/app/modules/home/pages/asset/asset.component.html
index 16229a7af6..b2c4b5a10a 100644
--- a/ui-ngx/src/app/modules/home/pages/asset/asset.component.html
+++ b/ui-ngx/src/app/modules/home/pages/asset/asset.component.html
@@ -86,13 +86,6 @@
{{ 'asset.name-max-length' | translate }}
-
-
asset.label
@@ -100,6 +93,20 @@
{{ 'asset.label-max-length' | translate }}
+
+
+
+
asset.description
diff --git a/ui-ngx/src/app/modules/home/pages/asset/asset.component.ts b/ui-ngx/src/app/modules/home/pages/asset/asset.component.ts
index 8c53cbba38..a96b65e249 100644
--- a/ui-ngx/src/app/modules/home/pages/asset/asset.component.ts
+++ b/ui-ngx/src/app/modules/home/pages/asset/asset.component.ts
@@ -69,6 +69,7 @@ export class AssetComponent extends EntityComponent {
name: [entity ? entity.name : '', [Validators.required, Validators.maxLength(255)]],
assetProfileId: [entity ? entity.assetProfileId : null, [Validators.required]],
label: [entity ? entity.label : '', Validators.maxLength(255)],
+ customerId: [entity ? entity.customerId : ''],
additionalInfo: this.fb.group(
{
description: [entity && entity.additionalInfo ? entity.additionalInfo.description : ''],
@@ -82,6 +83,7 @@ export class AssetComponent extends EntityComponent {
this.entityForm.patchValue({name: entity.name});
this.entityForm.patchValue({assetProfileId: entity.assetProfileId});
this.entityForm.patchValue({label: entity.label});
+ this.entityForm.patchValue({customerId: entity.customerId});
this.entityForm.patchValue({additionalInfo: {description: entity.additionalInfo ? entity.additionalInfo.description : ''}});
}
diff --git a/ui-ngx/src/app/modules/home/pages/rulechain/add-rule-node-dialog.component.html b/ui-ngx/src/app/modules/home/pages/rulechain/add-rule-node-dialog.component.html
index bc72cd90c0..0da62e48bc 100644
--- a/ui-ngx/src/app/modules/home/pages/rulechain/add-rule-node-dialog.component.html
+++ b/ui-ngx/src/app/modules/home/pages/rulechain/add-rule-node-dialog.component.html
@@ -29,16 +29,12 @@
-
+
+
+
+
+ {{ 'rulenode.debug-mode' | translate }}
+
+
+ {{ 'rulenode.singleton-mode' | translate }}
+
-
+
+
+
+
+
+ rulenode.rule-node-description
+
+
+
diff --git a/ui-ngx/src/app/modules/home/pages/rulechain/rule-node-details.component.ts b/ui-ngx/src/app/modules/home/pages/rulechain/rule-node-details.component.ts
index f1d6001c88..5fce7f8e0b 100644
--- a/ui-ngx/src/app/modules/home/pages/rulechain/rule-node-details.component.ts
+++ b/ui-ngx/src/app/modules/home/pages/rulechain/rule-node-details.component.ts
@@ -22,11 +22,11 @@ import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms
import { FcRuleNode, RuleNodeType } from '@shared/models/rule-node.models';
import { EntityType } from '@shared/models/entity-type.models';
import { Subscription } from 'rxjs';
-import { RuleChainService } from '@core/http/rule-chain.service';
import { RuleNodeConfigComponent } from './rule-node-config.component';
import { Router } from '@angular/router';
import { RuleChainType } from '@app/shared/models/rule-chain.models';
import { ComponentClusteringMode } from '@shared/models/component-descriptor.models';
+import { coerceBoolean } from '@shared/decorators/coercion';
@Component({
selector: 'tb-rule-node',
@@ -47,12 +47,11 @@ export class RuleNodeDetailsComponent extends PageComponent implements OnInit, O
ruleChainType: RuleChainType;
@Input()
- isEdit: boolean;
-
- @Input()
- isReadOnly: boolean;
+ @coerceBoolean()
+ disabled = false;
@Input()
+ @coerceBoolean()
isAdd = false;
@Output()
@@ -70,7 +69,6 @@ export class RuleNodeDetailsComponent extends PageComponent implements OnInit, O
constructor(protected store: Store
,
private fb: UntypedFormBuilder,
- private ruleChainService: RuleChainService,
private router: Router) {
super(store);
this.ruleNodeFormGroup = this.fb.group({});
@@ -99,6 +97,9 @@ export class RuleNodeDetailsComponent extends PageComponent implements OnInit, O
} else {
this.ruleNodeFormGroup = this.fb.group({});
}
+ if (this.disabled) {
+ this.ruleNodeFormGroup.disable({emitEvent: false});
+ }
}
private updateRuleNode() {
@@ -108,6 +109,9 @@ export class RuleNodeDetailsComponent extends PageComponent implements OnInit, O
}
ngOnInit(): void {
+ if (this.disabled) {
+ this.ruleNodeFormGroup.disable({emitEvent: false});
+ }
}
ngOnChanges(changes: SimpleChanges): void {
diff --git a/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.html b/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.html
index c37db14a18..6911558ad4 100644
--- a/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.html
+++ b/ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.html
@@ -110,8 +110,6 @@
[ruleNode]="editingRuleNode"
[ruleChainId]="ruleChain.id?.id"
[ruleChainType]="ruleChainType"
- [isEdit]="true"
- [isReadOnly]="false"
(initRuleNode)="onRuleNodeInit()"
(changeScript)="switchToFirstTab()">
diff --git a/ui-ngx/src/app/shared/models/rule-node.models.ts b/ui-ngx/src/app/shared/models/rule-node.models.ts
index 2a7dedabec..d38d027607 100644
--- a/ui-ngx/src/app/shared/models/rule-node.models.ts
+++ b/ui-ngx/src/app/shared/models/rule-node.models.ts
@@ -74,6 +74,7 @@ export interface IRuleNodeConfigurationComponent {
ruleNodeId: string;
ruleChainId: string;
hasScript: boolean;
+ disabled: boolean;
testScriptLabel?: string;
changeScript?: EventEmitter;
ruleChainType: RuleChainType;
@@ -101,6 +102,14 @@ export abstract class RuleNodeConfigurationComponent extends PageComponent imple
private configurationSet = false;
+ set disabled(value: boolean) {
+ if (value) {
+ this.configForm().disable({emitEvent: false});
+ } else {
+ this.configForm().enable({emitEvent: false});
+ }
+ };
+
set configuration(value: RuleNodeConfiguration) {
this.configurationValue = value;
if (!this.configurationSet) {
diff --git a/ui-ngx/src/app/shared/models/telemetry/telemetry.models.ts b/ui-ngx/src/app/shared/models/telemetry/telemetry.models.ts
index d93dde4530..66f39d080a 100644
--- a/ui-ngx/src/app/shared/models/telemetry/telemetry.models.ts
+++ b/ui-ngx/src/app/shared/models/telemetry/telemetry.models.ts
@@ -37,6 +37,8 @@ import { isUndefined } from '@core/utils';
import { CmdWrapper, WsSubscriber } from '@shared/models/websocket/websocket.models';
import { TelemetryWebsocketService } from '@core/ws/telemetry-websocket.service';
+export const NOT_SUPPORTED = 'Not supported!';
+
export enum DataKeyType {
timeseries = 'timeseries',
attribute = 'attribute',
diff --git a/ui-ngx/src/styles.scss b/ui-ngx/src/styles.scss
index 8e6a9dde75..a2810d925e 100644
--- a/ui-ngx/src/styles.scss
+++ b/ui-ngx/src/styles.scss
@@ -692,6 +692,21 @@ mat-label {
margin: 0;
}
+ .tb-table-widget {
+ .mat-mdc-table {
+ .mat-mdc-cell {
+ background: inherit;
+ color: inherit;
+ font-size: inherit;
+ font-family: inherit;
+ font-weight: inherit;
+ line-height: inherit;
+ letter-spacing: inherit;
+ text-transform: inherit;
+ }
+ }
+ }
+
.mat-mdc-footer-row::after, .mat-mdc-header-row::after, .mat-mdc-row::after {
content: none;
}