From bc6261efb8bf2ecdbb3cc0450682f3844da05338 Mon Sep 17 00:00:00 2001
From: Robin Dadswell <19610103+RobinDadswell@users.noreply.github.com>
Date: Sun, 23 May 2021 06:27:22 +0100
Subject: [PATCH] New: Show User Agent in System->Tasks for externally
triggered commands (#2261)
---
.../src/System/Tasks/Queued/QueuedTaskRow.css | 9 ++++++++
.../src/System/Tasks/Queued/QueuedTaskRow.js | 15 ++++++++++++-
src/Lidarr.Api.V1/Commands/CommandModule.cs | 2 ++
src/Lidarr.Api.V1/Commands/CommandResource.cs | 5 +++++
src/NzbDrone.Common/Http/UserAgentParser.cs | 21 +++++++++++++++++++
.../Messaging/Commands/Command.cs | 2 ++
6 files changed, 53 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 df3fd4a93..a4ea82f43 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,18 @@ class QueuedTaskRow extends Component {
- {commandName}
+
+
+ {commandName}
+
+ {
+ clientUserAgent ?
+
+ from: {clientUserAgent}
+ :
+ null
+ }
+