Commit cf1e4bf5e9ab9b07ef9e7a688d29b9daca1fbdf0
1 parent
b649185e
Edges widgets do not remove if edges_enable: false
Showing
2 changed files
with
1 additions
and
15 deletions
... | ... | @@ -30,9 +30,6 @@ import { filter, map, mergeMap, tap } from 'rxjs/operators'; |
30 | 30 | import { WidgetTypeId } from '@shared/models/id/widget-type-id'; |
31 | 31 | import { NULL_UUID } from '@shared/models/id/has-uuid'; |
32 | 32 | import { ActivationEnd, Router } from '@angular/router'; |
33 | -import { getCurrentAuthState } from "@core/auth/auth.selectors"; | |
34 | -import { Store } from "@ngrx/store"; | |
35 | -import { AppState } from "@core/core.state"; | |
36 | 33 | |
37 | 34 | @Injectable({ |
38 | 35 | providedIn: 'root' |
... | ... | @@ -53,7 +50,6 @@ export class WidgetService { |
53 | 50 | private utils: UtilsService, |
54 | 51 | private resources: ResourcesService, |
55 | 52 | private translate: TranslateService, |
56 | - private store: Store<AppState>, | |
57 | 53 | private router: Router |
58 | 54 | ) { |
59 | 55 | this.router.events.pipe(filter(event => event instanceof ActivationEnd)).subscribe( |
... | ... | @@ -125,9 +121,6 @@ export class WidgetService { |
125 | 121 | config?: RequestConfig): Observable<Array<Widget>> { |
126 | 122 | return this.getBundleWidgetTypes(bundleAlias, isSystem, config).pipe( |
127 | 123 | map((types) => { |
128 | - if (!getCurrentAuthState(this.store).edgesSupportEnabled) { | |
129 | - types = types.filter(type => type.alias !== 'edges_overview') | |
130 | - } | |
131 | 124 | types = types.sort((a, b) => { |
132 | 125 | let result = widgetType[b.descriptor.type].localeCompare(widgetType[a.descriptor.type]); |
133 | 126 | if (result === 0) { | ... | ... |
... | ... | @@ -22,9 +22,6 @@ import { WidgetService } from '@core/http/widget.service'; |
22 | 22 | import { Widget, widgetType } from '@shared/models/widget.models'; |
23 | 23 | import { toWidgetInfo } from '@home/models/widget-component.models'; |
24 | 24 | import { DashboardCallbacks } from '../../models/dashboard-component.models'; |
25 | -import { getCurrentAuthState } from "@core/auth/auth.selectors"; | |
26 | -import { Store } from "@ngrx/store"; | |
27 | -import { AppState } from "@core/core.state"; | |
28 | 25 | |
29 | 26 | @Component({ |
30 | 27 | selector: 'tb-dashboard-widget-select', |
... | ... | @@ -52,8 +49,7 @@ export class DashboardWidgetSelectComponent implements OnInit, OnChanges { |
52 | 49 | onWidgetClicked: this.onWidgetClicked.bind(this) |
53 | 50 | }; |
54 | 51 | |
55 | - constructor(private widgetsService: WidgetService, | |
56 | - private store: Store<AppState>) { | |
52 | + constructor(private widgetsService: WidgetService) { | |
57 | 53 | } |
58 | 54 | |
59 | 55 | ngOnInit(): void { |
... | ... | @@ -116,9 +112,6 @@ export class DashboardWidgetSelectComponent implements OnInit, OnChanges { |
116 | 112 | this.staticWidgetTypes.push(widget); |
117 | 113 | break; |
118 | 114 | } |
119 | - if (!getCurrentAuthState(this.store).edgesSupportEnabled) { | |
120 | - this.staticWidgetTypes = this.staticWidgetTypes.filter(type => type.typeAlias !== 'edges_instances_overview') | |
121 | - } | |
122 | 115 | top += widget.sizeY; |
123 | 116 | }); |
124 | 117 | } | ... | ... |