Browse Source

Merge branch 'develop/3.6' of github.com:thingsboard/thingsboard into develop/3.6

pull/9294/head
Igor Kulikov 3 years ago
parent
commit
d479bca638
  1. 2
      rule-engine/rule-engine-components/src/main/resources/public/static/rulenode/rulenode-core-config.js
  2. 1
      ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.scss
  3. 8
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.html
  4. 10
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.scss
  5. 8
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.ts
  6. 2
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.ts
  7. 2
      ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts
  8. 2
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html
  9. 4
      ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts
  10. 2
      ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html
  11. 4
      ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.ts
  12. 1
      ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.scss
  13. 1
      ui-ngx/src/app/modules/home/pages/widget/widgets-bundle-widgets.component.ts
  14. 1
      ui-ngx/src/app/shared/components/help-popup.component.html
  15. 3
      ui-ngx/src/assets/locale/locale.constant-en_US.json

2
rule-engine/rule-engine-components/src/main/resources/public/static/rulenode/rulenode-core-config.js

File diff suppressed because one or more lines are too long

1
ui-ngx/src/app/modules/home/components/attribute/delete-timeseries-panel.component.scss

@ -23,6 +23,7 @@
}
.tb-form-settings {
display: flex;
flex-direction: column;
gap: 16px;
padding-top: 0;

8
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.html

@ -632,6 +632,10 @@
*ngIf="gatewayConfigGroup.get('thingsboard.checkingDeviceActivity.inactivityTimeoutSeconds').hasError('min')">
{{ 'gateway.inactivity-timeout-seconds-min' | translate }}
</mat-error>
<mat-error
*ngIf="gatewayConfigGroup.get('thingsboard.checkingDeviceActivity.inactivityTimeoutSeconds').hasError('pattern')">
{{ 'gateway.inactivity-timeout-seconds-pattern' | translate }}
</mat-error>
<mat-icon matIconSuffix style="cursor:pointer;"
matTooltip="{{ 'gateway.hints.inactivity-timeout' | translate }}">info_outlined
</mat-icon>
@ -647,6 +651,10 @@
*ngIf="gatewayConfigGroup.get('thingsboard.checkingDeviceActivity.inactivityCheckPeriodSeconds').hasError('min')">
{{ 'gateway.inactivity-check-period-seconds-min' | translate }}
</mat-error>
<mat-error
*ngIf="gatewayConfigGroup.get('thingsboard.checkingDeviceActivity.inactivityCheckPeriodSeconds').hasError('pattern')">
{{ 'gateway.inactivity-check-period-seconds-pattern' | translate }}
</mat-error>
<mat-icon matIconSuffix style="cursor:pointer;"
matTooltip="{{ 'gateway.hints.inactivity-period' | translate }}">info_outlined
</mat-icon>

10
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.scss

@ -70,6 +70,16 @@
justify-content: flex-end;
flex: 1;
}
mat-form-field {
mat-error {
display: none !important;
}
mat-error:first-child {
display: block !important;
}
}
}
:host ::ng-deep {

8
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-configuration.component.ts

@ -108,8 +108,8 @@ export class GatewayConfigurationComponent implements OnInit {
handleDeviceRenaming: [true, []],
checkingDeviceActivity: this.fb.group({
checkDeviceInactivity: [false, []],
inactivityTimeoutSeconds: [200, [Validators.min(1), Validators.pattern(/^[^.\s]+$/)]],
inactivityCheckPeriodSeconds: [500, [Validators.min(1), Validators.pattern(/^[^.\s]+$/)]]
inactivityTimeoutSeconds: [200, [Validators.min(1), Validators.pattern(/^-?[0-9]+$/)]],
inactivityCheckPeriodSeconds: [500, [Validators.min(1), Validators.pattern(/^-?[0-9]+$/)]]
}),
security: this.fb.group({
type: [SecurityTypes.ACCESS_TOKEN, [Validators.required]],
@ -187,8 +187,8 @@ export class GatewayConfigurationComponent implements OnInit {
checkingDeviceActivityGroup.get('checkDeviceInactivity').valueChanges.subscribe(enabled => {
checkingDeviceActivityGroup.updateValueAndValidity();
if (enabled) {
checkingDeviceActivityGroup.get('inactivityTimeoutSeconds').setValidators([Validators.min(1), Validators.required]);
checkingDeviceActivityGroup.get('inactivityCheckPeriodSeconds').setValidators([Validators.min(1), Validators.required]);
checkingDeviceActivityGroup.get('inactivityTimeoutSeconds').setValidators([Validators.min(1), Validators.required, Validators.pattern(/^-?[0-9]+$/)]);
checkingDeviceActivityGroup.get('inactivityCheckPeriodSeconds').setValidators([Validators.min(1), Validators.required, Validators.pattern(/^-?[0-9]+$/)]);
} else {
checkingDeviceActivityGroup.get('inactivityTimeoutSeconds').clearValidators();
checkingDeviceActivityGroup.get('inactivityCheckPeriodSeconds').clearValidators();

2
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-connectors.component.ts

@ -486,6 +486,6 @@ export class GatewayConnectorComponent extends PageComponent implements AfterVie
const connectorName = attribute.key;
const connector = this.subscription && this.subscription.data
.find(data => data && data.dataKey.name === `${connectorName}_ERRORS_COUNT`);
return (connector && this.activeConnectors.includes(connectorName)) ? connector.data[0][1] : 'Inactive';
return (connector && this.activeConnectors.includes(connectorName)) ? (connector.data[0][1] || 0) : 'Inactive';
}
}

2
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-widget.models.ts

@ -124,7 +124,7 @@ export const GatewayConnectorDefaultTypesTranslates = new Map<string, string>([
['ftp', 'FTP'],
['socket', 'SOCKET'],
['xmpp', 'XMPP'],
['ocpp', 'OCCP'],
['ocpp', 'OCPP'],
['custom', 'CUSTOM']
]);

2
ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.component.html

@ -29,7 +29,7 @@
</mat-progress-bar>
<div mat-dialog-content>
<mat-horizontal-stepper linear #createNotification
[labelPosition]="(stepperLabelPosition | async)"
labelPosition="bottom"
[orientation]="(stepperOrientation | async)"
(selectionChange)="changeStep($event)">
<ng-template matStepperIcon="edit">

4
ui-ngx/src/app/modules/home/pages/notification/sent/sent-notification-dialog.componet.ts

@ -63,7 +63,6 @@ export class SentNotificationDialogComponent extends
@ViewChild('createNotification', {static: true}) createNotification: MatStepper;
stepperOrientation: Observable<StepperOrientation>;
stepperLabelPosition: Observable<'bottom' | 'end'>;
isAdd = true;
entityType = EntityType;
@ -102,9 +101,6 @@ export class SentNotificationDialogComponent extends
this.stepperOrientation = this.breakpointObserver.observe(MediaBreakpoints['gt-sm'])
.pipe(map(({matches}) => matches ? 'horizontal' : 'vertical'));
this.stepperLabelPosition = this.breakpointObserver.observe(MediaBreakpoints['gt-md'])
.pipe(map(({matches}) => matches ? 'end' : 'bottom'));
this.notificationRequestForm = this.fb.group({
useTemplate: [false],
templateId: [{value: null, disabled: true}, Validators.required],

2
ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.html

@ -29,7 +29,7 @@
</mat-progress-bar>
<div mat-dialog-content>
<mat-horizontal-stepper linear #notificationTemplateStepper
[labelPosition]="(stepperLabelPosition | async)"
labelPosition="bottom"
[orientation]="(stepperOrientation | async)"
(selectionChange)="changeStep($event)">
<ng-template matStepperIcon="edit">

4
ui-ngx/src/app/modules/home/pages/notification/template/template-notification-dialog.component.ts

@ -54,7 +54,6 @@ export class TemplateNotificationDialogComponent
@ViewChild('notificationTemplateStepper', {static: true}) notificationTemplateStepper: MatStepper;
stepperOrientation: Observable<StepperOrientation>;
stepperLabelPosition: Observable<'bottom' | 'end'>;
dialogTitle = 'notification.edit-notification-template';
@ -82,9 +81,6 @@ export class TemplateNotificationDialogComponent
this.stepperOrientation = this.breakpointObserver.observe(MediaBreakpoints['gt-sm'])
.pipe(map(({matches}) => matches ? 'horizontal' : 'vertical'));
this.stepperLabelPosition = this.breakpointObserver.observe(MediaBreakpoints['gt-md'])
.pipe(map(({matches}) => matches ? 'end' : 'bottom'));
if (isDefinedAndNotNull(this.data?.predefinedType)) {
this.hideSelectType = true;
this.templateNotificationForm.get('notificationType').setValue(this.data.predefinedType, {emitEvent: false});

1
ui-ngx/src/app/modules/home/pages/rulechain/rulechain-page.component.scss

@ -173,6 +173,7 @@
}
.mat-drawer-content.tb-rulechain-graph-content {
overflow: hidden;
z-index: 0;
.tb-rulechain-graph {
z-index: 0;
overflow: auto;

1
ui-ngx/src/app/modules/home/pages/widget/widgets-bundle-widgets.component.ts

@ -172,6 +172,7 @@ export class WidgetsBundleWidgetsComponent extends PageComponent implements OnIn
this.widgetsService.updateWidgetsBundleWidgetTypes(this.widgetsBundle.id.id, widgetTypeIds).subscribe(() => {
this.isDirty = false;
this.editMode = false;
this.addMode = false;
});
}

1
ui-ngx/src/app/shared/components/help-popup.component.html

@ -34,6 +34,7 @@
<div #toggleHelpTextButton
(click)="toggleHelp()">
<button mat-button
type="button"
color="primary"
class="tb-help-popup-text-button"
[class]="{'mat-mdc-outlined-button mdc-button--outlined': popoverVisible && popoverReady,

3
ui-ngx/src/assets/locale/locale.constant-en_US.json

@ -2703,9 +2703,11 @@
"inactivity-check-period-seconds": "Inactivity check period (in sec)",
"inactivity-check-period-seconds-required": "Inactivity check period is required",
"inactivity-check-period-seconds-min": "Inactivity check period can not be less then 1",
"inactivity-check-period-seconds-pattern": "Inactivity check period is not valid",
"inactivity-timeout-seconds": "Inactivity timeout (in sec)",
"inactivity-timeout-seconds-required": "Inactivity timeout is required",
"inactivity-timeout-seconds-min": "Inactivity timeout can not be less then 1",
"inactivity-timeout-seconds-pattern": "Inactivity timeout is not valid",
"json-parse": "Not valid JSON.",
"json-required": "Field cannot be empty.",
"logs": {
@ -2855,6 +2857,7 @@
"password": "MQTT password for the gateway form ThingsBoard server",
"ca-cert": "Path to CA certificate file",
"date-form": "Date format in log message",
"data-folder": "Path to folder, that will contains data (Relative or Absolute)",
"log-format": "Log message format",
"remote-log": "Enables remote logging and logs reading from the gateway",
"backup-count": "If backup count is > 0, when a rollover is done, no more than backup count files are kept - the oldest ones are deleted",

Loading…
Cancel
Save