projects
/
APKPM.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5f0c404
)
display last ping for user
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 12 Jul 2011 12:10:55 +0000
(14:10 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 12 Jul 2011 12:10:55 +0000
(14:10 +0200)
public/user.html
patch
|
blob
|
history
diff --git
a/public/user.html
b/public/user.html
index
f232206
..
e8d3f1d
100644
(file)
--- a/
public/user.html
+++ b/
public/user.html
@@
-88,6
+88,19
@@
console.debug( cols );
self.r.table = $resource('/table/:table');
self.table_update = function () {
if ( ! self.username || ! self.cpe.table_name ) return;
self.r.table = $resource('/table/:table');
self.table_update = function () {
if ( ! self.username || ! self.cpe.table_name ) return;
+
+ self.message.ping = self.username+' loading';
+ self.r.table.get({ username: self.username, table: 'ping', limit: 1 }, function(ping) {
+ $log.info('ping', ping);
+ self.message.ping = null;
+ var hash = {};
+ for(var i = 0; i <= ping.columns.length; i++) {
+ hash[ping.columns[i]] = ping.rows[0][i];
+ }
+ self.cpe.ping = hash;
+ $log.info('ping hash', hash);
+ });
+
self.message.table = self.username + ' loading from ' + self.cpe.table_name;
self.r.table.get({ username: self.username, table: self.cpe.table_name, limit: self.cpe_limit }, function(table) {
$log.info( 'table', table );
self.message.table = self.username + ' loading from ' + self.cpe.table_name;
self.r.table.get({ username: self.username, table: self.cpe.table_name, limit: self.cpe_limit }, function(table) {
$log.info( 'table', table );
@@
-274,6
+287,10
@@
li > tt {
<li ng:repeat="c in keys(LDAP)"><tt>{{c}}</tt> {{LDAP[0][c]}}</li>
</ul>
<li ng:repeat="c in keys(LDAP)"><tt>{{c}}</tt> {{LDAP[0][c]}}</li>
</ul>
+ <div ng:show="cpe.ping">
+ ping <tt>{{cpe.ping.ip}}</tt> rtt <tt>{{cpe.ping.rtt}}</tt> at <tt>{{cpe.ping.timestamp}}</tt>
+ </div>
+
<div class="panel_right" ng:show="cpe.table">
<label>
Graph columns
<div class="panel_right" ng:show="cpe.table">
<label>
Graph columns