/usr/lib/python3/dist-packages/glances/outputs/static/js/services/plugins/glances_network.js is in glances 2.7.1.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | glancesApp.service('GlancesPluginNetwork', function() {
var _pluginName = "network";
this.networks = [];
this.setData = function(data, views) {
this.networks = [];
for (var i = 0; i < data[_pluginName].length; i++) {
var networkData = data[_pluginName][i];
var network = {
'interfaceName': networkData['interface_name'],
'rx': networkData['rx'],
'tx': networkData['tx'],
'cx': networkData['cx'],
'time_since_update': networkData['time_since_update'],
'cumulativeRx': networkData['cumulative_rx'],
'cumulativeTx': networkData['cumulative_tx'],
'cumulativeCx': networkData['cumulative_cx']
};
this.networks.push(network);
}
};
});
|