Showing
26 changed files
with
370 additions
and
18 deletions
@@ -38,6 +38,7 @@ import { FlexLayoutModule } from '@angular/flex-layout'; | @@ -38,6 +38,7 @@ import { FlexLayoutModule } from '@angular/flex-layout'; | ||
38 | import { TranslateDefaultCompiler } from '@core/translate/translate-default-compiler'; | 38 | import { TranslateDefaultCompiler } from '@core/translate/translate-default-compiler'; |
39 | import { AlertDialogComponent } from '@core/services/dialog/alert-dialog.component'; | 39 | import { AlertDialogComponent } from '@core/services/dialog/alert-dialog.component'; |
40 | import { WINDOW_PROVIDERS } from '@core/services/window.service'; | 40 | import { WINDOW_PROVIDERS } from '@core/services/window.service'; |
41 | +import {TodoDialogComponent} from "@core/services/dialog/todo-dialog.component"; | ||
41 | 42 | ||
42 | export function HttpLoaderFactory(http: HttpClient) { | 43 | export function HttpLoaderFactory(http: HttpClient) { |
43 | return new TranslateHttpLoader(http, './assets/locale/locale.constant-', '.json'); | 44 | return new TranslateHttpLoader(http, './assets/locale/locale.constant-', '.json'); |
@@ -46,11 +47,13 @@ export function HttpLoaderFactory(http: HttpClient) { | @@ -46,11 +47,13 @@ export function HttpLoaderFactory(http: HttpClient) { | ||
46 | @NgModule({ | 47 | @NgModule({ |
47 | entryComponents: [ | 48 | entryComponents: [ |
48 | ConfirmDialogComponent, | 49 | ConfirmDialogComponent, |
49 | - AlertDialogComponent | 50 | + AlertDialogComponent, |
51 | + TodoDialogComponent | ||
50 | ], | 52 | ], |
51 | declarations: [ | 53 | declarations: [ |
52 | ConfirmDialogComponent, | 54 | ConfirmDialogComponent, |
53 | - AlertDialogComponent | 55 | + AlertDialogComponent, |
56 | + TodoDialogComponent | ||
54 | ], | 57 | ], |
55 | imports: [ | 58 | imports: [ |
56 | CommonModule, | 59 | CommonModule, |
@@ -20,6 +20,7 @@ import { MatDialog, MatDialogConfig } from '@angular/material'; | @@ -20,6 +20,7 @@ import { MatDialog, MatDialogConfig } from '@angular/material'; | ||
20 | import { ConfirmDialogComponent } from '@core/services/dialog/confirm-dialog.component'; | 20 | import { ConfirmDialogComponent } from '@core/services/dialog/confirm-dialog.component'; |
21 | import { TranslateService } from '@ngx-translate/core'; | 21 | import { TranslateService } from '@ngx-translate/core'; |
22 | import { AlertDialogComponent } from '@core/services/dialog/alert-dialog.component'; | 22 | import { AlertDialogComponent } from '@core/services/dialog/alert-dialog.component'; |
23 | +import {TodoDialogComponent} from "@core/services/dialog/todo-dialog.component"; | ||
23 | 24 | ||
24 | @Injectable( | 25 | @Injectable( |
25 | { | 26 | { |
@@ -67,4 +68,13 @@ export class DialogService { | @@ -67,4 +68,13 @@ export class DialogService { | ||
67 | return dialogRef.afterClosed(); | 68 | return dialogRef.afterClosed(); |
68 | } | 69 | } |
69 | 70 | ||
71 | + todo(): Observable<any> { | ||
72 | + const dialogConfig: MatDialogConfig = { | ||
73 | + disableClose: true, | ||
74 | + panelClass: ['tb-fullscreen-dialog'] | ||
75 | + }; | ||
76 | + const dialogRef = this.dialog.open(TodoDialogComponent, dialogConfig); | ||
77 | + return dialogRef.afterClosed(); | ||
78 | + } | ||
79 | + | ||
70 | } | 80 | } |
1 | +<!-- | ||
2 | + | ||
3 | + Copyright © 2016-2019 The Thingsboard Authors | ||
4 | + | ||
5 | + Licensed under the Apache License, Version 2.0 (the "License"); | ||
6 | + you may not use this file except in compliance with the License. | ||
7 | + You may obtain a copy of the License at | ||
8 | + | ||
9 | + http://www.apache.org/licenses/LICENSE-2.0 | ||
10 | + | ||
11 | + Unless required by applicable law or agreed to in writing, software | ||
12 | + distributed under the License is distributed on an "AS IS" BASIS, | ||
13 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
14 | + See the License for the specific language governing permissions and | ||
15 | + limitations under the License. | ||
16 | + | ||
17 | +--> | ||
18 | +<h2 mat-dialog-title>Coming soon!</h2> | ||
19 | +<div mat-dialog-content> | ||
20 | + <img [src]="comingSoon"/> | ||
21 | +</div> | ||
22 | +<div mat-dialog-actions fxLayout="row" fxLayoutAlign="end center"> | ||
23 | + <button mat-button color="primary" [mat-dialog-close]="true" cdkFocusInitial>Ok</button> | ||
24 | +</div> |
1 | +/** | ||
2 | + * Copyright © 2016-2019 The Thingsboard Authors | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | +:host { | ||
17 | + .mat-dialog-content { | ||
18 | + padding: 0 24px 24px; | ||
19 | + img { | ||
20 | + max-width: 500px; | ||
21 | + } | ||
22 | + } | ||
23 | +} |
1 | +/// | ||
2 | +/// Copyright © 2016-2019 The Thingsboard Authors | ||
3 | +/// | ||
4 | +/// Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | +/// you may not use this file except in compliance with the License. | ||
6 | +/// You may obtain a copy of the License at | ||
7 | +/// | ||
8 | +/// http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | +/// | ||
10 | +/// Unless required by applicable law or agreed to in writing, software | ||
11 | +/// distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | +/// See the License for the specific language governing permissions and | ||
14 | +/// limitations under the License. | ||
15 | +/// | ||
16 | + | ||
17 | +import {Component} from '@angular/core'; | ||
18 | +import {MatDialogRef} from '@angular/material'; | ||
19 | + | ||
20 | +@Component({ | ||
21 | + selector: 'tb-todo-dialog', | ||
22 | + templateUrl: './todo-dialog.component.html', | ||
23 | + styleUrls: ['./todo-dialog.component.scss'] | ||
24 | +}) | ||
25 | +export class TodoDialogComponent { | ||
26 | + | ||
27 | + comingSoon = require('../../../../assets/coming-soon.jpg'); | ||
28 | + | ||
29 | + constructor(public dialogRef: MatDialogRef<TodoDialogComponent>) { | ||
30 | + } | ||
31 | +} |
@@ -279,6 +279,7 @@ export class AssetsTableConfigResolver implements Resolve<EntityTableConfig<Asse | @@ -279,6 +279,7 @@ export class AssetsTableConfigResolver implements Resolve<EntityTableConfig<Asse | ||
279 | $event.stopPropagation(); | 279 | $event.stopPropagation(); |
280 | } | 280 | } |
281 | // TODO: | 281 | // TODO: |
282 | + this.dialogService.todo(); | ||
282 | } | 283 | } |
283 | 284 | ||
284 | addAssetsToCustomer($event: Event) { | 285 | addAssetsToCustomer($event: Event) { |
@@ -21,15 +21,18 @@ import {HomeDialogsModule} from '../../dialogs/home-dialogs.module'; | @@ -21,15 +21,18 @@ import {HomeDialogsModule} from '../../dialogs/home-dialogs.module'; | ||
21 | import {DashboardFormComponent} from '@modules/home/pages/dashboard/dashboard-form.component'; | 21 | import {DashboardFormComponent} from '@modules/home/pages/dashboard/dashboard-form.component'; |
22 | import {ManageDashboardCustomersDialogComponent} from '@modules/home/pages/dashboard/manage-dashboard-customers-dialog.component'; | 22 | import {ManageDashboardCustomersDialogComponent} from '@modules/home/pages/dashboard/manage-dashboard-customers-dialog.component'; |
23 | import {DashboardRoutingModule} from './dashboard-routing.module'; | 23 | import {DashboardRoutingModule} from './dashboard-routing.module'; |
24 | +import {MakeDashboardPublicDialogComponent} from '@modules/home/pages/dashboard/make-dashboard-public-dialog.component'; | ||
24 | 25 | ||
25 | @NgModule({ | 26 | @NgModule({ |
26 | entryComponents: [ | 27 | entryComponents: [ |
27 | DashboardFormComponent, | 28 | DashboardFormComponent, |
28 | - ManageDashboardCustomersDialogComponent | 29 | + ManageDashboardCustomersDialogComponent, |
30 | + MakeDashboardPublicDialogComponent | ||
29 | ], | 31 | ], |
30 | declarations: [ | 32 | declarations: [ |
31 | DashboardFormComponent, | 33 | DashboardFormComponent, |
32 | - ManageDashboardCustomersDialogComponent | 34 | + ManageDashboardCustomersDialogComponent, |
35 | + MakeDashboardPublicDialogComponent | ||
33 | ], | 36 | ], |
34 | imports: [ | 37 | imports: [ |
35 | CommonModule, | 38 | CommonModule, |
@@ -58,6 +58,10 @@ import { | @@ -58,6 +58,10 @@ import { | ||
58 | ManageDashboardCustomersDialogComponent, | 58 | ManageDashboardCustomersDialogComponent, |
59 | ManageDashboardCustomersDialogData | 59 | ManageDashboardCustomersDialogData |
60 | } from './manage-dashboard-customers-dialog.component'; | 60 | } from './manage-dashboard-customers-dialog.component'; |
61 | +import { | ||
62 | + MakeDashboardPublicDialogComponent, | ||
63 | + MakeDashboardPublicDialogData | ||
64 | +} from '@modules/home/pages/dashboard/make-dashboard-public-dialog.component'; | ||
61 | 65 | ||
62 | @Injectable() | 66 | @Injectable() |
63 | export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig<DashboardInfo | Dashboard>> { | 67 | export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig<DashboardInfo | Dashboard>> { |
@@ -299,6 +303,7 @@ export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig< | @@ -299,6 +303,7 @@ export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig< | ||
299 | } | 303 | } |
300 | // TODO: | 304 | // TODO: |
301 | // this.router.navigateByUrl(`customers/${customer.id.id}/users`); | 305 | // this.router.navigateByUrl(`customers/${customer.id.id}/users`); |
306 | + this.dialogService.todo(); | ||
302 | } | 307 | } |
303 | 308 | ||
304 | importDashboard($event: Event) { | 309 | importDashboard($event: Event) { |
@@ -306,6 +311,7 @@ export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig< | @@ -306,6 +311,7 @@ export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig< | ||
306 | $event.stopPropagation(); | 311 | $event.stopPropagation(); |
307 | } | 312 | } |
308 | // TODO: | 313 | // TODO: |
314 | + this.dialogService.todo(); | ||
309 | } | 315 | } |
310 | 316 | ||
311 | exportDashboard($event: Event, dashboard: DashboardInfo) { | 317 | exportDashboard($event: Event, dashboard: DashboardInfo) { |
@@ -313,6 +319,7 @@ export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig< | @@ -313,6 +319,7 @@ export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig< | ||
313 | $event.stopPropagation(); | 319 | $event.stopPropagation(); |
314 | } | 320 | } |
315 | // TODO: | 321 | // TODO: |
322 | + this.dialogService.todo(); | ||
316 | } | 323 | } |
317 | 324 | ||
318 | addDashboardsToCustomer($event: Event) { | 325 | addDashboardsToCustomer($event: Event) { |
@@ -341,9 +348,17 @@ export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig< | @@ -341,9 +348,17 @@ export class DashboardsTableConfigResolver implements Resolve<EntityTableConfig< | ||
341 | } | 348 | } |
342 | this.dashboardService.makeDashboardPublic(dashboard.id.id).subscribe( | 349 | this.dashboardService.makeDashboardPublic(dashboard.id.id).subscribe( |
343 | (publicDashboard) => { | 350 | (publicDashboard) => { |
344 | - // TODO: | ||
345 | - | ||
346 | - this.config.table.updateData(); | 351 | + this.dialog.open<MakeDashboardPublicDialogComponent, MakeDashboardPublicDialogData> |
352 | + (MakeDashboardPublicDialogComponent, { | ||
353 | + disableClose: true, | ||
354 | + panelClass: ['tb-dialog', 'tb-fullscreen-dialog'], | ||
355 | + data: { | ||
356 | + dashboard: publicDashboard | ||
357 | + } | ||
358 | + }).afterClosed() | ||
359 | + .subscribe(() => { | ||
360 | + this.config.table.updateData(); | ||
361 | + }); | ||
347 | } | 362 | } |
348 | ); | 363 | ); |
349 | } | 364 | } |
1 | +<!-- | ||
2 | + | ||
3 | + Copyright © 2016-2019 The Thingsboard Authors | ||
4 | + | ||
5 | + Licensed under the Apache License, Version 2.0 (the "License"); | ||
6 | + you may not use this file except in compliance with the License. | ||
7 | + You may obtain a copy of the License at | ||
8 | + | ||
9 | + http://www.apache.org/licenses/LICENSE-2.0 | ||
10 | + | ||
11 | + Unless required by applicable law or agreed to in writing, software | ||
12 | + distributed under the License is distributed on an "AS IS" BASIS, | ||
13 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
14 | + See the License for the specific language governing permissions and | ||
15 | + limitations under the License. | ||
16 | + | ||
17 | +--> | ||
18 | +<div style="min-width: 400px;"> | ||
19 | + <mat-toolbar fxLayout="row" color="primary"> | ||
20 | + <h2>{{ 'dashboard.public-dashboard-title' | translate }}</h2> | ||
21 | + <span fxFlex></span> | ||
22 | + <button mat-button mat-icon-button | ||
23 | + (click)="close()" | ||
24 | + type="button"> | ||
25 | + <mat-icon class="material-icons">close</mat-icon> | ||
26 | + </button> | ||
27 | + </mat-toolbar> | ||
28 | + <mat-progress-bar color="warn" mode="indeterminate" *ngIf="isLoading$ | async"> | ||
29 | + </mat-progress-bar> | ||
30 | + <div style="height: 4px;" *ngIf="!(isLoading$ | async)"></div> | ||
31 | + <div mat-dialog-content tb-toast toastTarget="makeDashboardPublicDialogContent"> | ||
32 | + <span | ||
33 | + innerHTML="{{ translate.get('dashboard.public-dashboard-text', {dashboardTitle: dashboard.title, publicLink: publicLink}) | async }}"> | ||
34 | + </span> | ||
35 | + <div fxLayout="row" fxLayoutAlign="start center"> | ||
36 | + <pre class="tb-highlight" fxFlex><code>{{ publicLink }}</code></pre> | ||
37 | + <button mat-button mat-icon-button | ||
38 | + ngxClipboard | ||
39 | + (cbOnSuccess)="onPublicLinkCopied($event)" | ||
40 | + cbContent="{{publicLink}}" | ||
41 | + matTooltipPosition="above" | ||
42 | + matTooltip="{{ 'dashboard.copy-public-link' | translate }}"> | ||
43 | + <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> | ||
44 | + </button> | ||
45 | + </div> | ||
46 | + <div class="tb-notice" innerHTML="{{'dashboard.public-dashboard-notice' | translate}}"></div> | ||
47 | + <tb-social-share-panel style="padding-top: 15px;" | ||
48 | + shareTitle="{{ 'dashboard.socialshare-title' | translate:{dashboardTitle: dashboard.title} }}" | ||
49 | + shareText="{{ 'dashboard.socialshare-text' | translate:{dashboardTitle: dashboard.title} }}" | ||
50 | + shareLink="{{ publicLink }}" | ||
51 | + shareHashTags="thingsboard, iot"> | ||
52 | + </tb-social-share-panel> | ||
53 | + </div> | ||
54 | + <div mat-dialog-actions fxLayout="row"> | ||
55 | + <span fxFlex></span> | ||
56 | + <button mat-button color="primary" | ||
57 | + style="margin-right: 20px;" | ||
58 | + type="button" | ||
59 | + [disabled]="(isLoading$ | async)" | ||
60 | + (click)="close()" cdkFocusInitial> | ||
61 | + {{ 'action.ok' | translate }} | ||
62 | + </button> | ||
63 | + </div> | ||
64 | +</div> |
1 | +/// | ||
2 | +/// Copyright © 2016-2019 The Thingsboard Authors | ||
3 | +/// | ||
4 | +/// Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | +/// you may not use this file except in compliance with the License. | ||
6 | +/// You may obtain a copy of the License at | ||
7 | +/// | ||
8 | +/// http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | +/// | ||
10 | +/// Unless required by applicable law or agreed to in writing, software | ||
11 | +/// distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | +/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | +/// See the License for the specific language governing permissions and | ||
14 | +/// limitations under the License. | ||
15 | +/// | ||
16 | + | ||
17 | +import {Component, Inject, OnInit, SkipSelf} from '@angular/core'; | ||
18 | +import {ErrorStateMatcher, MAT_DIALOG_DATA, MatDialogRef} from '@angular/material'; | ||
19 | +import {PageComponent} from '@shared/components/page.component'; | ||
20 | +import {Store} from '@ngrx/store'; | ||
21 | +import {AppState} from '@core/core.state'; | ||
22 | +import {FormBuilder, FormControl, FormGroup, FormGroupDirective, NgForm} from '@angular/forms'; | ||
23 | +import {EntityType} from '@shared/models/entity-type.models'; | ||
24 | +import {DashboardService} from '@core/http/dashboard.service'; | ||
25 | +import {forkJoin, Observable} from 'rxjs'; | ||
26 | +import {DashboardInfo} from '@app/shared/models/dashboard.models'; | ||
27 | +import {ActionNotificationShow} from '@core/notification/notification.actions'; | ||
28 | +import {TranslateService} from '@ngx-translate/core'; | ||
29 | + | ||
30 | +export interface MakeDashboardPublicDialogData { | ||
31 | + dashboard: DashboardInfo; | ||
32 | +} | ||
33 | + | ||
34 | +@Component({ | ||
35 | + selector: 'tb-make-dashboard-public-dialog', | ||
36 | + templateUrl: './make-dashboard-public-dialog.component.html', | ||
37 | + styleUrls: [] | ||
38 | +}) | ||
39 | +export class MakeDashboardPublicDialogComponent extends PageComponent implements OnInit { | ||
40 | + | ||
41 | + dashboard: DashboardInfo; | ||
42 | + | ||
43 | + publicLink: string; | ||
44 | + | ||
45 | + constructor(protected store: Store<AppState>, | ||
46 | + @Inject(MAT_DIALOG_DATA) public data: MakeDashboardPublicDialogData, | ||
47 | + public translate: TranslateService, | ||
48 | + private dashboardService: DashboardService, | ||
49 | + public dialogRef: MatDialogRef<MakeDashboardPublicDialogComponent>, | ||
50 | + public fb: FormBuilder) { | ||
51 | + super(store); | ||
52 | + | ||
53 | + this.dashboard = data.dashboard; | ||
54 | + this.publicLink = dashboardService.getPublicDashboardLink(this.dashboard); | ||
55 | + } | ||
56 | + | ||
57 | + ngOnInit(): void { | ||
58 | + } | ||
59 | + | ||
60 | + close(): void { | ||
61 | + this.dialogRef.close(); | ||
62 | + } | ||
63 | + | ||
64 | + | ||
65 | + onPublicLinkCopied($event) { | ||
66 | + this.store.dispatch(new ActionNotificationShow( | ||
67 | + { | ||
68 | + message: this.translate.instant('dashboard.public-link-copied-message'), | ||
69 | + type: 'success', | ||
70 | + target: 'makeDashboardPublicDialogContent', | ||
71 | + duration: 750, | ||
72 | + verticalPosition: 'bottom', | ||
73 | + horizontalPosition: 'left' | ||
74 | + })); | ||
75 | + } | ||
76 | + | ||
77 | +} |
@@ -311,6 +311,7 @@ export class DevicesTableConfigResolver implements Resolve<EntityTableConfig<Dev | @@ -311,6 +311,7 @@ export class DevicesTableConfigResolver implements Resolve<EntityTableConfig<Dev | ||
311 | $event.stopPropagation(); | 311 | $event.stopPropagation(); |
312 | } | 312 | } |
313 | // TODO: | 313 | // TODO: |
314 | + this.dialogService.todo(); | ||
314 | } | 315 | } |
315 | 316 | ||
316 | addDevicesToCustomer($event: Event) { | 317 | addDevicesToCustomer($event: Event) { |
@@ -93,18 +93,21 @@ | @@ -93,18 +93,21 @@ | ||
93 | </mat-panel-title> | 93 | </mat-panel-title> |
94 | </mat-expansion-panel-header> | 94 | </mat-expansion-panel-header> |
95 | <div translate class="tb-hint">entity-view.attributes-propagation-hint</div> | 95 | <div translate class="tb-hint">entity-view.attributes-propagation-hint</div> |
96 | + <label translate class="tb-title no-padding">entity-view.client-attributes</label> | ||
96 | <tb-entity-keys-list | 97 | <tb-entity-keys-list |
97 | [entityId]="selectedEntityId | async" | 98 | [entityId]="selectedEntityId | async" |
98 | formControlName="cs" | 99 | formControlName="cs" |
99 | keysText="entity-view.client-attributes-placeholder" | 100 | keysText="entity-view.client-attributes-placeholder" |
100 | [dataKeyType]="dataKeyType.attribute"> | 101 | [dataKeyType]="dataKeyType.attribute"> |
101 | </tb-entity-keys-list> | 102 | </tb-entity-keys-list> |
103 | + <label translate class="tb-title no-padding">entity-view.shared-attributes</label> | ||
102 | <tb-entity-keys-list | 104 | <tb-entity-keys-list |
103 | [entityId]="selectedEntityId | async" | 105 | [entityId]="selectedEntityId | async" |
104 | formControlName="sh" | 106 | formControlName="sh" |
105 | keysText="entity-view.shared-attributes-placeholder" | 107 | keysText="entity-view.shared-attributes-placeholder" |
106 | [dataKeyType]="dataKeyType.attribute"> | 108 | [dataKeyType]="dataKeyType.attribute"> |
107 | </tb-entity-keys-list> | 109 | </tb-entity-keys-list> |
110 | + <label translate class="tb-title no-padding">entity-view.server-attributes</label> | ||
108 | <tb-entity-keys-list | 111 | <tb-entity-keys-list |
109 | [entityId]="selectedEntityId | async" | 112 | [entityId]="selectedEntityId | async" |
110 | formControlName="ss" | 113 | formControlName="ss" |
@@ -119,6 +122,7 @@ | @@ -119,6 +122,7 @@ | ||
119 | </mat-panel-title> | 122 | </mat-panel-title> |
120 | </mat-expansion-panel-header> | 123 | </mat-expansion-panel-header> |
121 | <div translate class="tb-hint">entity-view.timeseries-data-hint</div> | 124 | <div translate class="tb-hint">entity-view.timeseries-data-hint</div> |
125 | + <label translate class="tb-title no-padding">entity-view.timeseries</label> | ||
122 | <tb-entity-keys-list | 126 | <tb-entity-keys-list |
123 | [entityId]="selectedEntityId | async" | 127 | [entityId]="selectedEntityId | async" |
124 | formControlName="timeseries" | 128 | formControlName="timeseries" |
@@ -119,6 +119,7 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig< | @@ -119,6 +119,7 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig< | ||
119 | $event.stopPropagation(); | 119 | $event.stopPropagation(); |
120 | } | 120 | } |
121 | // TODO: | 121 | // TODO: |
122 | + this.dialogService.todo(); | ||
122 | } | 123 | } |
123 | 124 | ||
124 | openRuleChain($event: Event, ruleChain: RuleChain) { | 125 | openRuleChain($event: Event, ruleChain: RuleChain) { |
@@ -127,6 +128,7 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig< | @@ -127,6 +128,7 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig< | ||
127 | } | 128 | } |
128 | // TODO: | 129 | // TODO: |
129 | // this.router.navigateByUrl(`customers/${customer.id.id}/users`); | 130 | // this.router.navigateByUrl(`customers/${customer.id.id}/users`); |
131 | + this.dialogService.todo(); | ||
130 | } | 132 | } |
131 | 133 | ||
132 | exportRuleChain($event: Event, ruleChain: RuleChain) { | 134 | exportRuleChain($event: Event, ruleChain: RuleChain) { |
@@ -134,6 +136,7 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig< | @@ -134,6 +136,7 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig< | ||
134 | $event.stopPropagation(); | 136 | $event.stopPropagation(); |
135 | } | 137 | } |
136 | // TODO: | 138 | // TODO: |
139 | + this.dialogService.todo(); | ||
137 | } | 140 | } |
138 | 141 | ||
139 | setRootRuleChain($event: Event, ruleChain: RuleChain) { | 142 | setRootRuleChain($event: Event, ruleChain: RuleChain) { |
@@ -18,6 +18,12 @@ | @@ -18,6 +18,12 @@ | ||
18 | <div class="tb-details-buttons"> | 18 | <div class="tb-details-buttons"> |
19 | <button mat-raised-button color="primary" | 19 | <button mat-raised-button color="primary" |
20 | [disabled]="(isLoading$ | async)" | 20 | [disabled]="(isLoading$ | async)" |
21 | + (click)="onEntityAction($event, 'open')" | ||
22 | + [fxShow]="!isEdit"> | ||
23 | + {{'widgets-bundle.open-widgets-bundle' | translate }} | ||
24 | + </button> | ||
25 | + <button mat-raised-button color="primary" | ||
26 | + [disabled]="(isLoading$ | async)" | ||
21 | (click)="onEntityAction($event, 'export')" | 27 | (click)="onEntityAction($event, 'export')" |
22 | [fxShow]="!isEdit"> | 28 | [fxShow]="!isEdit"> |
23 | {{'widgets-bundle.export' | translate }} | 29 | {{'widgets-bundle.export' | translate }} |
@@ -35,6 +35,7 @@ import {Store} from '@ngrx/store'; | @@ -35,6 +35,7 @@ import {Store} from '@ngrx/store'; | ||
35 | import {AppState} from '@core/core.state'; | 35 | import {AppState} from '@core/core.state'; |
36 | import {getCurrentAuthUser} from '@app/core/auth/auth.selectors'; | 36 | import {getCurrentAuthUser} from '@app/core/auth/auth.selectors'; |
37 | import {Authority} from '@shared/models/authority.enum'; | 37 | import {Authority} from '@shared/models/authority.enum'; |
38 | +import {DialogService} from '@core/services/dialog.service'; | ||
38 | 39 | ||
39 | @Injectable() | 40 | @Injectable() |
40 | export class WidgetsBundlesTableConfigResolver implements Resolve<EntityTableConfig<WidgetsBundle>> { | 41 | export class WidgetsBundlesTableConfigResolver implements Resolve<EntityTableConfig<WidgetsBundle>> { |
@@ -42,6 +43,7 @@ export class WidgetsBundlesTableConfigResolver implements Resolve<EntityTableCon | @@ -42,6 +43,7 @@ export class WidgetsBundlesTableConfigResolver implements Resolve<EntityTableCon | ||
42 | private readonly config: EntityTableConfig<WidgetsBundle> = new EntityTableConfig<WidgetsBundle>(); | 43 | private readonly config: EntityTableConfig<WidgetsBundle> = new EntityTableConfig<WidgetsBundle>(); |
43 | 44 | ||
44 | constructor(private store: Store<AppState>, | 45 | constructor(private store: Store<AppState>, |
46 | + private dialogService: DialogService, | ||
45 | private widgetsService: WidgetService, | 47 | private widgetsService: WidgetService, |
46 | private translate: TranslateService, | 48 | private translate: TranslateService, |
47 | private datePipe: DatePipe, | 49 | private datePipe: DatePipe, |
@@ -126,6 +128,7 @@ export class WidgetsBundlesTableConfigResolver implements Resolve<EntityTableCon | @@ -126,6 +128,7 @@ export class WidgetsBundlesTableConfigResolver implements Resolve<EntityTableCon | ||
126 | $event.stopPropagation(); | 128 | $event.stopPropagation(); |
127 | } | 129 | } |
128 | // TODO: | 130 | // TODO: |
131 | + this.dialogService.todo(); | ||
129 | } | 132 | } |
130 | 133 | ||
131 | openWidgetsBundle($event: Event, widgetsBundle: WidgetsBundle) { | 134 | openWidgetsBundle($event: Event, widgetsBundle: WidgetsBundle) { |
@@ -134,6 +137,7 @@ export class WidgetsBundlesTableConfigResolver implements Resolve<EntityTableCon | @@ -134,6 +137,7 @@ export class WidgetsBundlesTableConfigResolver implements Resolve<EntityTableCon | ||
134 | } | 137 | } |
135 | // TODO: | 138 | // TODO: |
136 | // this.router.navigateByUrl(`customers/${customer.id.id}/users`); | 139 | // this.router.navigateByUrl(`customers/${customer.id.id}/users`); |
140 | + this.dialogService.todo(); | ||
137 | } | 141 | } |
138 | 142 | ||
139 | exportWidgetsBundle($event: Event, widgetsBundle: WidgetsBundle) { | 143 | exportWidgetsBundle($event: Event, widgetsBundle: WidgetsBundle) { |
@@ -141,6 +145,7 @@ export class WidgetsBundlesTableConfigResolver implements Resolve<EntityTableCon | @@ -141,6 +145,7 @@ export class WidgetsBundlesTableConfigResolver implements Resolve<EntityTableCon | ||
141 | $event.stopPropagation(); | 145 | $event.stopPropagation(); |
142 | } | 146 | } |
143 | // TODO: | 147 | // TODO: |
148 | + this.dialogService.todo(); | ||
144 | } | 149 | } |
145 | 150 | ||
146 | onWidgetsBundleAction(action: EntityAction<WidgetsBundle>): boolean { | 151 | onWidgetsBundleAction(action: EntityAction<WidgetsBundle>): boolean { |
@@ -27,7 +27,10 @@ | @@ -27,7 +27,10 @@ | ||
27 | (click)="clear()"> | 27 | (click)="clear()"> |
28 | <mat-icon class="material-icons">close</mat-icon> | 28 | <mat-icon class="material-icons">close</mat-icon> |
29 | </button> | 29 | </button> |
30 | - <mat-autocomplete #dashboardAutocomplete="matAutocomplete" [displayWith]="displayDashboardFn"> | 30 | + <mat-autocomplete |
31 | + class="tb-autocomplete" | ||
32 | + #dashboardAutocomplete="matAutocomplete" | ||
33 | + [displayWith]="displayDashboardFn"> | ||
31 | <mat-option *ngFor="let dashboard of filteredDashboards | async" [value]="dashboard"> | 34 | <mat-option *ngFor="let dashboard of filteredDashboards | async" [value]="dashboard"> |
32 | <span [innerHTML]="dashboard.title | highlight:searchText"></span> | 35 | <span [innerHTML]="dashboard.title | highlight:searchText"></span> |
33 | </mat-option> | 36 | </mat-option> |
@@ -28,7 +28,9 @@ | @@ -28,7 +28,9 @@ | ||
28 | (click)="clear()"> | 28 | (click)="clear()"> |
29 | <mat-icon class="material-icons">close</mat-icon> | 29 | <mat-icon class="material-icons">close</mat-icon> |
30 | </button> | 30 | </button> |
31 | - <mat-autocomplete #entityAutocomplete="matAutocomplete" [displayWith]="displayEntityFn"> | 31 | + <mat-autocomplete class="tb-autocomplete" |
32 | + #entityAutocomplete="matAutocomplete" | ||
33 | + [displayWith]="displayEntityFn"> | ||
32 | <mat-option *ngFor="let entity of filteredEntities | async" [value]="entity"> | 34 | <mat-option *ngFor="let entity of filteredEntities | async" [value]="entity"> |
33 | <span [innerHTML]="entity.name | highlight:searchText"></span> | 35 | <span [innerHTML]="entity.name | highlight:searchText"></span> |
34 | </mat-option> | 36 | </mat-option> |
@@ -15,27 +15,32 @@ | @@ -15,27 +15,32 @@ | ||
15 | limitations under the License. | 15 | limitations under the License. |
16 | 16 | ||
17 | --> | 17 | --> |
18 | -<mat-form-field [formGroup]="keysListFormGroup" class="mat-block"> | ||
19 | - <mat-chip-list #chipList [disabled]="disabled"> | 18 | +<mat-form-field appearance="standard" [formGroup]="keysListFormGroup" class="mat-block"> |
19 | + <mat-chip-list #chipList> | ||
20 | <mat-chip | 20 | <mat-chip |
21 | *ngFor="let key of modelValue" | 21 | *ngFor="let key of modelValue" |
22 | - [disabled]="disabled" | ||
23 | [selectable]="!disabled" | 22 | [selectable]="!disabled" |
24 | [removable]="!disabled" | 23 | [removable]="!disabled" |
25 | (removed)="remove(key)"> | 24 | (removed)="remove(key)"> |
26 | {{key}} | 25 | {{key}} |
27 | <mat-icon matChipRemove *ngIf="!disabled">close</mat-icon> | 26 | <mat-icon matChipRemove *ngIf="!disabled">close</mat-icon> |
28 | </mat-chip> | 27 | </mat-chip> |
29 | - <input matInput type="text" placeholder="{{ keysText | translate }}" | 28 | + <input matInput type="text" placeholder="{{ !disabled ? (keysText | translate) : '' }}" |
29 | + style="max-width: 200px;" | ||
30 | #keyInput | 30 | #keyInput |
31 | formControlName="key" | 31 | formControlName="key" |
32 | + matAutocompleteOrigin | ||
33 | + #origin="matAutocompleteOrigin" | ||
34 | + [matAutocompleteConnectedTo]="origin" | ||
32 | (focusin)="onFocus()" | 35 | (focusin)="onFocus()" |
33 | [matAutocomplete]="keyAutocomplete" | 36 | [matAutocomplete]="keyAutocomplete" |
34 | [matChipInputFor]="chipList" | 37 | [matChipInputFor]="chipList" |
35 | [matChipInputSeparatorKeyCodes]="separatorKeysCodes" | 38 | [matChipInputSeparatorKeyCodes]="separatorKeysCodes" |
36 | (matChipInputTokenEnd)="add($event)"> | 39 | (matChipInputTokenEnd)="add($event)"> |
37 | </mat-chip-list> | 40 | </mat-chip-list> |
38 | - <mat-autocomplete #keyAutocomplete="matAutocomplete" (optionSelected)="selected($event)" | 41 | + <mat-autocomplete #keyAutocomplete="matAutocomplete" |
42 | + class="tb-autocomplete" | ||
43 | + (optionSelected)="selected($event)" | ||
39 | [displayWith]="displayKeyFn"> | 44 | [displayWith]="displayKeyFn"> |
40 | <mat-option *ngFor="let key of filteredKeys | async" [value]="key"> | 45 | <mat-option *ngFor="let key of filteredKeys | async" [value]="key"> |
41 | <span [innerHTML]="key | highlight:searchText"></span> | 46 | <span [innerHTML]="key | highlight:searchText"></span> |
1 | +/** | ||
2 | + * Copyright © 2016-2019 The Thingsboard Authors | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | +:host { | ||
17 | + | ||
18 | +} | ||
19 | + | ||
20 | +:host ::ng-deep { | ||
21 | + .mat-form-field-flex { | ||
22 | + padding-top: 0; | ||
23 | + .mat-form-field-infix { | ||
24 | + border-top: 0; | ||
25 | + } | ||
26 | + } | ||
27 | +} |
@@ -41,7 +41,7 @@ import * as equal from 'deep-equal'; | @@ -41,7 +41,7 @@ import * as equal from 'deep-equal'; | ||
41 | @Component({ | 41 | @Component({ |
42 | selector: 'tb-entity-keys-list', | 42 | selector: 'tb-entity-keys-list', |
43 | templateUrl: './entity-keys-list.component.html', | 43 | templateUrl: './entity-keys-list.component.html', |
44 | - styleUrls: [], | 44 | + styleUrls: ['./entity-keys-list.component.scss'], |
45 | providers: [ | 45 | providers: [ |
46 | { | 46 | { |
47 | provide: NG_VALUE_ACCESSOR, | 47 | provide: NG_VALUE_ACCESSOR, |
@@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
25 | {{entity.name}} | 25 | {{entity.name}} |
26 | <mat-icon matChipRemove *ngIf="!disabled">close</mat-icon> | 26 | <mat-icon matChipRemove *ngIf="!disabled">close</mat-icon> |
27 | </mat-chip> | 27 | </mat-chip> |
28 | - <input matInput type="text" placeholder="{{ 'entity.entity-list' | translate }}" | 28 | + <input matInput type="text" placeholder="{{ !disabled ? ('entity.entity-list' | translate) : '' }}" |
29 | style="max-width: 200px;" | 29 | style="max-width: 200px;" |
30 | #entityInput | 30 | #entityInput |
31 | formControlName="entity" | 31 | formControlName="entity" |
@@ -36,6 +36,7 @@ | @@ -36,6 +36,7 @@ | ||
36 | [matChipInputFor]="chipList"> | 36 | [matChipInputFor]="chipList"> |
37 | </mat-chip-list> | 37 | </mat-chip-list> |
38 | <mat-autocomplete #entityAutocomplete="matAutocomplete" | 38 | <mat-autocomplete #entityAutocomplete="matAutocomplete" |
39 | + class="tb-autocomplete" | ||
39 | [displayWith]="displayEntityFn"> | 40 | [displayWith]="displayEntityFn"> |
40 | <mat-option *ngFor="let entity of filteredEntities | async" [value]="entity"> | 41 | <mat-option *ngFor="let entity of filteredEntities | async" [value]="entity"> |
41 | <span [innerHTML]="entity.name | highlight:searchText"></span> | 42 | <span [innerHTML]="entity.name | highlight:searchText"></span> |
@@ -29,7 +29,10 @@ | @@ -29,7 +29,10 @@ | ||
29 | (click)="clear()"> | 29 | (click)="clear()"> |
30 | <mat-icon class="material-icons">close</mat-icon> | 30 | <mat-icon class="material-icons">close</mat-icon> |
31 | </button> | 31 | </button> |
32 | - <mat-autocomplete #subTypeAutocomplete="matAutocomplete" [displayWith]="displaySubTypeFn"> | 32 | + <mat-autocomplete |
33 | + class="tb-autocomplete" | ||
34 | + #subTypeAutocomplete="matAutocomplete" | ||
35 | + [displayWith]="displaySubTypeFn"> | ||
33 | <mat-option *ngFor="let subType of filteredSubTypes | async" [value]="subType"> | 36 | <mat-option *ngFor="let subType of filteredSubTypes | async" [value]="subType"> |
34 | <span [innerHTML]="subType | highlight:searchText"></span> | 37 | <span [innerHTML]="subType | highlight:searchText"></span> |
35 | </mat-option> | 38 | </mat-option> |
1 | +/** | ||
2 | + * Copyright © 2016-2019 The Thingsboard Authors | ||
3 | + * | ||
4 | + * Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | + * you may not use this file except in compliance with the License. | ||
6 | + * You may obtain a copy of the License at | ||
7 | + * | ||
8 | + * http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | + * | ||
10 | + * Unless required by applicable law or agreed to in writing, software | ||
11 | + * distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | + * See the License for the specific language governing permissions and | ||
14 | + * limitations under the License. | ||
15 | + */ | ||
16 | +:host { | ||
17 | + display: block; | ||
18 | +} |
@@ -28,7 +28,7 @@ import {isLocalUrl} from '@core/utils'; | @@ -28,7 +28,7 @@ import {isLocalUrl} from '@core/utils'; | ||
28 | @Component({ | 28 | @Component({ |
29 | selector: 'tb-social-share-panel', | 29 | selector: 'tb-social-share-panel', |
30 | templateUrl: './socialshare-panel.component.html', | 30 | templateUrl: './socialshare-panel.component.html', |
31 | - styleUrls: [] | 31 | + styleUrls: ['./socialshare-panel.component.scss'] |
32 | }) | 32 | }) |
33 | export class SocialSharePanelComponent implements OnInit { | 33 | export class SocialSharePanelComponent implements OnInit { |
34 | 34 |
ui-ngx/src/assets/coming-soon.jpg
0 → 100644
277 KB
@@ -242,6 +242,13 @@ pre.tb-highlight { | @@ -242,6 +242,13 @@ pre.tb-highlight { | ||
242 | } | 242 | } |
243 | } | 243 | } |
244 | 244 | ||
245 | +.tb-notice { | ||
246 | + padding: 15px; | ||
247 | + font-size: 16px; | ||
248 | + background-color: #f7f7f7; | ||
249 | + border: 1px solid #ccc; | ||
250 | +} | ||
251 | + | ||
245 | .ace_editor { | 252 | .ace_editor { |
246 | font-size: 16px !important; | 253 | font-size: 16px !important; |
247 | } | 254 | } |
@@ -326,3 +333,19 @@ mat-label { | @@ -326,3 +333,19 @@ mat-label { | ||
326 | line-height: 14px; | 333 | line-height: 14px; |
327 | color: rgb(221, 44, 0); | 334 | color: rgb(221, 44, 0); |
328 | } | 335 | } |
336 | + | ||
337 | +.tb-autocomplete { | ||
338 | + .mat-option { | ||
339 | + display: block; | ||
340 | + line-height: 24px; | ||
341 | + height: auto !important; | ||
342 | + padding-top: 8px; | ||
343 | + border-bottom: 1px solid #eee; | ||
344 | + font-size: 14px; | ||
345 | + .mat-option-text { | ||
346 | + line-height: 24px; | ||
347 | + height: auto !important; | ||
348 | + white-space: normal !important; | ||
349 | + } | ||
350 | + } | ||
351 | +} |