Showing
11 changed files
with
31 additions
and
32 deletions
1 | 1 | <component name="ProjectRunConfigurationManager"> |
2 | - <configuration default="false" name="[CE Edge] Install" type="Application" factoryName="Application"> | |
2 | + <configuration default="false" name="[CE 3] Install" type="Application" factoryName="Application"> | |
3 | 3 | <envs> |
4 | 4 | <env name="SPRING_DATASOURCE_URL" value="jdbc:postgresql://localhost:5432/tb_ce_3" /> |
5 | 5 | </envs> | ... | ... |
1 | 1 | <component name="ProjectRunConfigurationManager"> |
2 | - <configuration default="false" name="[CE Edge] Server" type="Application" factoryName="Application"> | |
2 | + <configuration default="false" name="[CE 3] Server" type="Application" factoryName="Application"> | |
3 | 3 | <envs> |
4 | 4 | <env name="SPRING_DATASOURCE_URL" value="jdbc:postgresql://localhost:5432/tb_ce_3" /> |
5 | 5 | <env name="EDGES_RPC_PORT" value="7070" /> |
6 | - <env name="COAP_ENABLED" value="true" /> | |
6 | + <env name="COAP_ENABLED" value="false" /> | |
7 | 7 | <env name="EDGES_RPC_ENABLED" value="true" /> |
8 | 8 | <env name="MQTT_BIND_PORT" value="1884" /> |
9 | 9 | </envs> | ... | ... |
... | ... | @@ -76,12 +76,6 @@ export class EdgeService { |
76 | 76 | defaultHttpOptionsFromConfig(config)); |
77 | 77 | } |
78 | 78 | |
79 | - public setRootRuleChain(edgeId: string, ruleChainId: string, | |
80 | - config?: RequestConfig): Observable<Edge> { | |
81 | - return this.http.post<Edge>(`/api/edge/${edgeId}/${ruleChainId}/root`, | |
82 | - defaultHttpOptionsFromConfig(config)); | |
83 | - } | |
84 | - | |
85 | 79 | public getTenantEdgeInfos(pageLink: PageLink, type: string = '', |
86 | 80 | config?: RequestConfig): Observable<PageData<EdgeInfo>> { |
87 | 81 | return this.http.get<PageData<EdgeInfo>>(`/api/tenant/edgeInfos${pageLink.toQuery()}&type=${type}`, | ... | ... |
... | ... | @@ -44,6 +44,7 @@ import { TranslateService } from '@ngx-translate/core'; |
44 | 44 | import { EntityType } from '@shared/models/entity-type.models'; |
45 | 45 | import { deepClone, snakeCase } from '@core/utils'; |
46 | 46 | import { DebugRuleNodeEventBody } from '@app/shared/models/event.models'; |
47 | +import { Edge } from "@shared/models/edge.models"; | |
47 | 48 | |
48 | 49 | @Injectable({ |
49 | 50 | providedIn: 'root' |
... | ... | @@ -323,4 +324,9 @@ export class RuleChainService { |
323 | 324 | return this.http.get<Array<RuleChain>>(`/api/ruleChain/defaultEdgeRuleChains`, defaultHttpOptionsFromConfig(config)); |
324 | 325 | } |
325 | 326 | |
327 | + public setEdgeRootRuleChain(edgeId: string, ruleChainId: string, config?: RequestConfig): Observable<Edge> { //TODO deaflynx EdgeInfo vs. Edge check usage | |
328 | + return this.http.post<Edge>(`/api/edge/${edgeId}/${ruleChainId}/root`, | |
329 | + defaultHttpOptionsFromConfig(config)); | |
330 | + } | |
331 | + | |
326 | 332 | } | ... | ... |
... | ... | @@ -149,10 +149,10 @@ export class EdgesTableConfigResolver implements Resolve<EntityTableConfig<EdgeI |
149 | 149 | if (edgeScope === 'tenant') { |
150 | 150 | columns.push( |
151 | 151 | new EntityTableColumn<EdgeInfo>('customerTitle', 'customer.customer', '25%'), |
152 | - new EntityTableColumn<EdgeInfo>('customerIsPublic', 'edge.public', '60px', | |
152 | + /* new EntityTableColumn<EdgeInfo>('customerIsPublic', 'edge.public', '60px', | |
153 | 153 | entity => { |
154 | 154 | return checkBoxCell(entity.customerIsPublic); |
155 | - }, () => ({}), false), | |
155 | + }, () => ({}), false) */ | |
156 | 156 | ); |
157 | 157 | } |
158 | 158 | return columns; |
... | ... | @@ -175,12 +175,12 @@ export class EdgesTableConfigResolver implements Resolve<EntityTableConfig<EdgeI |
175 | 175 | const actions: Array<CellActionDescriptor<EdgeInfo>> = []; |
176 | 176 | if (edgeScope === 'tenant') { |
177 | 177 | actions.push( |
178 | - { | |
179 | - name: this.translate.instant('edge.make-public'), | |
180 | - icon: 'share', | |
181 | - isEnabled: (entity) => (!entity.customerId || entity.customerId.id === NULL_UUID), | |
182 | - onAction: ($event, entity) => this.makePublic($event, entity) | |
183 | - }, | |
178 | + /* { | |
179 | + name: this.translate.instant('edge.make-public'), | |
180 | + icon: 'share', | |
181 | + isEnabled: (entity) => (!entity.customerId || entity.customerId.id === NULL_UUID), | |
182 | + onAction: ($event, entity) => this.makePublic($event, entity) | |
183 | + }, */ | |
184 | 184 | { |
185 | 185 | name: this.translate.instant('edge.assign-to-customer'), |
186 | 186 | icon: 'assignment_ind', |
... | ... | @@ -335,7 +335,7 @@ export class EdgesTableConfigResolver implements Resolve<EntityTableConfig<EdgeI |
335 | 335 | }); |
336 | 336 | } |
337 | 337 | |
338 | - makePublic($event: Event, edge: Edge) { | |
338 | + /* makePublic($event: Event, edge: Edge) { | |
339 | 339 | if ($event) { |
340 | 340 | $event.stopPropagation(); |
341 | 341 | } |
... | ... | @@ -355,7 +355,7 @@ export class EdgesTableConfigResolver implements Resolve<EntityTableConfig<EdgeI |
355 | 355 | } |
356 | 356 | } |
357 | 357 | ); |
358 | - } | |
358 | + } */ | |
359 | 359 | |
360 | 360 | openEdgeDashboards($event, edge) { |
361 | 361 | if ($event) { |
... | ... | @@ -474,9 +474,9 @@ export class EdgesTableConfigResolver implements Resolve<EntityTableConfig<EdgeI |
474 | 474 | |
475 | 475 | onEdgeAction(action: EntityAction<EdgeInfo>): boolean { |
476 | 476 | switch (action.action) { |
477 | - case 'makePublic': | |
478 | - this.makePublic(action.event, action.entity); | |
479 | - return true; | |
477 | + // case 'makePublic': | |
478 | + // this.makePublic(action.event, action.entity); | |
479 | + // return true; | |
480 | 480 | case 'assignToCustomer': |
481 | 481 | this.assignToCustomer(action.event, [action.entity.id]); |
482 | 482 | return true; | ... | ... |
... | ... | @@ -210,7 +210,7 @@ const routes: Routes = [ |
210 | 210 | component: EntitiesTableComponent, |
211 | 211 | data: { |
212 | 212 | auth: [Authority.TENANT_ADMIN], |
213 | - title: 'edge.rulechains', | |
213 | + title: 'rulechain.edge-rulechains', | |
214 | 214 | ruleChainsType: 'edges' |
215 | 215 | }, |
216 | 216 | resolve: { |
... | ... | @@ -227,7 +227,7 @@ const routes: Routes = [ |
227 | 227 | icon: 'settings_ethernet' |
228 | 228 | } as BreadCrumbConfig<RuleChainPageComponent>, |
229 | 229 | auth: [Authority.TENANT_ADMIN], |
230 | - title: 'edge.rulechain', | |
230 | + title: 'rulechain.edge-rulechain', | |
231 | 231 | import: false, |
232 | 232 | ruleChainType: ruleChainType.edge |
233 | 233 | }, |
... | ... | @@ -248,7 +248,7 @@ const routes: Routes = [ |
248 | 248 | icon: 'settings_ethernet' |
249 | 249 | } as BreadCrumbConfig<RuleChainPageComponent>, |
250 | 250 | auth: [Authority.TENANT_ADMIN], |
251 | - title: 'edge.rulechain', | |
251 | + title: 'rulechain.edge-rulechain', | |
252 | 252 | import: true, |
253 | 253 | ruleChainType: ruleChainType.edge |
254 | 254 | }, | ... | ... |
... | ... | @@ -100,11 +100,11 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig< |
100 | 100 | }; |
101 | 101 | if (this.config.componentsData.edgeId) { |
102 | 102 | this.config.entitySelectionEnabled = ruleChain => this.config.componentsData.edge.rootRuleChainId.id != ruleChain.id.id; |
103 | - this.config.deleteEnabled = () => false; | |
104 | 103 | this.edgeService.getEdge(this.config.componentsData.edgeId).subscribe(edge => { |
105 | 104 | this.config.componentsData.edge = edge; |
106 | 105 | this.config.tableTitle = edge.name + ': ' + this.translate.instant('rulechain.edge-rulechains'); |
107 | 106 | }); |
107 | + this.config.entitiesDeleteEnabled = false; | |
108 | 108 | } |
109 | 109 | else { |
110 | 110 | this.config.entitySelectionEnabled = ruleChain => ruleChain && !ruleChain.root; |
... | ... | @@ -294,7 +294,7 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig< |
294 | 294 | ).subscribe((res) => { |
295 | 295 | if (res) { |
296 | 296 | if (this.config.componentsData.edgeId) { |
297 | - this.edgeService.setRootRuleChain(this.config.componentsData.edgeId, ruleChain.id.id).subscribe( | |
297 | + this.ruleChainService.setEdgeRootRuleChain(this.config.componentsData.edgeId, ruleChain.id.id).subscribe( | |
298 | 298 | (edge) => { |
299 | 299 | this.config.componentsData.edge = edge; |
300 | 300 | this.config.table.updateData(); | ... | ... |
... | ... | @@ -980,8 +980,6 @@ |
980 | 980 | "unassign-from-edge": "Unassign from edge", |
981 | 981 | "dashboards": "Edge Dashboards", |
982 | 982 | "manage-edge-rulechains": "Manage edge rule chains", |
983 | - "rulechains": "Edge Rule Chains", | |
984 | - "rulechain": "Edge Rule Chain", | |
985 | 983 | "edge-key": "Edge key", |
986 | 984 | "copy-edge-key": "Copy Edge key", |
987 | 985 | "edge-key-copied-message": "Edge key has been copied to clipboard", |
... | ... | @@ -1832,6 +1830,7 @@ |
1832 | 1830 | "open-rulechain": "Open rule chain", |
1833 | 1831 | "assign-new-rulechain": "Assign new rulechain", |
1834 | 1832 | "edge-rulechains": "Edge Rule chains", |
1833 | + "edge-rulechain": "Edge Rule chain", | |
1835 | 1834 | "core-rulechains": "Core Rule chains", |
1836 | 1835 | "unassign-rulechain-from-edge-text": "After the confirmation the rulechain will be unassigned and won't be accessible by the edge.", |
1837 | 1836 | "unassign-rulechains-from-edge-title": "Unassign { count, plural, 1 {1 rulechain} other {# rulechains} } from edge", | ... | ... |
... | ... | @@ -194,7 +194,7 @@ export default function EdgeRoutes($stateProvider, types) { |
194 | 194 | }, |
195 | 195 | data: { |
196 | 196 | searchEnabled: true, |
197 | - pageTitle: 'edge.rulechains', | |
197 | + pageTitle: 'rulechain.edge-rulechains', | |
198 | 198 | ruleChainsType: 'edge' |
199 | 199 | }, |
200 | 200 | ncyBreadcrumb: { | ... | ... |