/usr/lib/python3/dist-packages/glances/outputs/static/js/services/plugins/glances_memswap.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 26 27 | glancesApp.service('GlancesPluginMemSwap', function() {
var _pluginName = "memswap";
var _view = {};
this.percent = null;
this.total = null;
this.used = null;
this.free = null;
this.setData = function(data, views) {
_view = views[_pluginName];
data = data[_pluginName];
this.percent = data['percent'];
this.total = data['total'];
this.used = data['used'];
this.free = data['free'];
};
this.getDecoration = function(value) {
if(_view[value] == undefined) {
return;
}
return _view[value].decoration.toLowerCase();
};
});
|