From 6588fa8ca3dca87a5c237175642acaa4d06f108a Mon Sep 17 00:00:00 2001 From: "Jamie.Rees" Date: Fri, 29 Sep 2017 14:26:49 +0100 Subject: [PATCH] Added some wiki pages and also made it so we cannot edit Plex Users email address (since they will get overwrote via the Importer) #865 --- .../ClientApp/app/services/job.service.ts | 4 +++ .../customization.component.html | 27 ++++++++++++------- .../landingpage/landingpage.component.html | 2 ++ .../app/settings/ombi/ombi.component.html | 1 + .../ClientApp/app/settings/settings.module.ts | 2 ++ .../usermanagement.component.html | 2 ++ .../usermanagement.component.ts | 1 + .../app/settings/wiki.component.html | 5 ++++ .../ClientApp/app/settings/wiki.component.ts | 9 +++++++ .../usermanagement-edit.component.html | 2 +- src/Ombi/Controllers/JobController.cs | 12 ++++++++- 11 files changed, 55 insertions(+), 12 deletions(-) create mode 100644 src/Ombi/ClientApp/app/settings/wiki.component.html create mode 100644 src/Ombi/ClientApp/app/settings/wiki.component.ts diff --git a/src/Ombi/ClientApp/app/services/job.service.ts b/src/Ombi/ClientApp/app/services/job.service.ts index fbadb8281..acadb2e8d 100644 --- a/src/Ombi/ClientApp/app/services/job.service.ts +++ b/src/Ombi/ClientApp/app/services/job.service.ts @@ -24,4 +24,8 @@ export class JobService extends ServiceAuthHelpers { public runPlexImporter(): Observable { return this.http.post(`${this.url}plexUserImporter/`, { headers: this.headers }).map(this.extractData); } + + public runEmbyImporter(): Observable { + return this.http.post(`${this.url}embyUserImporter/`, { headers: this.headers }).map(this.extractData); + } } diff --git a/src/Ombi/ClientApp/app/settings/customization/customization.component.html b/src/Ombi/ClientApp/app/settings/customization/customization.component.html index e3716a975..a2984c6a6 100644 --- a/src/Ombi/ClientApp/app/settings/customization/customization.component.html +++ b/src/Ombi/ClientApp/app/settings/customization/customization.component.html @@ -1,40 +1,47 @@  -
- Customization + +
+ Customization +
- +
- +
- + +
-
- +
+
+
-
+
+
- +
-
\ No newline at end of file + + +
\ No newline at end of file diff --git a/src/Ombi/ClientApp/app/settings/landingpage/landingpage.component.html b/src/Ombi/ClientApp/app/settings/landingpage/landingpage.component.html index efdf19ee9..4f00c7845 100644 --- a/src/Ombi/ClientApp/app/settings/landingpage/landingpage.component.html +++ b/src/Ombi/ClientApp/app/settings/landingpage/landingpage.component.html @@ -1,5 +1,7 @@  + +
Landing Page Configuration diff --git a/src/Ombi/ClientApp/app/settings/ombi/ombi.component.html b/src/Ombi/ClientApp/app/settings/ombi/ombi.component.html index da394d892..ca6be181b 100644 --- a/src/Ombi/ClientApp/app/settings/ombi/ombi.component.html +++ b/src/Ombi/ClientApp/app/settings/ombi/ombi.component.html @@ -1,5 +1,6 @@  +
Ombi Configuration
diff --git a/src/Ombi/ClientApp/app/settings/settings.module.ts b/src/Ombi/ClientApp/app/settings/settings.module.ts index bead681a2..b3ef0a31a 100644 --- a/src/Ombi/ClientApp/app/settings/settings.module.ts +++ b/src/Ombi/ClientApp/app/settings/settings.module.ts @@ -28,6 +28,7 @@ import { RadarrComponent } from "./radarr/radarr.component"; import { SonarrComponent } from "./sonarr/sonarr.component"; import { UpdateComponent } from "./update/update.component"; import { UserManagementComponent } from "./usermanagement/usermanagement.component"; +import { WikiComponent } from "./wiki.component"; import { SettingsMenuComponent } from "./settingsmenu.component"; @@ -89,6 +90,7 @@ const routes: Routes = [ UserManagementComponent, UpdateComponent, AboutComponent, + WikiComponent, ], exports: [ RouterModule, diff --git a/src/Ombi/ClientApp/app/settings/usermanagement/usermanagement.component.html b/src/Ombi/ClientApp/app/settings/usermanagement/usermanagement.component.html index 4e99c0b4b..2d992d171 100644 --- a/src/Ombi/ClientApp/app/settings/usermanagement/usermanagement.component.html +++ b/src/Ombi/ClientApp/app/settings/usermanagement/usermanagement.component.html @@ -1,4 +1,6 @@  + +
User Management Settings diff --git a/src/Ombi/ClientApp/app/settings/usermanagement/usermanagement.component.ts b/src/Ombi/ClientApp/app/settings/usermanagement/usermanagement.component.ts index fda3fb4f9..8fc1d24ca 100644 --- a/src/Ombi/ClientApp/app/settings/usermanagement/usermanagement.component.ts +++ b/src/Ombi/ClientApp/app/settings/usermanagement/usermanagement.component.ts @@ -102,6 +102,7 @@ export class UserManagementComponent implements OnInit { public runImporter(): void { this.jobService.runPlexImporter().subscribe(); + this.jobService.runPlexImporter().subscribe(); } private filter(query: string, users: IUsersModel[]): IUsersModel[] { diff --git a/src/Ombi/ClientApp/app/settings/wiki.component.html b/src/Ombi/ClientApp/app/settings/wiki.component.html new file mode 100644 index 000000000..bcc476394 --- /dev/null +++ b/src/Ombi/ClientApp/app/settings/wiki.component.html @@ -0,0 +1,5 @@ +
+
+ Wiki +
+
\ No newline at end of file diff --git a/src/Ombi/ClientApp/app/settings/wiki.component.ts b/src/Ombi/ClientApp/app/settings/wiki.component.ts new file mode 100644 index 000000000..a5ca4c5c6 --- /dev/null +++ b/src/Ombi/ClientApp/app/settings/wiki.component.ts @@ -0,0 +1,9 @@ +import { Component, Input } from "@angular/core"; + +@Component({ + selector:"wiki", + templateUrl: "./wiki.component.html", +}) +export class WikiComponent { + @Input() public url: string; +} diff --git a/src/Ombi/ClientApp/app/usermanagement/usermanagement-edit.component.html b/src/Ombi/ClientApp/app/usermanagement/usermanagement-edit.component.html index a4fec0fd0..b27e82cf4 100644 --- a/src/Ombi/ClientApp/app/usermanagement/usermanagement-edit.component.html +++ b/src/Ombi/ClientApp/app/usermanagement/usermanagement-edit.component.html @@ -27,7 +27,7 @@
- +
diff --git a/src/Ombi/Controllers/JobController.cs b/src/Ombi/Controllers/JobController.cs index 6de23adc1..76ef4fdd4 100644 --- a/src/Ombi/Controllers/JobController.cs +++ b/src/Ombi/Controllers/JobController.cs @@ -6,6 +6,7 @@ using Microsoft.Extensions.Caching.Memory; using Ombi.Api.Service; using Ombi.Attributes; using Ombi.Helpers; +using Ombi.Schedule.Jobs.Emby; using Ombi.Schedule.Jobs.Plex; using Ombi.Schedule.Ombi; @@ -17,15 +18,17 @@ namespace Ombi.Controllers public class JobController : Controller { public JobController(IOmbiAutomaticUpdater updater, IPlexUserImporter userImporter, - IMemoryCache mem) + IMemoryCache mem, IEmbyUserImporter embyImporter) { _updater = updater; _plexUserImporter = userImporter; + _embyUserImporter = embyImporter; _memCache = mem; } private readonly IOmbiAutomaticUpdater _updater; private readonly IPlexUserImporter _plexUserImporter; + private readonly IEmbyUserImporter _embyUserImporter; private readonly IMemoryCache _memCache; [HttpPost("update")] @@ -68,5 +71,12 @@ namespace Ombi.Controllers BackgroundJob.Enqueue(() => _plexUserImporter.Start()); return true; } + + [HttpPost("embyuserimporter")] + public bool EmbyUserImporter() + { + BackgroundJob.Enqueue(() => _embyUserImporter.Start()); + return true; + } } } \ No newline at end of file