Commit acfb6de8846de6dff7c24c46c898430a803fcd82
1 parent
e64bbad4
Added Edge edgeLicenseKey and cloudEndpoint
Showing
7 changed files
with
49 additions
and
10 deletions
1 | <component name="ProjectRunConfigurationManager"> | 1 | <component name="ProjectRunConfigurationManager"> |
2 | <configuration default="false" name="[CE Edge] Install" type="Application" factoryName="Application"> | 2 | <configuration default="false" name="[CE Edge] Install" type="Application" factoryName="Application"> |
3 | <envs> | 3 | <envs> |
4 | - <env name="SPRING_DATASOURCE_URL" value="jdbc:postgresql://localhost:5432/tb_ce_edge_3" /> | 4 | + <env name="SPRING_DATASOURCE_URL" value="jdbc:postgresql://localhost:5432/tb_ce_3" /> |
5 | </envs> | 5 | </envs> |
6 | <option name="MAIN_CLASS_NAME" value="org.thingsboard.server.ThingsboardInstallApplication" /> | 6 | <option name="MAIN_CLASS_NAME" value="org.thingsboard.server.ThingsboardInstallApplication" /> |
7 | <module name="application" /> | 7 | <module name="application" /> |
1 | <component name="ProjectRunConfigurationManager"> | 1 | <component name="ProjectRunConfigurationManager"> |
2 | <configuration default="false" name="[CE Edge] Server" type="Application" factoryName="Application"> | 2 | <configuration default="false" name="[CE Edge] Server" type="Application" factoryName="Application"> |
3 | <envs> | 3 | <envs> |
4 | - <env name="SPRING_DATASOURCE_URL" value="jdbc:postgresql://localhost:5432/tb_ce_edge_3" /> | 4 | + <env name="SPRING_DATASOURCE_URL" value="jdbc:postgresql://localhost:5432/tb_ce_3" /> |
5 | <env name="EDGES_RPC_PORT" value="7070" /> | 5 | <env name="EDGES_RPC_PORT" value="7070" /> |
6 | <env name="COAP_ENABLED" value="true" /> | 6 | <env name="COAP_ENABLED" value="true" /> |
7 | <env name="EDGES_RPC_ENABLED" value="true" /> | 7 | <env name="EDGES_RPC_ENABLED" value="true" /> |
@@ -14,15 +14,14 @@ | @@ -14,15 +14,14 @@ | ||
14 | /// limitations under the License. | 14 | /// limitations under the License. |
15 | /// | 15 | /// |
16 | 16 | ||
17 | -import { Injectable } from '@angular/core'; | 17 | +import {Inject, Injectable} from '@angular/core'; |
18 | import { defaultHttpOptionsFromConfig, RequestConfig } from './http-utils'; | 18 | import { defaultHttpOptionsFromConfig, RequestConfig } from './http-utils'; |
19 | import { Observable } from 'rxjs'; | 19 | import { Observable } from 'rxjs'; |
20 | import { HttpClient } from '@angular/common/http'; | 20 | import { HttpClient } from '@angular/common/http'; |
21 | import { PageLink } from '@shared/models/page/page-link'; | 21 | import { PageLink } from '@shared/models/page/page-link'; |
22 | import { PageData } from '@shared/models/page/page-data'; | 22 | import { PageData } from '@shared/models/page/page-data'; |
23 | import { EntitySubtype } from '@app/shared/models/entity-type.models'; | 23 | import { EntitySubtype } from '@app/shared/models/entity-type.models'; |
24 | -import {Edge, EdgeInfo, EdgeSearchQuery } from "@shared/models/edge.models"; | ||
25 | - | 24 | +import { Edge, EdgeInfo, EdgeSearchQuery } from "@shared/models/edge.models"; |
26 | @Injectable({ | 25 | @Injectable({ |
27 | providedIn: 'root' | 26 | providedIn: 'root' |
28 | }) | 27 | }) |
@@ -89,6 +89,28 @@ | @@ -89,6 +89,28 @@ | ||
89 | </div> | 89 | </div> |
90 | </fieldset> | 90 | </fieldset> |
91 | <div fxLayout="row"> | 91 | <div fxLayout="row"> |
92 | + <fieldset fxFlex> | ||
93 | + <mat-form-field class="mat-block"> | ||
94 | + <mat-label translate>edge.cloud-endpoint</mat-label> | ||
95 | + <input matInput formControlName="cloudEndpoint" required> | ||
96 | + <mat-error *ngIf="entityForm.get('cloudEndpoint').hasError('required')"> | ||
97 | + {{ 'edge.cloud-endpoint-required' | translate }} | ||
98 | + </mat-error> | ||
99 | + </mat-form-field> | ||
100 | + </fieldset> | ||
101 | + </div> | ||
102 | + <div fxLayout="row"> | ||
103 | + <fieldset fxFlex> | ||
104 | + <mat-form-field class="mat-block"> | ||
105 | + <mat-label translate>edge.edge-license-key</mat-label> | ||
106 | + <input matInput formControlName="edgeLicenseKey" required> | ||
107 | + <mat-error *ngIf="entityForm.get('edgeLicenseKey').hasError('required')"> | ||
108 | + {{ 'edge.edge-license-key-required' | translate }} | ||
109 | + </mat-error> | ||
110 | + </mat-form-field> | ||
111 | + </fieldset> | ||
112 | + </div> | ||
113 | + <div fxLayout="row"> | ||
92 | <fieldset fxFlex disabled> | 114 | <fieldset fxFlex disabled> |
93 | <mat-form-field class="mat-block"> | 115 | <mat-form-field class="mat-block"> |
94 | <mat-label translate>edge.edge-key</mat-label> | 116 | <mat-label translate>edge.edge-key</mat-label> |
@@ -48,7 +48,7 @@ export class EdgeComponent extends EntityComponent<EdgeInfo>{ | @@ -48,7 +48,7 @@ export class EdgeComponent extends EntityComponent<EdgeInfo>{ | ||
48 | 48 | ||
49 | ngOnInit() { | 49 | ngOnInit() { |
50 | this.edgeScope = this.entitiesTableConfig.componentsData.edgeScope; | 50 | this.edgeScope = this.entitiesTableConfig.componentsData.edgeScope; |
51 | - super.ngOnInit() | 51 | + super.ngOnInit(); |
52 | } | 52 | } |
53 | 53 | ||
54 | hideDelete() { | 54 | hideDelete() { |
@@ -69,6 +69,8 @@ export class EdgeComponent extends EntityComponent<EdgeInfo>{ | @@ -69,6 +69,8 @@ export class EdgeComponent extends EntityComponent<EdgeInfo>{ | ||
69 | name: [entity ? entity.name : '', [Validators.required]], | 69 | name: [entity ? entity.name : '', [Validators.required]], |
70 | type: [entity ? entity.type : null, [Validators.required]], | 70 | type: [entity ? entity.type : null, [Validators.required]], |
71 | label: [entity ? entity.label : ''], | 71 | label: [entity ? entity.label : ''], |
72 | + cloudEndpoint: '', | ||
73 | + edgeLicenseKey: '', | ||
72 | routingKey: guid(), | 74 | routingKey: guid(), |
73 | secret: this.generateSecret(20), | 75 | secret: this.generateSecret(20), |
74 | additionalInfo: this.fb.group( | 76 | additionalInfo: this.fb.group( |
@@ -84,6 +86,8 @@ export class EdgeComponent extends EntityComponent<EdgeInfo>{ | @@ -84,6 +86,8 @@ export class EdgeComponent extends EntityComponent<EdgeInfo>{ | ||
84 | this.entityForm.patchValue({name: entity.name}); | 86 | this.entityForm.patchValue({name: entity.name}); |
85 | this.entityForm.patchValue({type: entity.type}); | 87 | this.entityForm.patchValue({type: entity.type}); |
86 | this.entityForm.patchValue({label: entity.label}); | 88 | this.entityForm.patchValue({label: entity.label}); |
89 | + this.entityForm.patchValue({cloudEndpoint: entity.cloudEndpoint}); | ||
90 | + this.entityForm.patchValue({edgeLicenseKey: entity.edgeLicenseKey}); | ||
87 | this.entityForm.patchValue({routingKey: entity.routingKey}); | 91 | this.entityForm.patchValue({routingKey: entity.routingKey}); |
88 | this.entityForm.patchValue({secret: entity.secret}); | 92 | this.entityForm.patchValue({secret: entity.secret}); |
89 | this.entityForm.patchValue({additionalInfo: { | 93 | this.entityForm.patchValue({additionalInfo: { |
@@ -27,6 +27,8 @@ export interface Edge extends BaseData<EdgeId> { | @@ -27,6 +27,8 @@ export interface Edge extends BaseData<EdgeId> { | ||
27 | type: string; | 27 | type: string; |
28 | secret: string; | 28 | secret: string; |
29 | routingKey: string; | 29 | routingKey: string; |
30 | + cloudEndpoint: string; | ||
31 | + edgeLicenseKey: string; | ||
30 | label?: string; | 32 | label?: string; |
31 | additionalInfo?: any; | 33 | additionalInfo?: any; |
32 | } | 34 | } |
@@ -916,15 +916,24 @@ | @@ -916,15 +916,24 @@ | ||
916 | "delete-edges-text": "Be careful, after the confirmation all selected edges will be removed and all related data will become unrecoverable.", | 916 | "delete-edges-text": "Be careful, after the confirmation all selected edges will be removed and all related data will become unrecoverable.", |
917 | "name": "Name", | 917 | "name": "Name", |
918 | "name-required": "Name is required.", | 918 | "name-required": "Name is required.", |
919 | + "edge-license-key": "Edge License Key", | ||
920 | + "edge-license-key-required": "Edge License Key is required.", | ||
921 | + "cloud-endpoint": "Cloud Endpoint", | ||
922 | + "cloud-endpoint-required": "Cloud Endpoint is required.", | ||
919 | "description": "Description", | 923 | "description": "Description", |
920 | - "events": "Events", | 924 | + "entity-info": "Entity info", |
921 | "details": "Details", | 925 | "details": "Details", |
926 | + "events": "Events", | ||
922 | "copy-id": "Copy Edge Id", | 927 | "copy-id": "Copy Edge Id", |
923 | "id-copied-message": "Edge Id has been copied to clipboard", | 928 | "id-copied-message": "Edge Id has been copied to clipboard", |
929 | + "sync": "Sync Edge", | ||
930 | + "sync-message": "Edge has been synchronized", | ||
924 | "permissions": "Permissions", | 931 | "permissions": "Permissions", |
925 | "edge-required": "Edge required", | 932 | "edge-required": "Edge required", |
926 | "edge-type": "Edge type", | 933 | "edge-type": "Edge type", |
927 | "edge-type-required": "Edge type is required.", | 934 | "edge-type-required": "Edge type is required.", |
935 | + "event-action": "Event action", | ||
936 | + "entity-id": "Entity ID", | ||
928 | "select-edge-type": "Select edge type", | 937 | "select-edge-type": "Select edge type", |
929 | "assign-to-customer": "Assign to customer", | 938 | "assign-to-customer": "Assign to customer", |
930 | "assign-to-customer-text": "Please select the customer to assign the edge(s)", | 939 | "assign-to-customer-text": "Please select the customer to assign the edge(s)", |
@@ -935,6 +944,8 @@ | @@ -935,6 +944,8 @@ | ||
935 | "assign-edges-text": "Assign { count, plural, 1 {1 edge} other {# edges} } to customer", | 944 | "assign-edges-text": "Assign { count, plural, 1 {1 edge} other {# edges} } to customer", |
936 | "unassign-edge-title": "Are you sure you want to unassign the edge '{{edgeName}}'?", | 945 | "unassign-edge-title": "Are you sure you want to unassign the edge '{{edgeName}}'?", |
937 | "unassign-edge-text": "After the confirmation the edge will be unassigned and won't be accessible by the customer.", | 946 | "unassign-edge-text": "After the confirmation the edge will be unassigned and won't be accessible by the customer.", |
947 | + "unassign-edges-title": "Are you sure you want to unassign { count, plural, 1 {1 edge} other {# edges} }?", | ||
948 | + "unassign-edges-text": "After the confirmation all selected edges will be unassigned and won't be accessible by the customer.", | ||
938 | "make-public": "Make edge public", | 949 | "make-public": "Make edge public", |
939 | "make-public-edge-title": "Are you sure you want to make the edge '{{edgeName}}' public?", | 950 | "make-public-edge-title": "Are you sure you want to make the edge '{{edgeName}}' public?", |
940 | "make-public-edge-text": "After the confirmation the edge and all its data will be made public and accessible by others.", | 951 | "make-public-edge-text": "After the confirmation the edge and all its data will be made public and accessible by others.", |
@@ -944,6 +955,7 @@ | @@ -944,6 +955,7 @@ | ||
944 | "make-private-edge-text": "After the confirmation the edge and all its data will be made private and won't be accessible by others.", | 955 | "make-private-edge-text": "After the confirmation the edge and all its data will be made private and won't be accessible by others.", |
945 | "import": "Import edge", | 956 | "import": "Import edge", |
946 | "label": "Label", | 957 | "label": "Label", |
958 | + "load-entity-error": "Entity not found. Failed to load info", | ||
947 | "assign-new-edge": "Assign new edge", | 959 | "assign-new-edge": "Assign new edge", |
948 | "manage-edge-dashboards": "Manage edge dashboards", | 960 | "manage-edge-dashboards": "Manage edge dashboards", |
949 | "unassign-from-edge": "Unassign from edge", | 961 | "unassign-from-edge": "Unassign from edge", |
@@ -966,9 +978,9 @@ | @@ -966,9 +978,9 @@ | ||
966 | "set-root-rule-chain-text": "Please select root rule chain for edge(s)", | 978 | "set-root-rule-chain-text": "Please select root rule chain for edge(s)", |
967 | "set-root-rule-chain-to-edges": "Set root rule chain for Edge(s)", | 979 | "set-root-rule-chain-to-edges": "Set root rule chain for Edge(s)", |
968 | "set-root-rule-chain-to-edges-text": "Set root rule chain for { count, plural, 1 {1 edge} other {# edges} }", | 980 | "set-root-rule-chain-to-edges-text": "Set root rule chain for { count, plural, 1 {1 edge} other {# edges} }", |
969 | - "selected-edges": "{ count, plural, 1 {1 edge} other {# edges} } selected", | ||
970 | - "name-starts-with": "Edge name starts with", | ||
971 | - "search": "Search edges" | 981 | + "status": "Received by edge", |
982 | + "success": "Deployed", | ||
983 | + "failed": "Pending" | ||
972 | }, | 984 | }, |
973 | "error": { | 985 | "error": { |
974 | "unable-to-connect": "Unable to connect to the server! Please check your internet connection.", | 986 | "unable-to-connect": "Unable to connect to the server! Please check your internet connection.", |