Browse Source

Notifications fixed.

pull/294/head
Sebastian 8 years ago
parent
commit
78de4d5b18
  1. 4
      src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts
  2. 2
      src/Squidex/app/features/administration/state/event-consumers.state.spec.ts
  3. 2
      src/Squidex/app/features/administration/state/event-consumers.state.ts
  4. 4
      src/Squidex/app/features/settings/pages/backups/backups-page.component.ts
  5. 2
      src/Squidex/app/shared/state/backups.state.spec.ts
  6. 2
      src/Squidex/app/shared/state/backups.state.ts

4
src/Squidex/app/features/administration/pages/event-consumers/event-consumers-page.component.ts

@ -38,12 +38,12 @@ export class EventConsumersPageComponent implements OnDestroy, OnInit {
this.timerSubscription = this.timerSubscription =
Observable.timer(2000, 2000) Observable.timer(2000, 2000)
.switchMap(x => this.eventConsumersState.load().onErrorResumeNext()) .switchMap(x => this.eventConsumersState.load(true, true).onErrorResumeNext())
.subscribe(); .subscribe();
} }
public reload() { public reload() {
this.eventConsumersState.load(true, true).onErrorResumeNext().subscribe(); this.eventConsumersState.load(true, false).onErrorResumeNext().subscribe();
} }
public start(es: EventConsumerDto) { public start(es: EventConsumerDto) {

2
src/Squidex/app/features/administration/state/event-consumers.state.spec.ts

@ -43,7 +43,7 @@ describe('EventConsumersState', () => {
}); });
it('should show notification on load when reload is true', () => { it('should show notification on load when reload is true', () => {
eventConsumersState.load(true, true).subscribe(); eventConsumersState.load(true).subscribe();
dialogs.verify(x => x.notifyInfo(It.isAnyString()), Times.once()); dialogs.verify(x => x.notifyInfo(It.isAnyString()), Times.once());
}); });

2
src/Squidex/app/features/administration/state/event-consumers.state.ts

@ -48,7 +48,7 @@ export class EventConsumersState extends State<Snapshot> {
return this.eventConsumersService.getEventConsumers() return this.eventConsumersService.getEventConsumers()
.do(dtos => { .do(dtos => {
if (isReload) { if (isReload && !silent) {
this.dialogs.notifyInfo('Event Consumers reloaded.'); this.dialogs.notifyInfo('Event Consumers reloaded.');
} }

4
src/Squidex/app/features/settings/pages/backups/backups-page.component.ts

@ -37,12 +37,12 @@ export class BackupsPageComponent implements OnInit, OnDestroy {
this.timerSubscription = this.timerSubscription =
Observable.timer(3000, 3000) Observable.timer(3000, 3000)
.switchMap(t => this.backupsState.load().onErrorResumeNext()) .switchMap(t => this.backupsState.load(true, true).onErrorResumeNext())
.subscribe(); .subscribe();
} }
public reload() { public reload() {
this.backupsState.load(true, true).onErrorResumeNext().subscribe(); this.backupsState.load(true, false).onErrorResumeNext().subscribe();
} }
public start() { public start() {

2
src/Squidex/app/shared/state/backups.state.spec.ts

@ -55,7 +55,7 @@ describe('BackupsState', () => {
}); });
it('should show notification on load when reload is true', () => { it('should show notification on load when reload is true', () => {
backupsState.load(true, true).subscribe(); backupsState.load(true, false).subscribe();
dialogs.verify(x => x.notifyInfo(It.isAnyString()), Times.once()); dialogs.verify(x => x.notifyInfo(It.isAnyString()), Times.once());
}); });

2
src/Squidex/app/shared/state/backups.state.ts

@ -55,7 +55,7 @@ export class BackupsState extends State<Snapshot> {
return this.backupsService.getBackups(this.appName) return this.backupsService.getBackups(this.appName)
.do(dtos => { .do(dtos => {
if (isReload) { if (isReload && !silent) {
this.dialogs.notifyInfo('Backups reloaded.'); this.dialogs.notifyInfo('Backups reloaded.');
} }

Loading…
Cancel
Save