From 9e8d55e0f34f2cbe52260bdc5f4d2f9b8dff7b99 Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Sat, 15 Oct 2016 17:01:47 -0700 Subject: [PATCH] Update notification logs table --- .../default/js/tables/notification_logs.js | 33 ++++++++++--------- data/interfaces/default/logs.html | 8 ++--- plexpy/datafactory.py | 10 +++--- 3 files changed, 25 insertions(+), 26 deletions(-) diff --git a/data/interfaces/default/js/tables/notification_logs.js b/data/interfaces/default/js/tables/notification_logs.js index d5d5e2b1..f2d6b7e1 100644 --- a/data/interfaces/default/js/tables/notification_logs.js +++ b/data/interfaces/default/js/tables/notification_logs.js @@ -31,18 +31,18 @@ notification_log_table_options = { }, { "targets": [1], - "data": "agent_name", + "data": "notifier_id", "createdCell": function (td, cellData, rowData, row, col) { if (cellData !== '') { $(td).html(cellData); } }, - "width": "7%", + "width": "5%", "className": "no-wrap" }, { "targets": [2], - "data": "notify_action", + "data": "agent_name", "createdCell": function (td, cellData, rowData, row, col) { if (cellData !== '') { $(td).html(cellData); @@ -53,33 +53,34 @@ notification_log_table_options = { }, { "targets": [3], + "data": "notify_action", + "createdCell": function (td, cellData, rowData, row, col) { + if (cellData !== '') { + $(td).html(cellData); + } + }, + "width": "5%", + "className": "no-wrap" + }, + { + "targets": [4], "data": "subject_text", "createdCell": function (td, cellData, rowData, row, col) { if (cellData !== '') { $(td).html(cellData); } }, - "width": "20%" + "width": "25%" }, { - "targets": [4], + "targets": [5], "data": "body_text", "createdCell": function (td, cellData, rowData, row, col) { if (cellData !== '') { $(td).html(cellData); } }, - "width": "38%" - }, - { - "targets": [5], - "data": "script_args", - "createdCell": function (td, cellData, rowData, row, col) { - if (cellData !== '') { - $(td).html(cellData); - } - }, - "width": "20%" + "width": "50%" } ], "drawCallback": function (settings) { diff --git a/data/interfaces/default/logs.html b/data/interfaces/default/logs.html index 6644f31a..96a17f40 100644 --- a/data/interfaces/default/logs.html +++ b/data/interfaces/default/logs.html @@ -104,11 +104,11 @@ Timestamp + Notifier ID Agent - Action - Subject Text - Body Text - Script Args + Action + Subject Text + Body Text diff --git a/plexpy/datafactory.py b/plexpy/datafactory.py index 65900f82..b26b252a 100644 --- a/plexpy/datafactory.py +++ b/plexpy/datafactory.py @@ -1305,13 +1305,12 @@ class DataFactory(object): 'notify_log.rating_key', 'notify_log.user_id', 'notify_log.user', + 'notify_log.notifier_id', 'notify_log.agent_id', 'notify_log.agent_name', 'notify_log.notify_action', 'notify_log.subject_text', - 'notify_log.body_text', - 'notify_log.script_args', - 'notify_log.poster_url', + 'notify_log.body_text' ] try: query = data_tables.ssp_query(table_name='notify_log', @@ -1345,13 +1344,12 @@ class DataFactory(object): 'rating_key': item['rating_key'], 'user_id': item['user_id'], 'user': item['user'], + 'notifier_id': item['notifier_id'], 'agent_id': item['agent_id'], 'agent_name': item['agent_name'], 'notify_action': item['notify_action'], 'subject_text': item['subject_text'], - 'body_text': body_text, - 'script_args': item['script_args'], - 'poster_url': item['poster_url'] + 'body_text': body_text } rows.append(row)