();
+
+ var provider = services.AddAndBuildOrleans(configuration);
+
+ return provider;
}
public void Configure(IApplicationBuilder app)
diff --git a/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.html b/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.html
index ce58ed3e2..59a73c5e1 100644
--- a/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.html
+++ b/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.html
@@ -6,7 +6,7 @@
-
+
Refresh
@@ -42,13 +42,13 @@
{{eventConsumer.position}}
-
+
-
+
-
+
diff --git a/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts b/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts
index d7c4b44ce..c73493770 100644
--- a/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts
+++ b/src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts
@@ -5,11 +5,11 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
-import { Component, OnDestroy, OnInit } from '@angular/core';
-import { Subscription, timer } from 'rxjs';
+import { Component, OnInit } from '@angular/core';
+import { timer } from 'rxjs';
import { onErrorResumeNext, switchMap } from 'rxjs/operators';
-import { DialogModel } from '@app/shared';
+import { DialogModel, ResourceOwner } from '@app/shared';
import { EventConsumerDto } from './../../services/event-consumers.service';
import { EventConsumersState } from './../../state/event-consumers.state';
@@ -19,27 +19,20 @@ import { EventConsumersState } from './../../state/event-consumers.state';
styleUrls: ['./event-consumers-page.component.scss'],
templateUrl: './event-consumers-page.component.html'
})
-export class EventConsumersPageComponent implements OnDestroy, OnInit {
- private timerSubscription: Subscription;
-
+export class EventConsumersPageComponent extends ResourceOwner implements OnInit {
public eventConsumerErrorDialog = new DialogModel();
public eventConsumerError = '';
constructor(
public readonly eventConsumersState: EventConsumersState
) {
- }
-
- public ngOnDestroy() {
- this.timerSubscription.unsubscribe();
+ super();
}
public ngOnInit() {
this.eventConsumersState.load().pipe(onErrorResumeNext()).subscribe();
- this.timerSubscription =
- timer(2000, 2000).pipe(switchMap(x => this.eventConsumersState.load(true, true).pipe(onErrorResumeNext())))
- .subscribe();
+ this.own(timer(2000, 2000).pipe(switchMap(() => this.eventConsumersState.load(true, true))));
}
public reload() {
diff --git a/src/Squidex/app/features/administration/pages/restore/restore-page.component.ts b/src/Squidex/app/features/administration/pages/restore/restore-page.component.ts
index 026f0becb..c0f6304ab 100644
--- a/src/Squidex/app/features/administration/pages/restore/restore-page.component.ts
+++ b/src/Squidex/app/features/administration/pages/restore/restore-page.component.ts
@@ -5,15 +5,16 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
-import { Component, OnDestroy, OnInit } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
import { FormBuilder } from '@angular/forms';
-import { Subscription, timer } from 'rxjs';
-import { filter, onErrorResumeNext, switchMap } from 'rxjs/operators';
+import { timer } from 'rxjs';
+import { onErrorResumeNext, switchMap } from 'rxjs/operators';
import {
AuthService,
BackupsService,
DialogService,
+ ResourceOwner,
RestoreDto,
RestoreForm
} from '@app/shared';
@@ -23,9 +24,7 @@ import {
styleUrls: ['./restore-page.component.scss'],
templateUrl: './restore-page.component.html'
})
-export class RestorePageComponent implements OnDestroy, OnInit {
- private timerSubscription: Subscription;
-
+export class RestorePageComponent extends ResourceOwner implements OnInit {
public restoreJob: RestoreDto | null;
public restoreForm = new RestoreForm(this.formBuilder);
@@ -35,18 +34,17 @@ export class RestorePageComponent implements OnDestroy, OnInit {
private readonly dialogs: DialogService,
private readonly formBuilder: FormBuilder
) {
- }
-
- public ngOnDestroy() {
- this.timerSubscription.unsubscribe();
+ super();
}
public ngOnInit() {
- this.timerSubscription =
- timer(0, 2000).pipe(switchMap(() => this.backupsService.getRestore().pipe(onErrorResumeNext())), filter(x => !!x))
- .subscribe(dto => {
- this.restoreJob = dto!;
- });
+ this.own(
+ timer(0, 2000).pipe(switchMap(() => this.backupsService.getRestore().pipe(onErrorResumeNext())))
+ .subscribe(job => {
+ if (job) {
+ this.restoreJob = job;
+ }
+ }));
}
public restore() {
diff --git a/src/Squidex/app/features/administration/pages/users/user-page.component.ts b/src/Squidex/app/features/administration/pages/users/user-page.component.ts
index 3be7e69a6..e009b6115 100644
--- a/src/Squidex/app/features/administration/pages/users/user-page.component.ts
+++ b/src/Squidex/app/features/administration/pages/users/user-page.component.ts
@@ -5,10 +5,11 @@
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
-import { Component, OnDestroy, OnInit } from '@angular/core';
+import { Component, OnInit } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
-import { Subscription } from 'rxjs';
+
+import { ResourceOwner } from '@app/shared';
import { UserDto } from './../../services/users.service';
import { UserForm, UsersState } from './../../state/users.state';
@@ -18,9 +19,7 @@ import { UserForm, UsersState } from './../../state/users.state';
styleUrls: ['./user-page.component.scss'],
templateUrl: './user-page.component.html'
})
-export class UserPageComponent implements OnDestroy, OnInit {
- private selectedUserSubscription: Subscription;
-
+export class UserPageComponent extends ResourceOwner implements OnInit {
public canUpdate = false;
public user?: { user: UserDto, isCurrentUser: boolean };
@@ -32,22 +31,19 @@ export class UserPageComponent implements OnDestroy, OnInit {
private readonly route: ActivatedRoute,
private readonly router: Router
) {
- }
-
- public ngOnDestroy() {
- this.selectedUserSubscription.unsubscribe();
+ super();
}
public ngOnInit() {
- this.selectedUserSubscription =
+ this.own(
this.usersState.selectedUser
.subscribe(selectedUser => {
- this.user = selectedUser;
+ this.user = selectedUser!;
if (selectedUser) {
this.userForm.load(selectedUser.user);
}
- });
+ }));
}
public save() {
diff --git a/src/Squidex/app/features/administration/pages/users/users-page.component.html b/src/Squidex/app/features/administration/pages/users/users-page.component.html
index 4a8963e8f..0c51c3304 100644
--- a/src/Squidex/app/features/administration/pages/users/users-page.component.html
+++ b/src/Squidex/app/features/administration/pages/users/users-page.component.html
@@ -6,7 +6,7 @@
-
+
Refresh
@@ -18,7 +18,7 @@
-
+
New
@@ -61,10 +61,10 @@
-
+
-
+
@@ -81,7 +81,7 @@
diff --git a/src/Squidex/app/features/administration/state/event-consumers.state.ts b/src/Squidex/app/features/administration/state/event-consumers.state.ts
index e98fd0cf8..ae16e1f21 100644
--- a/src/Squidex/app/features/administration/state/event-consumers.state.ts
+++ b/src/Squidex/app/features/administration/state/event-consumers.state.ts
@@ -21,7 +21,7 @@ import { EventConsumerDto, EventConsumersService } from './../services/event-con
interface Snapshot {
eventConsumers: ImmutableArray;
- isLoaded?: false;
+ isLoaded?: boolean;
}
@Injectable()
diff --git a/src/Squidex/app/features/administration/state/users.state.ts b/src/Squidex/app/features/administration/state/users.state.ts
index 85266dcb9..05482ff9a 100644
--- a/src/Squidex/app/features/administration/state/users.state.ts
+++ b/src/Squidex/app/features/administration/state/users.state.ts
@@ -98,7 +98,7 @@ interface Snapshot {
isLoaded?: boolean;
- selectedUser?: SnapshotUser;
+ selectedUser?: SnapshotUser | null;
}
@Injectable()
diff --git a/src/Squidex/app/features/api/pages/graphql/graphql-page.component.html b/src/Squidex/app/features/api/pages/graphql/graphql-page.component.html
index 74f0d3054..d762911d5 100644
--- a/src/Squidex/app/features/api/pages/graphql/graphql-page.component.html
+++ b/src/Squidex/app/features/api/pages/graphql/graphql-page.component.html
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/src/Squidex/app/features/assets/pages/assets-filters-page.component.html b/src/Squidex/app/features/assets/pages/assets-filters-page.component.html
index 9453bc868..0a32d5244 100644
--- a/src/Squidex/app/features/assets/pages/assets-filters-page.component.html
+++ b/src/Squidex/app/features/assets/pages/assets-filters-page.component.html
@@ -14,7 +14,8 @@
-