Add 'Last Seen Complete' to GTK and WebUI Status Tabs
This commit is contained in:
parent
b7fd2d1bf1
commit
b6596a27bc
|
@ -1539,7 +1539,7 @@ This will filter torrents for the current selection on the sidebar.</property>
|
|||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">8</property>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="bottom_attach">5</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
|
@ -1561,6 +1561,41 @@ This will filter torrents for the current selection on the sidebar.</property>
|
|||
<property name="y_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="summary_last_seen_complete">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="wrap_mode">char</property>
|
||||
<property name="selectable">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">5</property>
|
||||
<property name="right_attach">8</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="bottom_attach">5</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label_last_seen_complete">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="yalign">0</property>
|
||||
<property name="label" translatable="yes"><b>Last Seen Complete:</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">4</property>
|
||||
<property name="right_attach">5</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="bottom_attach">5</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkLabel" id="summary_availability">
|
||||
<property name="visible">True</property>
|
||||
|
|
|
@ -68,6 +68,13 @@ def fspeed(value, max_value=-1):
|
|||
else:
|
||||
return deluge.common.fspeed(value)
|
||||
|
||||
def fdate_or_never(value):
|
||||
"""Display value as date, eg 05/05/08 or Never"""
|
||||
if value > 0.0:
|
||||
return deluge.common.fdate(value)
|
||||
else:
|
||||
return "Never"
|
||||
|
||||
class StatusTab(Tab):
|
||||
def __init__(self):
|
||||
Tab.__init__(self)
|
||||
|
@ -103,7 +110,8 @@ class StatusTab(Tab):
|
|||
(glade.get_widget("summary_seed_rank"), str, ("seed_rank",)),
|
||||
(glade.get_widget("summary_auto_managed"), str, ("is_auto_managed",)),
|
||||
(glade.get_widget("progressbar"), fpcnt, ("progress",)),
|
||||
(glade.get_widget("summary_date_added"), deluge.common.fdate, ("time_added",))
|
||||
(glade.get_widget("summary_date_added"), deluge.common.fdate, ("time_added",)),
|
||||
(glade.get_widget("summary_last_seen_complete"), fdate_or_never, ("last_seen_complete",)),
|
||||
]
|
||||
|
||||
def update(self):
|
||||
|
@ -125,7 +133,7 @@ class StatusTab(Tab):
|
|||
"total_seeds", "eta", "ratio", "next_announce",
|
||||
"tracker_status", "max_connections", "max_upload_slots",
|
||||
"max_upload_speed", "max_download_speed", "active_time",
|
||||
"seeding_time", "seed_rank", "is_auto_managed", "time_added"]
|
||||
"seeding_time", "seed_rank", "is_auto_managed", "time_added", "last_seen_complete"]
|
||||
if self.config['show_piecesbar']:
|
||||
status_keys.extend(["pieces", "state"])
|
||||
|
||||
|
|
|
@ -112,6 +112,9 @@ dl.singleline dd {
|
|||
.x-deluge-status dd.time_added {
|
||||
width: 100px;
|
||||
}
|
||||
.x-deluge-status dd.last_seen_complete {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
/* Torrent Details - Details Tab */
|
||||
#torrentDetails dd.torrent_name,
|
||||
|
|
|
@ -48,7 +48,7 @@ Deluge.Keys = {
|
|||
'queue', 'name', 'total_size', 'state', 'progress', 'num_seeds',
|
||||
'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate',
|
||||
'upload_payload_rate', 'eta', 'ratio', 'distributed_copies',
|
||||
'is_auto_managed', 'time_added', 'tracker_host', 'save_path'
|
||||
'is_auto_managed', 'time_added', 'tracker_host', 'save_path', 'last_seen_complete'
|
||||
],
|
||||
|
||||
/**
|
||||
|
|
|
@ -75,6 +75,10 @@
|
|||
return eta * -1;
|
||||
}
|
||||
|
||||
function dateOrNever(date) {
|
||||
return date > 0.0 ? fdate(date) : "Never"
|
||||
}
|
||||
|
||||
/**
|
||||
* Deluge.TorrentGrid Class
|
||||
*
|
||||
|
@ -169,7 +173,7 @@
|
|||
header: _('Last Seen Complete'),
|
||||
width: 80,
|
||||
sortable: true,
|
||||
renderer: fdate,
|
||||
renderer: dateOrNever,
|
||||
dataIndex: 'last_seen_complete'
|
||||
}, {
|
||||
header: _('Tracker'),
|
||||
|
|
|
@ -91,8 +91,9 @@ Deluge.details.StatusTab = Ext.extend(Ext.Panel, {
|
|||
},
|
||||
|
||||
onRequestComplete: function(status) {
|
||||
seeders = status.total_seeds > -1 ? status.num_seeds + ' (' + status.total_seeds + ')' : status.num_seeds
|
||||
peers = status.total_peers > -1 ? status.num_peers + ' (' + status.total_peers + ')' : status.num_peers
|
||||
seeders = status.total_seeds > -1 ? status.num_seeds + ' (' + status.total_seeds + ')' : status.num_seeds;
|
||||
peers = status.total_peers > -1 ? status.num_peers + ' (' + status.total_peers + ')' : status.num_peers;
|
||||
last_seen_complete = status.last_seen_complete > 0.0 ? fdate(status.last_seen_complete) : "Never";
|
||||
var data = {
|
||||
downloaded: fsize(status.total_done, true),
|
||||
uploaded: fsize(status.total_uploaded, true),
|
||||
|
@ -109,7 +110,8 @@ Deluge.details.StatusTab = Ext.extend(Ext.Panel, {
|
|||
active_time: ftime(status.active_time),
|
||||
seeding_time: ftime(status.seeding_time),
|
||||
seed_rank: status.seed_rank,
|
||||
time_added: fdate(status.time_added)
|
||||
time_added: fdate(status.time_added),
|
||||
last_seen_complete: last_seen_complete
|
||||
}
|
||||
data.auto_managed = _((status.is_auto_managed) ? 'True' : 'False');
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<dt class="peers">${_("Peers")}:</dt><dd class="peers"/>
|
||||
<dt class="avail">${_("Availability")}:</dt><dd class="avail"/>
|
||||
<dt class="auto_managed">${_("Auto Managed")}:</dt><dd class="auto_managed"/>
|
||||
<dt class="last_seen_complete">${_("Last Seen Complete")}: </dt><dd class="last_seen_complete"/>
|
||||
</dl>
|
||||
<dl>
|
||||
<dt class="active_time">${_("Active Time")}:</dt><dd class="active_time"/>
|
||||
|
|
Loading…
Reference in New Issue