10 changed files with 518 additions and 4 deletions
@ -0,0 +1,85 @@ |
|||
<!-- |
|||
|
|||
ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL |
|||
|
|||
Copyright © 2016-2022 ThingsBoard, Inc. All Rights Reserved. |
|||
|
|||
NOTICE: All information contained herein is, and remains |
|||
the property of ThingsBoard, Inc. and its suppliers, |
|||
if any. The intellectual and technical concepts contained |
|||
herein are proprietary to ThingsBoard, Inc. |
|||
and its suppliers and may be covered by U.S. and Foreign Patents, |
|||
patents in process, and are protected by trade secret or copyright law. |
|||
|
|||
Dissemination of this information or reproduction of this material is strictly forbidden |
|||
unless prior written permission is obtained from COMPANY. |
|||
|
|||
Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, |
|||
managers or contractors who have executed Confidentiality and Non-disclosure agreements |
|||
explicitly covering such access. |
|||
|
|||
The copyright notice above does not evidence any actual or intended publication |
|||
or disclosure of this source code, which includes |
|||
information that is confidential and/or proprietary, and is a trade secret, of COMPANY. |
|||
ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, |
|||
OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT |
|||
THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, |
|||
AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. |
|||
THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION |
|||
DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, |
|||
OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. |
|||
|
|||
--> |
|||
<form style="min-width: 400px; position: relative;"> |
|||
<mat-toolbar color="primary"> |
|||
<h2 translate>gateway.command</h2> |
|||
<span fxFlex></span> |
|||
<button mat-button mat-icon-button |
|||
(click)="close()" |
|||
type="button"> |
|||
<mat-icon class="material-icons">close</mat-icon> |
|||
</button> |
|||
</mat-toolbar> |
|||
<mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async"> |
|||
</mat-progress-bar> |
|||
<div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div> |
|||
<div mat-dialog-content tb-toast toastTarget="dockerCommandDialogContent"> |
|||
<div class="mat-content" fxLayout="column"> |
|||
<span translate>gateway.linux-macos</span> |
|||
<div fxLayout="row" fxLayoutAlign="start center"> |
|||
<pre class="tb-highlight" fxFlex><code style="white-space: pre-wrap;">{{ linuxCode }}</code></pre> |
|||
<button mat-icon-button |
|||
color="primary" |
|||
ngxClipboard |
|||
cbContent="{{ linuxCode }}" |
|||
(cbOnSuccess)="onDockerCodeCopied()" |
|||
matTooltip="{{ 'gateway.copy-command' | translate }}" |
|||
matTooltipPosition="above"> |
|||
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> |
|||
</button> |
|||
</div> |
|||
<span translate>gateway.windows</span> |
|||
<div fxLayout="row" fxLayoutAlign="start center"> |
|||
<pre class="tb-highlight" fxFlex><code style="white-space: pre-wrap;">{{ windowsCode }}</code></pre> |
|||
<button mat-icon-button |
|||
color="primary" |
|||
ngxClipboard |
|||
cbContent="{{ windowsCode }}" |
|||
(cbOnSuccess)="onDockerCodeCopied()" |
|||
matTooltip="{{ 'gateway.copy-command' | translate }}" |
|||
matTooltipPosition="above"> |
|||
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> |
|||
</button> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<div mat-dialog-actions fxLayoutAlign="end center"> |
|||
<button mat-button color="primary" |
|||
type="button" |
|||
cdkFocusInitial |
|||
[disabled]="(isLoading$ | async)" |
|||
(click)="close()"> |
|||
{{ 'action.ok' | translate }} |
|||
</button> |
|||
</div> |
|||
</form> |
|||
@ -0,0 +1,93 @@ |
|||
///
|
|||
/// ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL
|
|||
///
|
|||
/// Copyright © 2016-2022 ThingsBoard, Inc. All Rights Reserved.
|
|||
///
|
|||
/// NOTICE: All information contained herein is, and remains
|
|||
/// the property of ThingsBoard, Inc. and its suppliers,
|
|||
/// if any. The intellectual and technical concepts contained
|
|||
/// herein are proprietary to ThingsBoard, Inc.
|
|||
/// and its suppliers and may be covered by U.S. and Foreign Patents,
|
|||
/// patents in process, and are protected by trade secret or copyright law.
|
|||
///
|
|||
/// Dissemination of this information or reproduction of this material is strictly forbidden
|
|||
/// unless prior written permission is obtained from COMPANY.
|
|||
///
|
|||
/// Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees,
|
|||
/// managers or contractors who have executed Confidentiality and Non-disclosure agreements
|
|||
/// explicitly covering such access.
|
|||
///
|
|||
/// The copyright notice above does not evidence any actual or intended publication
|
|||
/// or disclosure of this source code, which includes
|
|||
/// information that is confidential and/or proprietary, and is a trade secret, of COMPANY.
|
|||
/// ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE,
|
|||
/// OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT
|
|||
/// THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED,
|
|||
/// AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES.
|
|||
/// THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION
|
|||
/// DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS,
|
|||
/// OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART.
|
|||
///
|
|||
|
|||
import { Component, Inject, OnInit } from '@angular/core'; |
|||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; |
|||
import { Store } from '@ngrx/store'; |
|||
import { AppState } from '@core/core.state'; |
|||
import { Router } from '@angular/router'; |
|||
import { DialogComponent } from '@app/shared/components/dialog.component'; |
|||
import { TranslateService } from '@ngx-translate/core'; |
|||
import {Device, DeviceCredentials} from "@shared/models/device.models"; |
|||
import {ActionNotificationShow} from "@core/notification/notification.actions"; |
|||
|
|||
export interface GatewayCommandDialogData { |
|||
device: Device, |
|||
credentials: DeviceCredentials |
|||
} |
|||
|
|||
@Component({ |
|||
selector: 'tb-gateway-command-dialog', |
|||
templateUrl: './gateway-command-dialog.component.html', |
|||
styleUrls: [] |
|||
}) |
|||
export class GatewayCommandDialogComponent extends DialogComponent<GatewayCommandDialogComponent> implements OnInit { |
|||
linuxCode: string; |
|||
windowsCode: string; |
|||
|
|||
constructor(protected router: Router, |
|||
protected store: Store<AppState>, |
|||
private translate: TranslateService, |
|||
@Inject(MAT_DIALOG_DATA) public data: GatewayCommandDialogData, |
|||
public dialogRef: MatDialogRef<GatewayCommandDialogComponent, boolean>,) { |
|||
super(store, router, dialogRef); |
|||
const ACCESS_TOKEN = data.credentials.credentialsId; |
|||
this.linuxCode = "docker run -it -v ~/.tb-gateway/logs:/thingsboard_gateway/logs -v " + |
|||
"~/.tb-gateway/extensions:/thingsboard_gateway/extensions -v ~/.tb-gateway/config:/thingsboard_gateway/config --name tb-gateway -e accessToken=" + |
|||
ACCESS_TOKEN + |
|||
" --restart always thingsboard/tb-gateway"; |
|||
this.windowsCode = "docker run -it -v %HOMEPATH%/tb-gateway/config:/thingsboard_gateway/config -v " + |
|||
"%HOMEPATH%/tb-gateway/extensions:/thingsboard_gateway/extensions -v %HOMEPATH%/tb-gateway/logs:/thingsboard_gateway/logs " + |
|||
"--name tb-gateway -e host=thingsboard.cloud -p 1883 -e accessToken=" + |
|||
ACCESS_TOKEN + |
|||
" --restart always thingsboard/tb-gateway"; |
|||
|
|||
} |
|||
|
|||
ngOnInit(): void { |
|||
} |
|||
|
|||
close(): void { |
|||
this.dialogRef.close(); |
|||
} |
|||
|
|||
onDockerCodeCopied() { |
|||
this.store.dispatch(new ActionNotificationShow( |
|||
{ |
|||
message: this.translate.instant('gateway.command-copied-message'), |
|||
type: 'success', |
|||
target: 'dockerCommandDialogContent', |
|||
duration: 1200, |
|||
verticalPosition: 'bottom', |
|||
horizontalPosition: 'left' |
|||
})); |
|||
} |
|||
} |
|||
@ -0,0 +1,142 @@ |
|||
///
|
|||
/// ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL
|
|||
///
|
|||
/// Copyright © 2016-2022 ThingsBoard, Inc. All Rights Reserved.
|
|||
///
|
|||
/// NOTICE: All information contained herein is, and remains
|
|||
/// the property of ThingsBoard, Inc. and its suppliers,
|
|||
/// if any. The intellectual and technical concepts contained
|
|||
/// herein are proprietary to ThingsBoard, Inc.
|
|||
/// and its suppliers and may be covered by U.S. and Foreign Patents,
|
|||
/// patents in process, and are protected by trade secret or copyright law.
|
|||
///
|
|||
/// Dissemination of this information or reproduction of this material is strictly forbidden
|
|||
/// unless prior written permission is obtained from COMPANY.
|
|||
///
|
|||
/// Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees,
|
|||
/// managers or contractors who have executed Confidentiality and Non-disclosure agreements
|
|||
/// explicitly covering such access.
|
|||
///
|
|||
/// The copyright notice above does not evidence any actual or intended publication
|
|||
/// or disclosure of this source code, which includes
|
|||
/// information that is confidential and/or proprietary, and is a trade secret, of COMPANY.
|
|||
/// ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE,
|
|||
/// OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT
|
|||
/// THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED,
|
|||
/// AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES.
|
|||
/// THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION
|
|||
/// DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS,
|
|||
/// OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART.
|
|||
///
|
|||
|
|||
import { |
|||
DateEntityTableColumn, |
|||
EntityTableColumn, |
|||
EntityTableConfig |
|||
} from '@home/models/entity/entities-table-config.models'; |
|||
import {EntityTypeResource} from '@shared/models/entity-type.models'; |
|||
import {TranslateService} from '@ngx-translate/core'; |
|||
import {DatePipe} from '@angular/common'; |
|||
import {Direction} from '@shared/models/page/sort-order'; |
|||
import {MatDialog} from '@angular/material/dialog'; |
|||
import {TimePageLink} from '@shared/models/page/page-link'; |
|||
import {Observable} from 'rxjs'; |
|||
import {PageData} from '@shared/models/page/page-data'; |
|||
import {UtilsService} from '@core/services/utils.service'; |
|||
import {DeviceService} from "@core/http/device.service"; |
|||
import {AttributeService} from "@core/http/attribute.service"; |
|||
import {Device} from "@shared/models/device.models"; |
|||
import { |
|||
GatewayCommandDialogComponent, |
|||
GatewayCommandDialogData |
|||
} from "@home/components/gateway/gateway-command-dialog.component"; |
|||
import {ActionNotificationShow} from "@core/notification/notification.actions"; |
|||
import {Store} from "@ngrx/store"; |
|||
import {AppState} from "@core/core.state"; |
|||
import {map} from "rxjs/operators"; |
|||
|
|||
export class GatewayListTableConfig extends EntityTableConfig<Device, TimePageLink> { |
|||
|
|||
constructor(protected store: Store<AppState>, |
|||
private deviceService: DeviceService, |
|||
private attributeService: AttributeService, |
|||
private datePipe: DatePipe, |
|||
private translate: TranslateService, |
|||
private utils: UtilsService, |
|||
private dialog: MatDialog, |
|||
updateOnInit = true, |
|||
pageMode = false) { |
|||
super(); |
|||
this.loadDataOnInit = updateOnInit; |
|||
this.tableTitle = ''; |
|||
this.useTimePageLink = false; |
|||
this.pageMode = pageMode; |
|||
this.detailsPanelEnabled = false; |
|||
this.selectionEnabled = false; |
|||
this.searchEnabled = true; |
|||
this.addEnabled = false; |
|||
this.entitiesDeleteEnabled = false; |
|||
this.actionsColumnTitle = ''; |
|||
this.entityTranslations = { |
|||
noEntities: 'gateway.no-gateway-found', |
|||
search: 'gateway.gateway-search' |
|||
}; |
|||
this.entityResources = {} as EntityTypeResource<Device>; |
|||
|
|||
this.entitiesFetchFunction = pageLink => this.fetchGateways(pageLink); |
|||
|
|||
this.defaultSortOrder = {property: 'createdTime', direction: Direction.DESC}; |
|||
|
|||
this.columns.push( |
|||
new DateEntityTableColumn<Device>('createdTime', 'gateway.created-time', this.datePipe, '150px')); |
|||
|
|||
this.columns.push( |
|||
new EntityTableColumn<Device>('entityName', 'gateway.gateway-name', '20%', |
|||
(entity => this.utils.customTranslation(entity.name, entity.name)) |
|||
) |
|||
); |
|||
|
|||
this.cellActionDescriptors.push( |
|||
{ |
|||
name: this.translate.instant('gateway.command'), |
|||
icon: 'vpn_key', |
|||
isEnabled: () => true, |
|||
onAction: ($event, entity) => this.showGatewayDockerCommand(entity) |
|||
} |
|||
); |
|||
} |
|||
|
|||
showGatewayDockerCommand(entity: Device) { |
|||
this.deviceService.getDeviceCredentials(entity.id.id).subscribe(credentials => { |
|||
this.dialog.open<GatewayCommandDialogComponent, GatewayCommandDialogData, boolean> |
|||
(GatewayCommandDialogComponent, |
|||
{ |
|||
disableClose: true, |
|||
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'], |
|||
data: { |
|||
credentials: credentials, |
|||
device: entity |
|||
} |
|||
}).afterClosed().subscribe( |
|||
(res) => { |
|||
if (res) { |
|||
this.updateData(); |
|||
} |
|||
} |
|||
); |
|||
}, error => { |
|||
const messageToShow = `<div>${error}</div>`; |
|||
this.store.dispatch(new ActionNotificationShow({message: messageToShow, type: 'error'})); |
|||
}) |
|||
} |
|||
|
|||
fetchGateways(pageLink: TimePageLink): Observable<PageData<Device>> { |
|||
return this.deviceService.getUserDevices(pageLink).pipe( |
|||
map(pageData => { |
|||
pageData.data = pageData.data.filter(device => device.additionalInfo.gateway); |
|||
pageData.totalElements = pageData.data.length; |
|||
return pageData; |
|||
}) |
|||
); |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
<!-- |
|||
|
|||
ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL |
|||
|
|||
Copyright © 2016-2022 ThingsBoard, Inc. All Rights Reserved. |
|||
|
|||
NOTICE: All information contained herein is, and remains |
|||
the property of ThingsBoard, Inc. and its suppliers, |
|||
if any. The intellectual and technical concepts contained |
|||
herein are proprietary to ThingsBoard, Inc. |
|||
and its suppliers and may be covered by U.S. and Foreign Patents, |
|||
patents in process, and are protected by trade secret or copyright law. |
|||
|
|||
Dissemination of this information or reproduction of this material is strictly forbidden |
|||
unless prior written permission is obtained from COMPANY. |
|||
|
|||
Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, |
|||
managers or contractors who have executed Confidentiality and Non-disclosure agreements |
|||
explicitly covering such access. |
|||
|
|||
The copyright notice above does not evidence any actual or intended publication |
|||
or disclosure of this source code, which includes |
|||
information that is confidential and/or proprietary, and is a trade secret, of COMPANY. |
|||
ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, |
|||
OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT |
|||
THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, |
|||
AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. |
|||
THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION |
|||
DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, |
|||
OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. |
|||
|
|||
--> |
|||
<tb-entities-table [entitiesTableConfig]="gatewayListTableConfig"></tb-entities-table> |
|||
@ -0,0 +1,55 @@ |
|||
/** |
|||
* ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL |
|||
* |
|||
* Copyright © 2016-2022 ThingsBoard, Inc. All Rights Reserved. |
|||
* |
|||
* NOTICE: All information contained herein is, and remains |
|||
* the property of ThingsBoard, Inc. and its suppliers, |
|||
* if any. The intellectual and technical concepts contained |
|||
* herein are proprietary to ThingsBoard, Inc. |
|||
* and its suppliers and may be covered by U.S. and Foreign Patents, |
|||
* patents in process, and are protected by trade secret or copyright law. |
|||
* |
|||
* Dissemination of this information or reproduction of this material is strictly forbidden |
|||
* unless prior written permission is obtained from COMPANY. |
|||
* |
|||
* Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees, |
|||
* managers or contractors who have executed Confidentiality and Non-disclosure agreements |
|||
* explicitly covering such access. |
|||
* |
|||
* The copyright notice above does not evidence any actual or intended publication |
|||
* or disclosure of this source code, which includes |
|||
* information that is confidential and/or proprietary, and is a trade secret, of COMPANY. |
|||
* ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE, |
|||
* OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT |
|||
* THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED, |
|||
* AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES. |
|||
* THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION |
|||
* DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS, |
|||
* OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART. |
|||
*/ |
|||
:host { |
|||
width: 100%; |
|||
height: 100%; |
|||
display: block; |
|||
.tb-table-widget { |
|||
.table-container { |
|||
position: relative; |
|||
} |
|||
.mat-table { |
|||
.mat-row { |
|||
&.invisible { |
|||
visibility: hidden; |
|||
} |
|||
} |
|||
} |
|||
span.no-data-found { |
|||
position: absolute; |
|||
top: 60px; |
|||
bottom: 0; |
|||
left: 0; |
|||
right: 0; |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,75 @@ |
|||
///
|
|||
/// ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL
|
|||
///
|
|||
/// Copyright © 2016-2022 ThingsBoard, Inc. All Rights Reserved.
|
|||
///
|
|||
/// NOTICE: All information contained herein is, and remains
|
|||
/// the property of ThingsBoard, Inc. and its suppliers,
|
|||
/// if any. The intellectual and technical concepts contained
|
|||
/// herein are proprietary to ThingsBoard, Inc.
|
|||
/// and its suppliers and may be covered by U.S. and Foreign Patents,
|
|||
/// patents in process, and are protected by trade secret or copyright law.
|
|||
///
|
|||
/// Dissemination of this information or reproduction of this material is strictly forbidden
|
|||
/// unless prior written permission is obtained from COMPANY.
|
|||
///
|
|||
/// Access to the source code contained herein is hereby forbidden to anyone except current COMPANY employees,
|
|||
/// managers or contractors who have executed Confidentiality and Non-disclosure agreements
|
|||
/// explicitly covering such access.
|
|||
///
|
|||
/// The copyright notice above does not evidence any actual or intended publication
|
|||
/// or disclosure of this source code, which includes
|
|||
/// information that is confidential and/or proprietary, and is a trade secret, of COMPANY.
|
|||
/// ANY REPRODUCTION, MODIFICATION, DISTRIBUTION, PUBLIC PERFORMANCE,
|
|||
/// OR PUBLIC DISPLAY OF OR THROUGH USE OF THIS SOURCE CODE WITHOUT
|
|||
/// THE EXPRESS WRITTEN CONSENT OF COMPANY IS STRICTLY PROHIBITED,
|
|||
/// AND IN VIOLATION OF APPLICABLE LAWS AND INTERNATIONAL TREATIES.
|
|||
/// THE RECEIPT OR POSSESSION OF THIS SOURCE CODE AND/OR RELATED INFORMATION
|
|||
/// DOES NOT CONVEY OR IMPLY ANY RIGHTS TO REPRODUCE, DISCLOSE OR DISTRIBUTE ITS CONTENTS,
|
|||
/// OR TO MANUFACTURE, USE, OR SELL ANYTHING THAT IT MAY DESCRIBE, IN WHOLE OR IN PART.
|
|||
///
|
|||
|
|||
import {Component, OnInit} from '@angular/core'; |
|||
import {UtilsService} from '@core/services/utils.service'; |
|||
import {TranslateService} from '@ngx-translate/core'; |
|||
import {DeviceService} from '@core/http/device.service'; |
|||
import {AttributeService} from '@core/http/attribute.service'; |
|||
import {GatewayListTableConfig} from "@home/components/gateway/gateway-list-table-config"; |
|||
import {DatePipe} from "@angular/common"; |
|||
import {MatDialog} from "@angular/material/dialog"; |
|||
import {Store} from "@ngrx/store"; |
|||
import {AppState} from "@core/core.state"; |
|||
|
|||
@Component({ |
|||
selector: 'tb-gateway-list', |
|||
templateUrl: './gateway-list.component.html', |
|||
styleUrls: ['./gateway-list.component.scss'] |
|||
}) |
|||
|
|||
|
|||
export class GatewayListComponent implements OnInit { |
|||
gatewayListTableConfig: GatewayListTableConfig; |
|||
|
|||
constructor( |
|||
protected store: Store<AppState>, |
|||
private utils: UtilsService, |
|||
private translate: TranslateService, |
|||
private datePipe: DatePipe, |
|||
private deviceService: DeviceService, |
|||
private attributeService: AttributeService, |
|||
private dialog: MatDialog, |
|||
) { |
|||
} |
|||
|
|||
ngOnInit(): void { |
|||
this.gatewayListTableConfig = new GatewayListTableConfig( |
|||
this.store, |
|||
this.deviceService, |
|||
this.attributeService, |
|||
this.datePipe, |
|||
this.translate, |
|||
this.utils, |
|||
this.dialog |
|||
); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue