Skip to content

Commit

Permalink
fixed paginator steps; fix #SNRGY-2959
Browse files Browse the repository at this point in the history
  • Loading branch information
hahahannes committed Nov 3, 2023
1 parent 83c31c6 commit e0ef45d
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class DeviceGroupsComponent implements OnInit, OnDestroy, AfterViewInit {
this.paginator.page.subscribe(()=>{
this.pageSize = this.paginator.pageSize
this.offset = this.paginator.pageSize * this.paginator.pageIndex;
this.getDeviceGroups()
this.getDeviceGroups().subscribe()
});
}

Expand Down Expand Up @@ -163,7 +163,7 @@ export class DeviceGroupsComponent implements OnInit, OnDestroy, AfterViewInit {

setHideGenerated(hide: boolean){
this.hideGenerated = hide;
this.getDeviceGroups();
this.getDeviceGroups().subscribe();
}

private getDeviceGroups(): Observable<DeviceGroupsPermSearchModel[]> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class DeviceInstancesComponent implements OnInit, AfterViewInit {
this.paginator.page.subscribe(()=>{
this.pageSize = this.paginator.pageSize;
this.offset = this.paginator.pageSize * this.paginator.pageIndex;
this.load();
this.load().subscribe();
});
}

Expand Down Expand Up @@ -273,7 +273,7 @@ export class DeviceInstancesComponent implements OnInit, AfterViewInit {
this.routerDeviceType = null;
this.routerLocation = null;
this.resetTag();
this.load();
this.load().subscribe();
}

private resetTag() {
Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/devices/locations/locations.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export class LocationsComponent implements OnInit, OnDestroy, AfterViewInit {
this.paginator.page.subscribe(()=>{
this.pageSize = this.paginator.pageSize
this.offset = this.paginator.pageSize * this.paginator.pageIndex;
this.getLocations()
this.getLocations().subscribe()
});
}

Expand Down
4 changes: 2 additions & 2 deletions src/app/modules/devices/networks/networks.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class NetworksComponent implements OnInit, OnDestroy {
this.paginator.page.subscribe(()=>{
this.pageSize = this.paginator.pageSize
this.offset = this.paginator.pageSize * this.paginator.pageIndex;
this.getNetworks();
this.getNetworks().subscribe();
});
}

Expand All @@ -152,7 +152,7 @@ export class NetworksComponent implements OnInit, OnDestroy {
.subscribe((deleteNetwork: boolean) => {
if (deleteNetwork) {
setTimeout(() => {
this.getNetworks();
this.getNetworks().subscribe();
}, 1000);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class ImportInstancesComponent implements OnInit {
this.paginator.page.subscribe(()=>{
this.pageSize = this.paginator.pageSize
this.offset = this.paginator.pageSize * this.paginator.pageIndex;
this.load();
this.load().subscribe();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class ImportTypesComponent implements OnInit {
this.paginator.page.subscribe(()=>{
this.pageSize = this.paginator.pageSize
this.offset = this.paginator.pageSize * this.paginator.pageIndex;
this.load();
this.load().subscribe();
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class CharacteristicsComponent implements OnInit, OnDestroy {
this.paginator.page.subscribe(()=>{
this.pageSize = this.paginator.pageSize
this.offset = this.paginator.pageSize * this.paginator.pageIndex;
this.getCharacteristics()
this.getCharacteristics().subscribe()
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/modules/metadata/concepts/concepts.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export class ConceptsComponent implements OnInit, OnDestroy {
this.paginator.page.subscribe(()=>{
this.pageSize = this.paginator.pageSize
this.offset = this.paginator.pageSize * this.paginator.pageIndex;
this.getConcepts()
this.getConcepts().subscribe()
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class DeviceClassesComponent implements OnInit, OnDestroy {
this.paginator.page.subscribe(()=>{
this.pageSize = this.paginator.pageSize
this.offset = this.paginator.pageSize * this.paginator.pageIndex;
this.getDeviceClasses()
this.getDeviceClasses().subscribe()
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class DeviceTypesOverviewComponent implements OnInit, OnDestroy {
this.paginator.page.subscribe(()=>{
this.pageSize = this.paginator.pageSize
this.offset = this.paginator.pageSize * this.paginator.pageIndex;
this.getDeviceTypes()
this.getDeviceTypes().subscribe()
});
}

Expand Down Expand Up @@ -183,7 +183,6 @@ export class DeviceTypesOverviewComponent implements OnInit, OnDestroy {
}

private getDeviceTypes(): Observable<DeviceTypePermSearchModel[]> {
this.ready = false;
return this.deviceTypeService
.getDeviceTypes(this.searchText, this.pageSize, this.offset, this.sortBy, this.sortDirection)
.pipe(
Expand Down
3 changes: 1 addition & 2 deletions src/app/modules/metadata/functions/functions.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export class FunctionsComponent implements OnInit, OnDestroy {
this.paginator.page.subscribe(()=> {
this.pageSize = this.paginator.pageSize
this.offset = this.paginator.pageSize * this.paginator.pageIndex;
this.getFunctions()
this.getFunctions().subscribe()
});
}

Expand Down Expand Up @@ -183,7 +183,6 @@ export class FunctionsComponent implements OnInit, OnDestroy {
}

private getFunctions(): Observable<FunctionsPermSearchModel[]> {
this.ready = false;
return this.functionsService
.getFunctions(this.searchText, this.pageSize, this.offset, this.sortBy, this.sortDirection)
.pipe(
Expand Down

0 comments on commit e0ef45d

Please sign in to comment.