Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
'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:{
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 {
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()
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