report bandwidth, only pull changes
This commit is contained in:
parent
1e17e4a9d1
commit
68383b8834
8 changed files with 78 additions and 26 deletions
|
|
@ -10,24 +10,34 @@ oml.ui.connectionButton = function() {
|
|||
})
|
||||
.bindEvent({
|
||||
// ...
|
||||
});
|
||||
}),
|
||||
bandwidth;
|
||||
|
||||
/*
|
||||
oml.ui.statusIcon(oml.user.online ? 'connected' : 'disconnected')
|
||||
oml.ui.statusIcon(oml.user)
|
||||
.css({float: 'left'})
|
||||
.appendTo(that);
|
||||
*/
|
||||
|
||||
Ox.Element()
|
||||
function formatBandwidth(up, down) {
|
||||
return '↓'+Ox.formatValue(down, 'b')+' / ↑'+Ox.formatValue(up, 'b')+'';
|
||||
}
|
||||
|
||||
bandwidth = Ox.Element()
|
||||
.addClass('OxLight')
|
||||
.css({
|
||||
float: 'left',
|
||||
marginTop: '2px',
|
||||
fontSize: '9px'
|
||||
})
|
||||
.html('↓0K/↑0K')
|
||||
.html(formatBandwidth(0, 0))
|
||||
.appendTo(that);
|
||||
|
||||
oml.bindEvent({
|
||||
bandwidth: function(data) {
|
||||
bandwidth.html(formatBandwidth(data.up, data.down));
|
||||
}
|
||||
});
|
||||
return that;
|
||||
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue