How to use the blessed-contrib.gauge 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 FormidableLabs / nodejs-dashboard / lib / views / memory-gauge-view.js View on Github external
MemoryView.prototype._createViews = function (options) {
  this.node = blessed.box({
    label: util.format(" %s ", this.layoutConfig.title),
    border: "line",
    style: {
      border: {
        fg: this.layoutConfig.borderColor
      }
    }
  });

  this.recalculatePosition();

  this.heapGauge = contrib.gauge({ label: "heap" });
  this.node.append(this.heapGauge);

  this.rssGauge = contrib.gauge({ label: "resident",
    top: "50%" });
  this.node.append(this.rssGauge);

  options.parent.append(this.node);
};
github MadRabbit / keyboard-genetics / src / ui.js View on Github external
label:   "Genetics info",
  content: "Loading...",
  padding: 1
});

const chart = contrib.line({
  height:           12,
  top:              1,
  xPadding:         1,
  xLabelPadding:    1,
  wholeNumbersOnly: true,
  showLegend:       false
});
genesis.append(chart);

const breaks_bar = contrib.gauge({
  showLabel: false,
  height:  3,
  top:     5,
  left:    20,
  width:   30
});
genesis.append(breaks_bar);

const breaks_label = blessed.text({
  content: "No changes in 0/0",
  top:      7
});
genesis.append(breaks_label);

const fingers_chart = contrib.bar({
  top:        7,
github FormidableLabs / nodejs-dashboard / lib / views / memory-gauge-view.js View on Github external
this.node = blessed.box({
    label: util.format(" %s ", this.layoutConfig.title),
    border: "line",
    style: {
      border: {
        fg: this.layoutConfig.borderColor
      }
    }
  });

  this.recalculatePosition();

  this.heapGauge = contrib.gauge({ label: "heap" });
  this.node.append(this.heapGauge);

  this.rssGauge = contrib.gauge({ label: "resident",
    top: "50%" });
  this.node.append(this.rssGauge);

  options.parent.append(this.node);
};