mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-07 05:31:15 -07:00
Add hidden user title (Full Name) column to users table
This commit is contained in:
parent
aa6592eec7
commit
4862aee9a1
4 changed files with 26 additions and 7 deletions
|
@ -102,7 +102,7 @@ users_list_table_options = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [4],
|
"targets": [4],
|
||||||
"data": "email",
|
"data": "title",
|
||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData !== null && cellData !== '') {
|
if (cellData !== null && cellData !== '') {
|
||||||
$(td).html(cellData);
|
$(td).html(cellData);
|
||||||
|
@ -114,6 +114,18 @@ users_list_table_options = {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [5],
|
"targets": [5],
|
||||||
|
"data": "email",
|
||||||
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
|
if (cellData !== null && cellData !== '') {
|
||||||
|
$(td).html(cellData);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"visible": false,
|
||||||
|
"width": "10%",
|
||||||
|
"className": "no-wrap"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"targets": [6],
|
||||||
"data": "last_seen",
|
"data": "last_seen",
|
||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData !== null && cellData !== '') {
|
if (cellData !== null && cellData !== '') {
|
||||||
|
@ -127,7 +139,7 @@ users_list_table_options = {
|
||||||
"className": "no-wrap"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [6],
|
"targets": [7],
|
||||||
"data": "ip_address",
|
"data": "ip_address",
|
||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData) {
|
if (cellData) {
|
||||||
|
@ -145,7 +157,7 @@ users_list_table_options = {
|
||||||
"className": "no-wrap modal-control-ip"
|
"className": "no-wrap modal-control-ip"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [7],
|
"targets": [8],
|
||||||
"data": "platform",
|
"data": "platform",
|
||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData !== null && cellData !== '') {
|
if (cellData !== null && cellData !== '') {
|
||||||
|
@ -158,7 +170,7 @@ users_list_table_options = {
|
||||||
"className": "no-wrap modal-control"
|
"className": "no-wrap modal-control"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [8],
|
"targets": [9],
|
||||||
"data":"player",
|
"data":"player",
|
||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData !== null && cellData !== '') {
|
if (cellData !== null && cellData !== '') {
|
||||||
|
@ -179,7 +191,7 @@ users_list_table_options = {
|
||||||
"className": "no-wrap modal-control"
|
"className": "no-wrap modal-control"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [9],
|
"targets": [10],
|
||||||
"data":"last_played",
|
"data":"last_played",
|
||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData !== null && cellData !== '') {
|
if (cellData !== null && cellData !== '') {
|
||||||
|
@ -220,7 +232,7 @@ users_list_table_options = {
|
||||||
"className": "datatable-wrap"
|
"className": "datatable-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [10],
|
"targets": [11],
|
||||||
"data": "plays",
|
"data": "plays",
|
||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData !== null && cellData !== '') {
|
if (cellData !== null && cellData !== '') {
|
||||||
|
@ -232,7 +244,7 @@ users_list_table_options = {
|
||||||
"className": "no-wrap"
|
"className": "no-wrap"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"targets": [11],
|
"targets": [12],
|
||||||
"data": "duration",
|
"data": "duration",
|
||||||
"createdCell": function (td, cellData, rowData, row, col) {
|
"createdCell": function (td, cellData, rowData, row, col) {
|
||||||
if (cellData !== null && cellData !== '') {
|
if (cellData !== null && cellData !== '') {
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
<th align="right" id="avatar"></th>
|
<th align="right" id="avatar"></th>
|
||||||
<th align="left" id="friendly_name">User</th>
|
<th align="left" id="friendly_name">User</th>
|
||||||
<th align="left" id="username">Username</th>
|
<th align="left" id="username">Username</th>
|
||||||
|
<th align="left" id="title">Full Name</th>
|
||||||
<th align="left" id="email">Email</th>
|
<th align="left" id="email">Email</th>
|
||||||
<th align="left" id="last_seen">Last Streamed</th>
|
<th align="left" id="last_seen">Last Streamed</th>
|
||||||
<th align="left" id="last_known_ip">Last Known IP</th>
|
<th align="left" id="last_known_ip">Last Known IP</th>
|
||||||
|
|
|
@ -131,6 +131,7 @@ class Users(object):
|
||||||
'users.username',
|
'users.username',
|
||||||
'(CASE WHEN users.friendly_name IS NULL OR TRIM(users.friendly_name) = "" \
|
'(CASE WHEN users.friendly_name IS NULL OR TRIM(users.friendly_name) = "" \
|
||||||
THEN users.username ELSE users.friendly_name END) AS friendly_name',
|
THEN users.username ELSE users.friendly_name END) AS friendly_name',
|
||||||
|
'users.title',
|
||||||
'users.email',
|
'users.email',
|
||||||
'users.thumb AS user_thumb',
|
'users.thumb AS user_thumb',
|
||||||
'users.custom_avatar_url AS custom_thumb',
|
'users.custom_avatar_url AS custom_thumb',
|
||||||
|
@ -207,6 +208,7 @@ class Users(object):
|
||||||
'user_id': item['user_id'],
|
'user_id': item['user_id'],
|
||||||
'username': item['username'],
|
'username': item['username'],
|
||||||
'friendly_name': item['friendly_name'],
|
'friendly_name': item['friendly_name'],
|
||||||
|
'title': item['title'],
|
||||||
'email': item['email'],
|
'email': item['email'],
|
||||||
'user_thumb': user_thumb,
|
'user_thumb': user_thumb,
|
||||||
'plays': item['plays'],
|
'plays': item['plays'],
|
||||||
|
|
|
@ -1268,6 +1268,9 @@ class WebInterface(object):
|
||||||
"do_notify": "Checked",
|
"do_notify": "Checked",
|
||||||
"duration": 2998290,
|
"duration": 2998290,
|
||||||
"friendly_name": "Jon Snow",
|
"friendly_name": "Jon Snow",
|
||||||
|
"username": "LordCommanderSnow",
|
||||||
|
"title": "Jon Snow",
|
||||||
|
"email": "Jon.Snow.1337@CastleBlack.com",
|
||||||
"guid": "com.plexapp.agents.thetvdb://121361/6/1?lang=en",
|
"guid": "com.plexapp.agents.thetvdb://121361/6/1?lang=en",
|
||||||
"history_row_id": 1121,
|
"history_row_id": 1121,
|
||||||
"ip_address": "xxx.xxx.xxx.xxx",
|
"ip_address": "xxx.xxx.xxx.xxx",
|
||||||
|
@ -1306,6 +1309,7 @@ class WebInterface(object):
|
||||||
dt_columns = [("user_thumb", False, False),
|
dt_columns = [("user_thumb", False, False),
|
||||||
("friendly_name", True, True),
|
("friendly_name", True, True),
|
||||||
("username", True, True),
|
("username", True, True),
|
||||||
|
("title", True, True),
|
||||||
("email", True, True),
|
("email", True, True),
|
||||||
("last_seen", True, False),
|
("last_seen", True, False),
|
||||||
("ip_address", True, True),
|
("ip_address", True, True),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue