rabbitmq-server/deps/rabbitmq_stream_management/priv/www/js/stream.js

34 lines
1.4 KiB
JavaScript
Raw Normal View History

2020-11-19 21:48:25 +08:00
dispatcher_add(function(sammy) {
sammy.get('#/stream/connections', function() {
2020-11-19 21:48:25 +08:00
renderStreamConnections();
});
});
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() {
render({'connections': {path: url_pagination_template_context('stream/connections', 'streamConnections', 1, 100),
2020-11-19 21:48:25 +08:00
options: {sort:true}}},
'streamConnections', '#/stream/connections');
2020-11-19 21:48:25 +08:00
}
RENDER_CALLBACKS['streamConnections'] = function() { renderStreamConnections() };