From f85235d21428b276229932524b13c9fd078b78d6 Mon Sep 17 00:00:00 2001 From: Robin Dadswell <19610103+RobinDadswell@users.noreply.github.com> Date: Thu, 20 May 2021 12:04:37 +0100 Subject: [PATCH] Show User Agent in System->Tasks for externally triggered commands (#63) (cherry picked from commit fe8f319f7bfdadb7218b6313ada6cae1d2a35ad8) Co-authored-by: Taloth Saldono --- .../src/System/Tasks/Queued/QueuedTaskRow.css | 9 ++++++++ .../src/System/Tasks/Queued/QueuedTaskRow.js | 15 ++++++++++++- src/NzbDrone.Common/Http/UserAgentParser.cs | 21 +++++++++++++++++++ .../Messaging/Commands/Command.cs | 2 ++ .../Commands/CommandController.cs | 1 + .../Commands/CommandResource.cs | 5 +++++ 6 files changed, 52 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 cfe85573c..b19525326 100644 --- a/frontend/src/System/Tasks/Queued/QueuedTaskRow.js +++ b/frontend/src/System/Tasks/Queued/QueuedTaskRow.js @@ -157,6 +157,7 @@ class QueuedTaskRow extends Component { status, duration, message, + clientUserAgent, longDateFormat, timeFormat, onCancelPress @@ -192,7 +193,18 @@ class QueuedTaskRow extends Component { - {commandName} + + + {commandName} + + { + clientUserAgent ? + + from: {clientUserAgent} + : + null + } +