Skip to content
Snippets Groups Projects
Select Git revision
  • 16a78b4e9e8b1d135851201ebe3dbbefe52c51cf
  • experimental default protected
  • v2023.2.5-ffs
  • nrb/ex400-remove-wps
  • nrb/airmax-test
  • v2023.2.4-ffs
  • nrb/ar9344-reset-sequence
  • autinerd/experimental-openwrt-24.10
  • v2023.2.3-ffs
  • v2023.2.2-ffs
  • v2023.2-ffs
  • v2023.1-ffs
  • v2022.1.4-ffs
  • feature/addMikrotikwAP
  • v2022.1.3-ffs
  • v2021.1.2-ffs
  • v2022.1.1-ffs
  • master protected
  • v2021.1.1-ffs
  • nrb/gluon-master-cpe510
  • v2021.1-ffs
  • experimental-2025-07-26
  • experimental-2025-07-26-base
  • experimental-2025-07-24
  • experimental-2025-07-24-base
  • experimental-2025-07-22
  • experimental-2025-07-22-base
  • experimental-2025-07-21
  • experimental-2025-07-21-base
  • experimental-2025-07-20
  • experimental-2025-07-20-base
  • experimental-2025-07-19
  • experimental-2025-07-19-base
  • experimental-2025-07-17
  • experimental-2025-07-17-base
  • experimental-2025-07-12
  • experimental-2025-07-12-base
  • experimental-2025-07-04
  • experimental-2025-07-04-base
  • experimental-2025-07-01
  • experimental-2025-07-01-base
41 results

clean_output.sh

Blame
  • node.js 9.61 KiB
    define(['sorttable', 'virtual-dom', 'chroma-js', 'moment', 'helper'],
      function (SortTable, V, chroma, moment, helper) {
        'use strict';
    
        function showGeoURI(d) {
          if (!helper.hasLocation(d)) {
            return undefined;
          }
    
          return function (el) {
            var a = document.createElement('a');
            a.textContent = Number(d.nodeinfo.location.latitude.toFixed(6)) + ', ' + Number(d.nodeinfo.location.longitude.toFixed(6));
            a.href = 'geo:' + d.nodeinfo.location.latitude + ',' + d.nodeinfo.location.longitude;
            el.appendChild(a);
          };
        }
    
        function showStatus(d) {
          return function (el) {
            el.classList.add(d.flags.unseen ? 'unseen' : (d.flags.online ? 'online' : 'offline'));
            el.textContent = _.t((d.flags.online ? 'node.lastOnline' : 'node.lastOffline'), {
              time: d.lastseen.fromNow(),
              date: d.lastseen.format('DD.MM.YYYY, H:mm:ss')
            });
          };
        }
    
        function showFirmware(d) {
          var release = helper.dictGet(d.nodeinfo, ['software', 'firmware', 'release']);
          var base = helper.dictGet(d.nodeinfo, ['software', 'firmware', 'base']);
    
          if (release === null || base === null) {
            return undefined;
          }
    
          return release + ' / ' + base;
        }
    
        function showSite(d, config) {
          var site = helper.dictGet(d.nodeinfo, ['system', 'site_code']);
          var rt = site;
          if (config.siteNames) {
            config.siteNames.forEach(function (t) {
              if (site === t.site) {
                rt = t.name;
              }
            });
          }
          return rt;
        }
    
        function showUptime(d) {
          if (!('uptime' in d.statistics)) {
            return undefined;
          }
    
          return moment.duration(d.statistics.uptime, 'seconds').humanize();
        }
    
        function showFirstseen(d) {
          if (!('firstseen' in d)) {
            return undefined;
          }
    
          return d.firstseen.fromNow(true);
        }
    
        function showClients(d) {
          if (!d.flags.online) {
            return undefined;