This file is indexed.

/usr/lib/python3/dist-packages/glances/outputs/static/js/services/plugins/glances_sensors.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
glancesApp.service('GlancesPluginSensors', function(GlancesPlugin) {

    var _pluginName = "sensors";
    this.sensors = [];

    this.setData = function(data, views) {
        data = data[_pluginName];

        _.remove(data, function(sensor) {
            return (_.isArray(sensor.value) && _.isEmpty(sensor.value)) || sensor.value === 0;
        });

        this.sensors = data;
    };

    this.getAlert = function(sensor) {
        var current = sensor.type == 'battery' ? 100 - sensor.value : sensor.value;

        return GlancesPlugin.getAlert(_pluginName, 'sensors_' + sensor.type + '_', current);
    };
});