Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ auth/keycloak/config/*.log
/services/net/image/keys
/services/net/image/data

**/[Bb]in/
**/[Oo]bj/

# TLS certificates - managed separately, not in git
openshift/kustomize/.tls-certs/*.crt
openshift/kustomize/.tls-certs/*.key
Expand Down
19 changes: 17 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"version": "0.2.0",
"configurations": [


{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
Expand Down Expand Up @@ -105,6 +103,23 @@
"stopAtEntry": false,
"envFile": "${workspaceFolder}/services/net/transcription/.env"
},
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"name": "Run Auto Clipper Service",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build-auto-clipper",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/services/net/auto-clipper/bin/Debug/net9.0/TNO.Services.AutoClipper.dll",
"args": [],
"cwd": "${workspaceFolder}/services/net/auto-clipper",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "internalConsole",
"stopAtEntry": false,
"envFile": "${workspaceFolder}/services/net/auto-clipper/.env"
},
{
// Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"CHES",
"datalabels",
"formik",
"healthcheck",
"Idir",
"insertable",
"Keycloak",
Expand Down
68 changes: 49 additions & 19 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@
"label": "watch",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/api/net/TNO.API.csproj"
],
"args": ["watch", "run", "--project", "${workspaceFolder}/api/net/TNO.API.csproj"],
"problemMatcher": "$msCompile"
},
{
Expand Down Expand Up @@ -213,7 +208,43 @@
"watch",
"run",
"--project",
"${workspaceFolder}/services/net/transcription/TNO.Services.Transcription.csproj"
"${workspaceFolder}/services/net/atranscription/TNO.Services.Transcription.csproj"
],
"problemMatcher": "$msCompile"
},
{
"label": "build-auto-clipper",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/services/net/auto-clipper/TNO.Services.AutoClipper.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "publish-auto-clipper",
"command": "dotnet",
"type": "process",
"args": [
"publish",
"${workspaceFolder}/services/net/auto-clipper/TNO.Services.AutoClipper.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
},
{
"label": "watch-auto-clipper",
"command": "dotnet",
"type": "process",
"args": [
"watch",
"run",
"--project",
"${workspaceFolder}/services/net/auto-clipper/TNO.Services.TranAutoClipperscription.csproj"
],
"problemMatcher": "$msCompile"
},
Expand Down Expand Up @@ -357,7 +388,7 @@
"watch",
"run",
"--project",
"${workspaceFolder}/tools/elastic/migration/TNO.Elastic.Migration.csproj",
"${workspaceFolder}/tools/elastic/migration/TNO.Elastic.Migration.csproj"
],
"problemMatcher": "$msCompile"
},
Expand Down Expand Up @@ -393,7 +424,7 @@
"watch",
"run",
"--project",
"${workspaceFolder}/services/net/notification/TNO.Services.Notification.csproj",
"${workspaceFolder}/services/net/notification/TNO.Services.Notification.csproj"
],
"problemMatcher": "$msCompile"
},
Expand Down Expand Up @@ -429,7 +460,7 @@
"watch",
"run",
"--project",
"${workspaceFolder}/services/net/reporting/TNO.Services.Reporting.csproj",
"${workspaceFolder}/services/net/reporting/TNO.Services.Reporting.csproj"
],
"problemMatcher": "$msCompile"
},
Expand Down Expand Up @@ -465,7 +496,7 @@
"watch",
"run",
"--project",
"${workspaceFolder}/services/net/scheduler/TNO.Services.Scheduler.csproj",
"${workspaceFolder}/services/net/scheduler/TNO.Services.Scheduler.csproj"
],
"problemMatcher": "$msCompile"
},
Expand Down Expand Up @@ -501,7 +532,7 @@
"watch",
"run",
"--project",
"${workspaceFolder}/services/net/folder-collection/TNO.Services.FolderCollection.csproj",
"${workspaceFolder}/services/net/folder-collection/TNO.Services.FolderCollection.csproj"
],
"problemMatcher": "$msCompile"
},
Expand Down Expand Up @@ -537,7 +568,7 @@
"watch",
"run",
"--project",
"${workspaceFolder}/services/net/ffmpeg/TNO.Services.FFmpeg.csproj",
"${workspaceFolder}/services/net/ffmpeg/TNO.Services.FFmpeg.csproj"
],
"problemMatcher": "$msCompile"
},
Expand Down Expand Up @@ -573,7 +604,7 @@
"watch",
"run",
"--project",
"${workspaceFolder}/services/net/extract-quotes/TNO.Services.ExtractQuotes.csproj",
"${workspaceFolder}/services/net/extract-quotes/TNO.Services.ExtractQuotes.csproj"
],
"problemMatcher": "$msCompile"
},
Expand Down Expand Up @@ -609,7 +640,7 @@
"watch",
"run",
"--project",
"${workspaceFolder}/services/net/event-handler/TNO.Services.EventHandler.csproj",
"${workspaceFolder}/services/net/event-handler/TNO.Services.EventHandler.csproj"
],
"problemMatcher": "$msCompile"
},
Expand Down Expand Up @@ -645,11 +676,10 @@
"watch",
"run",
"--project",
"${workspaceFolder}/services/net/ches-retry/TNO.Services.ChesRetry.csproj",
"${workspaceFolder}/services/net/ches-retry/TNO.Services.ChesRetry.csproj"
],
"problemMatcher": "$msCompile"
}
,
},
{
"label": "build-elastic-indexer",
"command": "dotnet",
Expand Down Expand Up @@ -682,7 +712,7 @@
"watch",
"run",
"--project",
"${workspaceFolder}/tools/indexer/TNO.Tools.ElasticIndexer.csproj",
"${workspaceFolder}/tools/indexer/TNO.Tools.ElasticIndexer.csproj"
],
"problemMatcher": "$msCompile"
}
Expand Down
14 changes: 7 additions & 7 deletions TNO.sln
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TNO.TemplateEngine", "libs\
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TNO.Services.Scheduler", "services\net\scheduler\TNO.Services.Scheduler.csproj", "{A2DD9547-A4AA-4E07-9239-77D689F49C47}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TNO.Services.ContentMigration", "services\net\contentmigration\TNO.Services.ContentMigration.csproj", "{7D0917C1-DFE3-420E-9980-D81947AC405F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TNO.Services.FolderCollection", "services\net\folder-collection\TNO.Services.FolderCollection.csproj", "{B559B641-F1F0-41D6-9938-A23EC06542A2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TNO.Services.ExtractQuotes", "services\net\extract-quotes\TNO.Services.ExtractQuotes.csproj", "{9BC92B16-7AF9-4B45-BA18-C6A98E2AD87E}"
Expand All @@ -85,6 +83,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TNO.Services.EventHandler",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TNO.Services.ChesRetry", "services\net\ches-retry\TNO.Services.ChesRetry.csproj", "{067EA7C3-A816-406B-B36A-09FC05A427A1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TNO.Services.AutoClipper", "services\net\auto-clipper\TNO.Services.AutoClipper.csproj", "{7B8BF924-36BA-422E-85FD-1C590B092F7B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -198,10 +198,6 @@ Global
{A2DD9547-A4AA-4E07-9239-77D689F49C47}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2DD9547-A4AA-4E07-9239-77D689F49C47}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A2DD9547-A4AA-4E07-9239-77D689F49C47}.Release|Any CPU.Build.0 = Release|Any CPU
{7D0917C1-DFE3-420E-9980-D81947AC405F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7D0917C1-DFE3-420E-9980-D81947AC405F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7D0917C1-DFE3-420E-9980-D81947AC405F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7D0917C1-DFE3-420E-9980-D81947AC405F}.Release|Any CPU.Build.0 = Release|Any CPU
{B559B641-F1F0-41D6-9938-A23EC06542A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B559B641-F1F0-41D6-9938-A23EC06542A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B559B641-F1F0-41D6-9938-A23EC06542A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -226,6 +222,10 @@ Global
{067EA7C3-A816-406B-B36A-09FC05A427A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{067EA7C3-A816-406B-B36A-09FC05A427A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{067EA7C3-A816-406B-B36A-09FC05A427A1}.Release|Any CPU.Build.0 = Release|Any CPU
{7B8BF924-36BA-422E-85FD-1C590B092F7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7B8BF924-36BA-422E-85FD-1C590B092F7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7B8BF924-36BA-422E-85FD-1C590B092F7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7B8BF924-36BA-422E-85FD-1C590B092F7B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{16EA028B-B4C8-416D-BE54-D73D75483668} = {F627B24A-217D-4BF1-BC77-E1A92DBCD07F}
Expand Down Expand Up @@ -258,12 +258,12 @@ Global
{65185F9A-73C0-4C59-8DC4-892616963E43} = {448D6DE6-6887-48EC-A202-18C7EB428ACD}
{CE993EF7-A38F-4563-837B-1194375D459B} = {890D13F9-A1ED-4B00-8E69-A1AB620F31A9}
{A2DD9547-A4AA-4E07-9239-77D689F49C47} = {448D6DE6-6887-48EC-A202-18C7EB428ACD}
{7D0917C1-DFE3-420E-9980-D81947AC405F} = {448D6DE6-6887-48EC-A202-18C7EB428ACD}
{B559B641-F1F0-41D6-9938-A23EC06542A2} = {448D6DE6-6887-48EC-A202-18C7EB428ACD}
{9BC92B16-7AF9-4B45-BA18-C6A98E2AD87E} = {448D6DE6-6887-48EC-A202-18C7EB428ACD}
{E7444ADF-0137-439B-8E20-917CF2FAFA45} = {448D6DE6-6887-48EC-A202-18C7EB428ACD}
{2D455400-0E86-476E-8C42-532D32C10107} = {448D6DE6-6887-48EC-A202-18C7EB428ACD}
{6F1F9B85-B155-4A5A-BB36-10F734F96A12} = {448D6DE6-6887-48EC-A202-18C7EB428ACD}
{067EA7C3-A816-406B-B36A-09FC05A427A1} = {448D6DE6-6887-48EC-A202-18C7EB428ACD}
{7B8BF924-36BA-422E-85FD-1C590B092F7B} = {448D6DE6-6887-48EC-A202-18C7EB428ACD}
EndGlobalSection
EndGlobal
23 changes: 23 additions & 0 deletions api/net/Areas/Editor/Controllers/WorkOrderController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,29 @@ public async Task<IActionResult> RequestTranscriptionAsync(long contentId)
return new JsonResult(new WorkOrderMessageModel(workOrder, _serializerOptions));
}

/// <summary>
/// Request an auto clip for the content for the specified 'contentId'.
/// Publish message to kafka to request an auto clip.
/// </summary>
/// <param name="contentId"></param>
/// <returns></returns>
[HttpPost("auto-clip/{contentId}")]
[Produces(MediaTypeNames.Application.Json)]
[ProducesResponseType(typeof(WorkOrderMessageModel), (int)HttpStatusCode.OK)]
[ProducesResponseType(typeof(ErrorResponseModel), (int)HttpStatusCode.BadRequest)]
[SwaggerOperation(Tags = new[] { "WorkOrder" })]
public async Task<IActionResult> RequestAutoClipAsync(long contentId)
{
var workOrder = await _workOrderHelper.RequestAutoClipAsync(contentId, true);
if (workOrder.Status != WorkOrderStatus.Submitted)
return new JsonResult(new WorkOrderMessageModel(workOrder, _serializerOptions))
{
StatusCode = (int)HttpStatusCode.AlreadyReported
};

return new JsonResult(new WorkOrderMessageModel(workOrder, _serializerOptions));
}

/// <summary>
/// Request a Natural Language Processing for the content for the specified 'contentId'.
/// Publish message to kafka to request a NLP.
Expand Down
25 changes: 25 additions & 0 deletions api/net/Areas/Helpers/IWorkOrderHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ public interface IWorkOrderHelper
/// <exception cref="NotAuthorizedException"></exception>
Task<Entities.WorkOrder> RequestTranscriptionAsync(long contentId, bool force = false);

/// <summary>
/// Request a auto clip for the specified 'contentId'.
/// Only allow one active auto clip request.
/// </summary>
/// <param name="contentId"></param>
/// <param name="force">Whether to force a request regardless of the prior requests state</param>
/// <returns></returns>
/// <exception cref="NoContentException"></exception>
/// <exception cref="ConfigurationException"></exception>
/// <exception cref="NotAuthorizedException"></exception>
Task<Entities.WorkOrder> RequestAutoClipAsync(long contentId, bool force = false);

/// <summary>
/// Request a transcript for the specified 'contentId'.
/// Only allow one active transcript request.
Expand All @@ -47,6 +59,19 @@ public interface IWorkOrderHelper
/// <exception cref="NotAuthorizedException"></exception>
Task<Entities.WorkOrder> RequestTranscriptionAsync(long contentId, Entities.User requestor, bool force = false);

/// <summary>
/// Request a auto clip for the specified 'contentId'.
/// Only allow one active auto clip request.
/// </summary>
/// <param name="contentId"></param>
/// <param name="requestor"></param>
/// <param name="force">Whether to force a request regardless of the prior requests state</param>
/// <returns></returns>
/// <exception cref="NoContentException"></exception>
/// <exception cref="ConfigurationException"></exception>
/// <exception cref="NotAuthorizedException"></exception>
Task<Entities.WorkOrder> RequestAutoClipAsync(long contentId, Entities.User requestor, bool force = false);

/// <summary>
/// Request a natural language processing for the specified 'contentId'.
/// Only allow one active nlp request.
Expand Down
Loading
Loading