This commit is contained in:
Maksym Dudnik 2023-07-20 11:02:44 +03:00
parent 1b437dfeb1
commit 4baf30cdea
5 changed files with 35 additions and 18 deletions

View File

@ -446,7 +446,7 @@
"decimals": null,
"funcBody": null,
"usePostProcessing": true,
"postFuncBody": "var newValue = value == true ? \"Active\" : \"Inactive\";\r\nreturn newValue;"
"postFuncBody": "var newValue = value == 'true' ? \"Active\" : \"Inactive\";\r\nreturn newValue;"
},
{
"name": "activeDevices",
@ -480,7 +480,12 @@
"settings": {},
"_hash": 0.36755550699981954
}
],
"alarmFilterConfig": {
"statusList": [
"ACTIVE"
]
}
},
{
"type": "entityCount",
@ -569,7 +574,8 @@
"widgetCss": "",
"pageSize": 1024,
"noDataDisplayMessage": "",
"enableDataExport": false
"enableDataExport": false,
"displayTimewindow": true
},
"row": 0,
"col": 0,
@ -5283,7 +5289,7 @@
"widgets": {
"27e6b37c-085e-824d-fb13-69651a545ec1": {
"sizeX": 48,
"sizeY": 21,
"sizeY": 16,
"row": 0,
"col": 0
}

View File

@ -48,7 +48,14 @@
*matRowDef="let attribute; columns: displayedColumns;"></mat-row>
</table>
<span [fxShow]="dataSource.data.length === 0"
fxFlex
fxLayoutAlign="center center"
class="no-data-found">{{'attribute.no-telemetry-text' | translate}}</span>
<span fxFlex [fxShow]="dataSource.data.length !== 0"></span>
<mat-divider></mat-divider>
<mat-paginator #paginator
[length]="dataSource.data.length"
[pageIndex]="pageLink.page"
[pageSize]="pageLink.pageSize"
[pageSizeOptions]="[10, 20, 30]"></mat-paginator>

View File

@ -16,7 +16,8 @@
:host {
width: 100%;
height: 100%;
display: block;
display: flex;
flex-direction: column;
overflow-x: auto;
padding: 0;

View File

@ -33,6 +33,7 @@ import { MatTableDataSource } from '@angular/material/table';
import { GatewayLogLevel } from '@home/components/widget/lib/gateway/gateway-configuration.component';
import { DialogService } from '@core/services/dialog.service';
import { WidgetContext } from '@home/models/widget-component.models';
import { MatPaginator } from '@angular/material/paginator';
export interface GatewayConnector {
@ -73,6 +74,7 @@ export class GatewayLogsComponent extends PageComponent implements AfterViewInit
@ViewChild('searchInput') searchInputField: ElementRef;
@ViewChild(MatSort) sort: MatSort;
@ViewChild(MatPaginator) paginator: MatPaginator;
connectorForm: FormGroup;
@ -125,7 +127,7 @@ export class GatewayLogsComponent extends PageComponent implements AfterViewInit
public dialog: MatDialog) {
super(store);
const sortOrder: SortOrder = {property: 'ts', direction: Direction.DESC};
this.pageLink = new PageLink(Number.POSITIVE_INFINITY, 0, null, sortOrder);
this.pageLink = new PageLink(10, 0, null, sortOrder);
this.dataSource = new MatTableDataSource<AttributeData>([]);
}
@ -133,6 +135,7 @@ export class GatewayLogsComponent extends PageComponent implements AfterViewInit
ngAfterViewInit() {
this.dataSource.sort = this.sort;
this.dataSource.paginator = this.paginator;
this.ctx.defaultSubscription.onTimewindowChangeFunction = timewindow => {
this.ctx.defaultSubscription.options.timeWindowConfig = timewindow;
this.ctx.defaultSubscription.updateDataSubscriptions();

View File

@ -2808,7 +2808,7 @@
"hints": {
"remote-configuration": "Enables remote configuration and management of the gateway",
"remote-shell": "Enables remote control of the operating system with the gateway from the Remote Shell widget",
"host": "Hostname or ip address of ThingsBoard server",
"host": "Hostname or IP address of ThingsBoard server",
"port": "Port of MQTT service on ThingsBoard server",
"token": "Access token for the gateway from ThingsBoard server",
"client-id": "MQTT client id for the gateway form ThingsBoard server",
@ -2817,16 +2817,16 @@
"ca-cert": "Path to CA certificate file",
"cert": "Path to certificate file",
"private-key": "Path to private key file",
"date-form": "Date format of log message",
"date-form": "Date format in log message",
"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",
"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",
"storage": "Provides configuration for saving incoming data before it is sent to the ThingsBoard platform",
"file": "Received data saving to the hard drive",
"memory": "Received data saving to the RAM memory",
"sqlite": "Received data saving to the .db file",
"data-folder": "Path to folder, that will contains data (Relative or Absolute)",
"max-file-count": "Maximum count of file that will be saved",
"max-file-count": "Maximum count of file that will be created",
"max-read-count": "Count of messages to get from storage and send to ThingsBoard",
"max-records": "Maximum count of records that will be stored in one file",
"read-record-count": "Count of messages to get from storage and send to ThingsBoard",
@ -2834,20 +2834,20 @@
"ttl-check-hour": "How often will Gateway check data for obsolescence",
"ttl-messages-day": "Maximum days that storage will save data",
"commands": "Commands for collecting additional statistic",
"attribute": "Gateway client attribute name",
"attribute": "Statistic telemetry key",
"timeout": "Timeout for command executing",
"command": "The result of the command will be used as the value of the client attribute (\"/bin/sh -c ipconfig getifaddr en0\")",
"command": "The result of the command execution, will be used as the value for telemetry",
"check-device-activity": "Enables monitor the activity of each connected device",
"inactivity-timeout": "Inactivity device time after whose the gateway will disconnect device",
"inactivity-timeout": "Time after whose the gateway will disconnect device",
"inactivity-period": "Periodicity of device activity check",
"minimal-pack-delay": "Delay between sending packets (Decreasing this setting results in increased CPU usage)",
"minimal-pack-delay": "Delay between sending packs of messages (Decreasing this setting results in increased CPU usage)",
"qos": "Quality of Service in MQTT messaging (0 - at most once, 1 - at least once)",
"server-port": "Network port on which GRPC server will listen for incoming connections.",
"grpc-keep-alive-timeout": "Maximum time (in milliseconds) the server should wait for a keepalive ping response before considering the connection dead.",
"grpc-keep-alive": "Duration (in milliseconds) between two successive keepalive ping messages when there is no active RPC call.",
"grpc-min-time-between-pings": "Minimum amount of time (in milliseconds) the server should wait between sending keepalive ping messages",
"grpc-keep-alive-timeout": "Maximum time the server should wait for a keepalive ping response before considering the connection dead.",
"grpc-keep-alive": "Duration between two successive keepalive ping messages when there is no active RPC call.",
"grpc-min-time-between-pings": "Minimum amount of time the server should wait between sending keepalive ping messages",
"grpc-max-pings-without-data": "Maximum number of keepalive ping messages that the server can send without receiving any data before it considers the connection dead.",
"grpc-min-ping-interval-without-data": "Minimum amount of time (in milliseconds) the server should wait between sending keepalive ping messages when there is no data being sent or received.",
"grpc-min-ping-interval-without-data": "Minimum amount of time the server should wait between sending keepalive ping messages when there is no data being sent or received.",
"permit-without-calls": "Allow server to keep the GRPC connection alive even when there are no active RPC calls."
}
},