Skip to content

Commit

Permalink
Refactoring. Making the client OS4 ready:
Browse files Browse the repository at this point in the history
- new operator
- no caching
- stripped startup
- Auth currently not working (WIP)
- ServiceCollectors for components and repositories
- removed WebsocketService
- added StreamingCommunicatorService
  • Loading branch information
FinnStutzenstein committed Mar 17, 2020
1 parent 2e5a1da commit cddc802
Show file tree
Hide file tree
Showing 224 changed files with 1,952 additions and 3,616 deletions.
10 changes: 3 additions & 7 deletions client/src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ import { Router } from '@angular/router';
import { TranslateService } from '@ngx-translate/core';
import { filter, take } from 'rxjs/operators';

import { ConfigService } from './core/ui-services/config.service';
import { ConstantsService } from './core/core-services/constants.service';
import { CountUsersService } from './core/ui-services/count-users.service';
import { DataStoreUpgradeService } from './core/core-services/data-store-upgrade.service';
import { LoadFontService } from './core/ui-services/load-font.service';
import { LoginDataService } from './core/ui-services/login-data.service';
import { OperatorService } from './core/core-services/operator.service';
import { OrganisationSettingsService } from './core/ui-services/organisation-settings.service';
import { OverlayService } from './core/ui-services/overlay.service';
import { PingService } from './core/core-services/ping.service';
import { PrioritizeService } from './core/core-services/prioritize.service';
import { RoutingStateService } from './core/ui-services/routing-state.service';
import { ServertimeService } from './core/core-services/servertime.service';
import { ThemeService } from './core/ui-services/theme.service';
Expand Down Expand Up @@ -66,7 +64,7 @@ export class AppComponent {
* @param servertimeService executes the scheduler early on
* @param themeService used to listen to theme-changes
* @param countUsersService to call the constructor of the CountUserService
* @param configService to call the constructor of the ConfigService
* @param organisationSettingsService to call the constructor of the ConfigService
* @param loadFontService to call the constructor of the LoadFontService
* @param dataStoreUpgradeService
*/
Expand All @@ -77,14 +75,12 @@ export class AppComponent {
router: Router,
operator: OperatorService,
loginDataService: LoginDataService,
constantsService: ConstantsService, // Needs to be started, so it can register itself to the WebsocketService
themeService: ThemeService,
overlayService: OverlayService,
countUsersService: CountUsersService, // Needed to register itself.
configService: ConfigService,
organisationSettingsService: OrganisationSettingsService,
loadFontService: LoadFontService,
dataStoreUpgradeService: DataStoreUpgradeService, // to start it.
prioritizeService: PrioritizeService,
pingService: PingService,
routingState: RoutingStateService,
votingBannerService: VotingBannerService // needed for initialisation
Expand Down
108 changes: 0 additions & 108 deletions client/src/app/base.component.ts

This file was deleted.

4 changes: 2 additions & 2 deletions client/src/app/core/core-services/app-load.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { AppConfig, ModelEntry, SearchableModelEntry } from '../definitions/app-
import { BaseRepository } from 'app/core/repositories/base-repository';
import { HistoryAppConfig } from 'app/site/history/history.config';
import { ProjectorAppConfig } from 'app/site/projector/projector.config';
import { SettingsAppConfig } from 'app/site/settings/settings.config';
import { TopicsAppConfig } from 'app/site/topics/topics.config';
import { AssignmentsAppConfig } from '../../site/assignments/assignments.config';
import { CollectionStringMapperService } from './collection-string-mapper.service';
import { CommonAppConfig } from '../../site/common/common.config';
import { ConfigAppConfig } from '../../site/config/config.config';
import { ServicesToLoadOnAppsLoaded } from '../core.module';
import { FallbackRoutesService } from './fallback-routes.service';
import { MainMenuService } from './main-menu.service';
Expand All @@ -26,7 +26,7 @@ import { UsersAppConfig } from '../../site/users/users.config';
*/
const appConfigs: AppConfig[] = [
CommonAppConfig,
ConfigAppConfig,
SettingsAppConfig,
AgendaAppConfig,
AssignmentsAppConfig,
MotionsAppConfig,
Expand Down
10 changes: 5 additions & 5 deletions client/src/app/core/core-services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export class AuthService {
earlySuccessCallback();
await this.OpenSlides.shutdown();
await this.operator.setWhoAmI(response);
await this.OpenSlides.afterLoginBootup(response.user_id);
await this.redirectUser(response.user_id);
await this.OpenSlides.afterLoginBootup();
await this.redirectUser();
} else if (authType === 'saml') {
window.location.href = environment.urlPrefix + '/saml/?sso'; // Bye
} else {
Expand All @@ -66,9 +66,9 @@ export class AuthService {
* Redirects the user to the page where he came from. Boots OpenSlides,
* if it wasn't done before.
*/
public async redirectUser(userId: number): Promise<void> {
public async redirectUser(): Promise<void> {
if (!this.OpenSlides.booted) {
await this.OpenSlides.afterLoginBootup(userId);
await this.OpenSlides.afterLoginBootup();
}

let redirect = this.OpenSlides.redirectUrl ? this.OpenSlides.redirectUrl : '/';
Expand All @@ -84,7 +84,7 @@ export class AuthService {
* Login for guests.
*/
public async guestLogin(): Promise<void> {
this.redirectUser(null);
this.redirectUser();
}

/**
Expand Down
Loading

0 comments on commit cddc802

Please sign in to comment.