This file is indexed.

/usr/lib/python3/dist-packages/glances/outputs/static/js/services/plugins/glances_ports.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
28
29
glancesApp.service('GlancesPluginPorts', function() {
  var _pluginName = "ports";
  this.ports = [];

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

    angular.forEach(ports, function(port) {
      this.ports.push(port);
    }, this);
  };

  this.getDecoration = function(port) {
    if (port.status === null) {
      return 'careful';
    }

    if (port.status === false) {
      return 'critical';
    }

    if (port.rtt_warning !== null && port.status > port.rtt_warning) {
      return 'warning';
    }

    return 'ok';
  };
});