mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-22 06:13:22 -07:00
finished UI and migrations
This commit is contained in:
parent
43a4903875
commit
e7735322eb
13 changed files with 2763 additions and 18 deletions
1302
src/Ombi.Store/Migrations/OmbiMySql/20220823190345_PlexWatchlistUserError.Designer.cs
generated
Normal file
1302
src/Ombi.Store/Migrations/OmbiMySql/20220823190345_PlexWatchlistUserError.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,36 @@
|
|||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Ombi.Store.Migrations.OmbiMySql
|
||||
{
|
||||
public partial class PlexWatchlistUserError : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PlexWatchlistUserError",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
||||
UserId = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4"),
|
||||
MediaServerToken = table.Column<string>(type: "longtext", nullable: true)
|
||||
.Annotation("MySql:CharSet", "utf8mb4")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PlexWatchlistUserError", x => x.Id);
|
||||
})
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "PlexWatchlistUserError");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -350,6 +350,23 @@ namespace Ombi.Store.Migrations.OmbiMySql
|
|||
b.ToTable("AspNetUsers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexWatchlistUserError", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("MediaServerToken")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("PlexWatchlistUserError");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.RecentlyAddedLog", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
|
|
1300
src/Ombi.Store/Migrations/OmbiSqlite/20220823192128_PlexWatchlistUserError.Designer.cs
generated
Normal file
1300
src/Ombi.Store/Migrations/OmbiSqlite/20220823192128_PlexWatchlistUserError.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,32 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Ombi.Store.Migrations.OmbiSqlite
|
||||
{
|
||||
public partial class PlexWatchlistUserError : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "PlexWatchlistUserError",
|
||||
columns: table => new
|
||||
{
|
||||
Id = table.Column<int>(type: "INTEGER", nullable: false)
|
||||
.Annotation("Sqlite:Autoincrement", true),
|
||||
UserId = table.Column<string>(type: "TEXT", nullable: true),
|
||||
MediaServerToken = table.Column<string>(type: "TEXT", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_PlexWatchlistUserError", x => x.Id);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "PlexWatchlistUserError");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -348,6 +348,23 @@ namespace Ombi.Store.Migrations.OmbiSqlite
|
|||
b.ToTable("AspNetUsers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.PlexWatchlistUserError", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("MediaServerToken")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("PlexWatchlistUserError");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("Ombi.Store.Entities.RecentlyAddedLog", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
|
|
|
@ -1,24 +1,26 @@
|
|||
<div class="small-middle-container">
|
||||
<fieldset style="fieldset">
|
||||
<legend>Watchlist Errors</legend>
|
||||
|
||||
<p>If the Sync fails, this is because of an authentication issue with Plex (Token has expired). If this happens the user needs to re-login to Ombi.</p>
|
||||
<p>Key:
|
||||
<legend mat-dialog-title>Watchlist User Errors</legend>
|
||||
<div mat-dialog-content>
|
||||
<p>
|
||||
If there is an authentication error, this is because of an authentication issue with Plex (Token has expired).
|
||||
If this happens the user needs to re-login to Ombi.
|
||||
</p>
|
||||
<p>
|
||||
<em class="fa-solid fa-check key"></em> Successfully syncing the watchlist
|
||||
<br>
|
||||
<em class="fa-solid fa-check"></em>
|
||||
<em class="fa-solid fa-times key"></em> Authentication error syncing the watchlist
|
||||
<br>
|
||||
<em class="fa-solid fa-times"></em>
|
||||
<br>
|
||||
<em class="fas fa-user-alt-slash"></em>
|
||||
<em class="fas fa-user-alt-slash key"></em> Not enabled for user (They need to log into Ombi via Plex)
|
||||
</p>
|
||||
<table mat-table *ngIf="dataSource" [dataSource]="dataSource" matSort class="mat-elevation-z8">
|
||||
<ng-container matColumnDef="userName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Username </th>
|
||||
<th mat-header-cell *matHeaderCellDef> Username </th>
|
||||
<td mat-cell *matCellDef="let element"> {{element.userName}} </td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="syncStatus">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Watchlist Sync Result </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<th mat-header-cell *matHeaderCellDef> Watchlist Sync Result </th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<em *ngIf="element.syncStatus === WatchlistSyncStatus.Successful" class="fa-solid fa-check"></em>
|
||||
<em *ngIf="element.syncStatus === WatchlistSyncStatus.Failed" class="fa-solid fa-times"></em>
|
||||
<em *ngIf="element.syncStatus === WatchlistSyncStatus.NotEnabled" class="fas fa-user-alt-slash"></em>
|
||||
|
@ -28,5 +30,9 @@
|
|||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
||||
</table>
|
||||
</div>
|
||||
<mat-dialog-actions align="end">
|
||||
<button mat-button mat-dialog-close>Close</button>
|
||||
</mat-dialog-actions>
|
||||
</fieldset>
|
||||
</div>
|
|
@ -6,4 +6,8 @@
|
|||
}
|
||||
.fieldset {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.key {
|
||||
width: 40px;
|
||||
}
|
|
@ -3,8 +3,7 @@
|
|||
<fieldset style="width:100%;">
|
||||
<legend>Plex Configuration</legend>
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-6 col-sm-6">
|
||||
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="md-form-field">
|
||||
<mat-slide-toggle [(ngModel)]="settings.enable" [checked]="settings.enable">Enable
|
||||
</mat-slide-toggle>
|
||||
|
@ -20,12 +19,18 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-6 col-12">
|
||||
<div class="md-form-field align-right">
|
||||
<button (click)="openWatchlistUserLog()" type="button" class="mat-focus-indicator mat-flat-button mat-button-base mat-accent">Watchlist User Errors</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<mat-tab-group #tabGroup [selectedIndex]="selected.value" (selectedTabChange)="addTab($event)"
|
||||
(selectedIndexChange)="selected.setValue($event)" animationDuration="0ms" style="width:100%;">
|
||||
<mat-tab *ngFor="let server of settings.servers" [label]="server.name">
|
||||
<div class="col-md-6 col-6 col-sm-6" style="float: right; width:100%; text-align:right;">
|
||||
<div class="col-md-6 col-6 col-sm-6 align-right">
|
||||
<button type="button" (click)="removeServer(server)"
|
||||
class="mat-focus-indicator mat-flat-button mat-button-base mat-warn">Remove Server</button>
|
||||
</div>
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
display: inline-table;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
float: right;
|
||||
width:100%;
|
||||
text-align:right;
|
||||
}
|
|
@ -6,6 +6,8 @@ import { IPlexLibrariesSettings, IPlexServer, IPlexServerResponse, IPlexServerVi
|
|||
import { JobService, NotificationService, PlexService, SettingsService, TesterService } from "../../services";
|
||||
import { MatTabChangeEvent, MatTabGroup } from "@angular/material/tabs";
|
||||
import {UntypedFormControl} from '@angular/forms';
|
||||
import { MatDialog } from "@angular/material/dialog";
|
||||
import { PlexWatchlistComponent } from "./components/watchlist/plex-watchlist.component";
|
||||
|
||||
@Component({
|
||||
templateUrl: "./plex.component.html",
|
||||
|
@ -29,7 +31,8 @@ export class PlexComponent implements OnInit, OnDestroy {
|
|||
private notificationService: NotificationService,
|
||||
private plexService: PlexService,
|
||||
private testerService: TesterService,
|
||||
private jobService: JobService) { }
|
||||
private jobService: JobService,
|
||||
private dialog: MatDialog) { }
|
||||
|
||||
public ngOnInit() {
|
||||
this.settingsService.getPlex().subscribe(x => {
|
||||
|
@ -180,6 +183,10 @@ export class PlexComponent implements OnInit, OnDestroy {
|
|||
});
|
||||
}
|
||||
|
||||
public openWatchlistUserLog(): void {
|
||||
this.dialog.open(PlexWatchlistComponent, { width: "700px", panelClass: 'modal-panel' });
|
||||
}
|
||||
|
||||
public ngOnDestroy() {
|
||||
this.subscriptions.next();
|
||||
this.subscriptions.complete();
|
||||
|
|
|
@ -83,6 +83,7 @@ import { VoteComponent } from "./vote/vote.component";
|
|||
import { WebhookComponent } from "./notifications/webhook.component";
|
||||
import { WhatsAppComponent } from "./notifications/twilio/whatsapp.component";
|
||||
import { WikiComponent } from "./wiki.component";
|
||||
import { PlexWatchlistComponent } from "./plex/components/watchlist/plex-watchlist.component";
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: "Ombi", component: OmbiComponent, canActivate: [AuthGuard] },
|
||||
|
@ -189,6 +190,7 @@ const routes: Routes = [
|
|||
FeaturesComponent,
|
||||
CloudMobileComponent,
|
||||
UpdateDialogComponent,
|
||||
PlexWatchlistComponent,
|
||||
],
|
||||
exports: [
|
||||
RouterModule,
|
||||
|
|
14
src/Ombi/databasea.json
Normal file
14
src/Ombi/databasea.json
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"OmbiDatabase": {
|
||||
"Type": "MySQL",
|
||||
"ConnectionString": "Server=192.168.68.118;Port=3306;Database=Ombi;User=ombi;"
|
||||
},
|
||||
"SettingsDatabase": {
|
||||
"Type": "MySQL",
|
||||
"ConnectionString": "Server=192.168.68.118;Port=3306;Database=Ombi;User=ombi;"
|
||||
},
|
||||
"ExternalDatabase": {
|
||||
"Type": "MySQL",
|
||||
"ConnectionString": "Server=192.168.68.118;Port=3306;Database=Ombi;User=ombi;"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue