2020-11-19 21:48:25 +08:00
|
|
|
dispatcher_add(function(sammy) {
|
2020-11-20 21:38:14 +08:00
|
|
|
sammy.get('#/stream/connections', function() {
|
2020-11-19 21:48:25 +08:00
|
|
|
renderStreamConnections();
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2020-11-20 21:38:14 +08:00
|
|
|
NAVIGATION['Stream'] = ['#/stream/connections', "monitoring"];
|
2020-11-19 21:48:25 +08:00
|
|
|
|
|
|
|
var ALL_STREAM_COLUMNS =
|
|
|
|
{'Overview': [['user', 'User name', true],
|
|
|
|
['state', 'State', true]],
|
|
|
|
'Details': [['protocol', 'Protocol', true],
|
|
|
|
['frame_max', 'Frame max', false],
|
|
|
|
['auth_mechanism', 'Auth mechanism', false],
|
|
|
|
['client', 'Client', false]],
|
|
|
|
'Network': [['from_client', 'From client', true],
|
|
|
|
['to_client', 'To client', true],
|
|
|
|
['heartbeat', 'Heartbeat', false],
|
|
|
|
['connected_at', 'Connected at', false]]};
|
|
|
|
|
|
|
|
var DISABLED_STATS_STREAM_COLUMNS =
|
|
|
|
{'Overview': [['user', 'User name', true],
|
|
|
|
['state', 'State', true]]};
|
|
|
|
|
|
|
|
COLUMNS['streamConnections'] = disable_stats?DISABLED_STATS_STREAM_COLUMNS:ALL_STREAM_COLUMNS;
|
|
|
|
|
|
|
|
function renderStreamConnections() {
|
2020-11-20 21:38:14 +08:00
|
|
|
render({'connections': {path: url_pagination_template_context('stream/connections', 'streamConnections', 1, 100),
|
2020-11-19 21:48:25 +08:00
|
|
|
options: {sort:true}}},
|
2020-11-20 21:38:14 +08:00
|
|
|
'streamConnections', '#/stream/connections');
|
2020-11-19 21:48:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
RENDER_CALLBACKS['streamConnections'] = function() { renderStreamConnections() };
|