mirror of https://github.com/ErsatzTV/ErsatzTV.git
Browse Source
* add scheduling context to playout details table * fix missing context copiespull/2820/head
33 changed files with 14140 additions and 7 deletions
@ -0,0 +1,9 @@
@@ -0,0 +1,9 @@
|
||||
namespace ErsatzTV.Core.Scheduling; |
||||
|
||||
public record SchedulingContext( |
||||
string Scheduler, |
||||
int ScheduleId, |
||||
int ItemId, |
||||
string Enumerator, |
||||
int Seed, |
||||
int Index); |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.MySql.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Add_PlayoutItemSchedulingContext : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<string>( |
||||
name: "SchedulingContext", |
||||
table: "PlayoutItem", |
||||
type: "longtext", |
||||
nullable: true) |
||||
.Annotation("MySql:CharSet", "utf8mb4"); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropColumn( |
||||
name: "SchedulingContext", |
||||
table: "PlayoutItem"); |
||||
} |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations; |
||||
|
||||
#nullable disable |
||||
|
||||
namespace ErsatzTV.Infrastructure.Sqlite.Migrations |
||||
{ |
||||
/// <inheritdoc />
|
||||
public partial class Add_PlayoutItemSchedulingContext : Migration |
||||
{ |
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.AddColumn<string>( |
||||
name: "SchedulingContext", |
||||
table: "PlayoutItem", |
||||
type: "TEXT", |
||||
nullable: true); |
||||
} |
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder) |
||||
{ |
||||
migrationBuilder.DropColumn( |
||||
name: "SchedulingContext", |
||||
table: "PlayoutItem"); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,50 @@
@@ -0,0 +1,50 @@
|
||||
@using ErsatzTV.Application.Playouts |
||||
@inject IJSRuntime JsRuntime |
||||
|
||||
<div> |
||||
<MudDialog> |
||||
<DialogContent> |
||||
<div class="overflow-y-scroll" style="max-height: 500px"> |
||||
<pre> |
||||
<code @ref="_infoView">@_info</code> |
||||
</pre> |
||||
</div> |
||||
</DialogContent> |
||||
<DialogActions> |
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="@(() => CopyToClipboard(_infoView))"> |
||||
Copy |
||||
</MudButton> |
||||
<MudButton Color="Color.Primary" OnClick="@Close">Close</MudButton> |
||||
</DialogActions> |
||||
</MudDialog> |
||||
</div> |
||||
|
||||
@code { |
||||
|
||||
[CascadingParameter] |
||||
IMudDialogInstance MudDialog { get; set; } |
||||
|
||||
[Parameter] |
||||
public PlayoutItemViewModel PlayoutItem { get; set; } |
||||
|
||||
private string _info; |
||||
private ElementReference _infoView; |
||||
|
||||
protected override Task OnParametersSetAsync() |
||||
{ |
||||
try |
||||
{ |
||||
_info = PlayoutItem.SchedulingContext; |
||||
} |
||||
catch (Exception ex) |
||||
{ |
||||
_info = ex.ToString(); |
||||
} |
||||
|
||||
return Task.CompletedTask; |
||||
} |
||||
|
||||
private async Task CopyToClipboard(ElementReference view) => await JsRuntime.InvokeVoidAsync("clipboardCopy.copyText", view); |
||||
|
||||
private void Close() => MudDialog.Close(DialogResult.Ok(true)); |
||||
} |
||||
Loading…
Reference in new issue