From fe8f319f7bfdadb7218b6313ada6cae1d2a35ad8 Mon Sep 17 00:00:00 2001 From: Taloth Saldono Date: Sun, 16 May 2021 12:41:53 +0200 Subject: [PATCH] Show User Agent in System->Tasks for externally triggered commands --- .../src/System/Tasks/Queued/QueuedTaskRow.css | 9 ++++++++ .../src/System/Tasks/Queued/QueuedTaskRow.js | 13 +++++++++++- src/NzbDrone.Api/Commands/CommandResource.cs | 5 +++++ src/NzbDrone.Common/Http/UserAgentParser.cs | 21 +++++++++++++++++++ .../Messaging/Commands/Command.cs | 2 ++ src/Sonarr.Api.V3/Commands/CommandModule.cs | 2 ++ src/Sonarr.Api.V3/Commands/CommandResource.cs | 5 +++++ 7 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 src/NzbDrone.Common/Http/UserAgentParser.cs diff --git a/frontend/src/System/Tasks/Queued/QueuedTaskRow.css b/frontend/src/System/Tasks/Queued/QueuedTaskRow.css index 6e38929c9..034804711 100644 --- a/frontend/src/System/Tasks/Queued/QueuedTaskRow.css +++ b/frontend/src/System/Tasks/Queued/QueuedTaskRow.css @@ -10,6 +10,15 @@ width: 100%; } +.commandName { + display: inline-block; + min-width: 220px; +} + +.userAgent { + color: #b0b0b0; +} + .queued, .started, .ended { diff --git a/frontend/src/System/Tasks/Queued/QueuedTaskRow.js b/frontend/src/System/Tasks/Queued/QueuedTaskRow.js index 12393cb96..1aac3ef21 100644 --- a/frontend/src/System/Tasks/Queued/QueuedTaskRow.js +++ b/frontend/src/System/Tasks/Queued/QueuedTaskRow.js @@ -156,6 +156,7 @@ class QueuedTaskRow extends Component { status, duration, message, + clientUserAgent, longDateFormat, timeFormat, onCancelPress @@ -191,7 +192,17 @@ class QueuedTaskRow extends Component { - {commandName} + + + {commandName} + + { + clientUserAgent && + + from: {clientUserAgent} + + } +