123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
  2. import { RouterModule } from '@angular/router';
  3. import { JhiLanguageService } from 'ng-jhipster';
  4. import { JhiLanguageHelper } from 'app/core';
  5. import { ZipConnectSharedModule } from 'app/shared';
  6. /* jhipster-needle-add-admin-module-import - JHipster will add admin modules imports here */
  7. import {
  8. adminState,
  9. AuditsComponent,
  10. UserMgmtComponent,
  11. UserMgmtDetailComponent,
  12. UserMgmtUpdateComponent,
  13. UserMgmtDeleteDialogComponent,
  14. LogsComponent,
  15. JhiMetricsMonitoringModalComponent,
  16. JhiMetricsMonitoringComponent,
  17. JhiHealthModalComponent,
  18. JhiHealthCheckComponent,
  19. JhiConfigurationComponent,
  20. JhiDocsComponent
  21. } from './';
  22. @NgModule({
  23. imports: [
  24. ZipConnectSharedModule,
  25. RouterModule.forChild(adminState)
  26. /* jhipster-needle-add-admin-module - JHipster will add admin modules here */
  27. ],
  28. declarations: [
  29. AuditsComponent,
  30. UserMgmtComponent,
  31. UserMgmtDetailComponent,
  32. UserMgmtUpdateComponent,
  33. UserMgmtDeleteDialogComponent,
  34. LogsComponent,
  35. JhiConfigurationComponent,
  36. JhiHealthCheckComponent,
  37. JhiHealthModalComponent,
  38. JhiDocsComponent,
  39. JhiMetricsMonitoringComponent,
  40. JhiMetricsMonitoringModalComponent
  41. ],
  42. providers: [{ provide: JhiLanguageService, useClass: JhiLanguageService }],
  43. entryComponents: [UserMgmtDeleteDialogComponent, JhiHealthModalComponent, JhiMetricsMonitoringModalComponent],
  44. schemas: [CUSTOM_ELEMENTS_SCHEMA]
  45. })
  46. export class ZipConnectAdminModule {
  47. constructor(private languageService: JhiLanguageService, private languageHelper: JhiLanguageHelper) {
  48. this.languageHelper.language.subscribe((languageKey: string) => {
  49. if (languageKey !== undefined) {
  50. this.languageService.changeLanguage(languageKey);
  51. }
  52. });
  53. }
  54. }