74 lines
3.2 KiB
HTML
74 lines
3.2 KiB
HTML
|
|
<!--
|
||
|
|
|
||
|
|
ThingsBoard, Inc. ("COMPANY") CONFIDENTIAL
|
||
|
|
|
||
|
|
Copyright © 2016-2025 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 [formGroup]="uploadFileFormGroup" (ngSubmit)="save()" style="width: 800px;">
|
||
|
|
<mat-toolbar color="primary">
|
||
|
|
<h2>{{ 'dashboard.update-dashboard' | translate }}</h2>
|
||
|
|
<span class="flex-1"></span>
|
||
|
|
<button mat-icon-button
|
||
|
|
(click)="cancel()"
|
||
|
|
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-file-input [contentConvertFunction]="loadDataFromJsonContent"
|
||
|
|
[existingFileName]="currentFileName"
|
||
|
|
(fileNameChanged)="currentFileName = $event"
|
||
|
|
label="{{'dashboard.upload-file-to-update' | translate}}"
|
||
|
|
formControlName="file"
|
||
|
|
dropLabel="{{ 'import.drop-json-file-or' | translate }}"
|
||
|
|
accept=".json,application/json"
|
||
|
|
allowedExtensions="json">
|
||
|
|
</tb-file-input>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div mat-dialog-actions class="flex flex-row items-center justify-end">
|
||
|
|
<button mat-button color="primary"
|
||
|
|
type="button"
|
||
|
|
[disabled]="(isLoading$ | async)"
|
||
|
|
(click)="cancel()" cdkFocusInitial>
|
||
|
|
{{ 'action.cancel' | translate }}
|
||
|
|
</button>
|
||
|
|
<button mat-raised-button color="primary"
|
||
|
|
type="submit"
|
||
|
|
[disabled]="(isLoading$ | async) || uploadFileFormGroup.invalid
|
||
|
|
|| !uploadFileFormGroup.dirty">
|
||
|
|
{{ 'action.save' | translate }}
|
||
|
|
</button>
|
||
|
|
</div>
|
||
|
|
</form>
|