How to use the blessed-contrib.gaugeList function in blessed-contrib

To help you get started, we’ve selected a few blessed-contrib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stratosphereips / StratosphereLinuxIPS / modules / blessed / ips_timewindows.js View on Github external
},
            'dstPortsClientIPs': {
              keys: ['n']
                        },
            
              'OutTuples': {
              keys: ['h']},

              'map': {
              keys: ['m']
                        },
                        

          }
}),
gaugeList_est_srcPort = grid.set(0.3, 2, 2.6, 4, contrib.gaugeList,
      {
      style:{
        border:{ fg:'blue'},
         focus: {
      border:{ fg:'magenta'}
    }},
      keys:true,
        gaugeSpacing: 1,
        gaugeHeight: 1,
        gauges:[]
      }
    ),
gaugeList_notEst_srcPort = grid.set(3.1, 2, 2.6, 4, contrib.gaugeList,
      {

        style:{
github dashersw / brain-monitor / widgets / gyro.js View on Github external
module.exports = function (grid) {
    const gyros = grid.set(4, 10, 1, 2, contrib.gaugeList, {
        gaugeSpacing: 0,
        gaugeHeight: 1,
        gauges: [
            { label: 'gX', showLabel: false, stack: calcGyro(0, 'cyan') },
            { label: 'gY', showLabel: false, stack: calcGyro(0, 'magenta') }
        ]
    })

    function update([x, y]) {
        gyros.setGauges([
            { label: 'gX', showLabel: false, stack: calcGyro(-x, 'cyan') },
            { label: 'gY', showLabel: false, stack: calcGyro(y, 'magenta') }
        ])
    }

    return {
github stratosphereips / StratosphereLinuxIPS / modules / blessed / ips_timewindows.js View on Github external
gaugeList_est_dstPortClientIps = grid.set(0.3, 2, 2.6, 4, contrib.gaugeList,
      {

      style:{
          border:{ fg:'blue'},

         focus: {
      border:{ fg:'magenta'}
    }},
      keys:true,
        gaugeSpacing: 1,
        gaugeHeight: 1,
        gauges:[]
      }
    ),
gaugeList_notEst_dstPortClientIps = grid.set(3.1, 2, 2.6, 4, contrib.gaugeList,
      {
        style:{
          border:{ fg:'blue'},

         focus: {
      border:{ fg:'magenta'}
    }},
      keys:true,
        gaugeSpacing: 1,
        gaugeHeight: 1,
        gauges:[]
      }
    )
var gauge_number = 9;
var timeline_length;
box_generic_dashboard.setFront()
github dashersw / brain-monitor / lib / override-blessed-contrib.js View on Github external
const contrib = require('blessed-contrib')
const blessed = require('blessed')
const utils = require('blessed-contrib/lib/utils')

contrib.gaugeList.prototype.setSingleGauge = function (gauge, offset) {
    var colors = ['green', 'magenta', 'cyan', 'red', 'blue']
    var stack = gauge.stack

    var c = this.ctx
    var leftStart = 3
    var textLeft = 5

    c.strokeStyle = 'normal'
    c.fillStyle = 'white'
    c.fillText(gauge.label || offset.toString(), 0, offset * (this.options.gaugeHeight + this.options.gaugeSpacing))

    for (var i = 0; i < stack.length; i++) {
        var currentStack = stack[i]

        if (typeof (currentStack) == typeof ({}))
            var percent = currentStack.percent