Skip to content

Commit 6f0bc9f

Browse files
committed
fix: extra lines and commented code
1 parent bc23907 commit 6f0bc9f

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

lib/cli/gfx/server-util.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ function OutputBuffer(options) {
88
this.columns = options.cols;
99
this.rows = options.rows;
1010
this.write = function(s) {
11-
s = s.replace('\x1b8', ''); //not clear from where in blessed this code comes from. It forces the terminal to clear and loose existing content.
11+
s = s.replace('\x1b8', '');
1212
options.stream.write(s)
1313
};
14-
1514
this.on = function() {};
1615
}
1716

@@ -25,7 +24,6 @@ function InputBuffer() {
2524
this.on = function() {};
2625
}
2726

28-
2927
createScreen = (opt = {}) => {
3028
const output = new OutputBuffer({stream: opt.stream, cols: 250, rows: 50});
3129
const input = new InputBuffer(); //required to run under forever since it replaces stdin to non-tty
@@ -35,7 +33,6 @@ createScreen = (opt = {}) => {
3533
return screen
3634
}
3735

38-
3936
loadTemplate = (gridTemplateClass, json, callback) => {
4037

4138
blessed.Screen.global = null

lib/cli/gfx/template.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ const
22
contrib = require('blessed-contrib'),
33
chalk = require('chalk');
44

5-
// <Grid>:new contrib.grid({rows: 14, cols: 14, screen: screen});
65
exports.load = (grid, data) => {
76

87
let markdown = grid.set(0, 0, 2, 2, contrib.markdown,{
@@ -65,11 +64,8 @@ exports.load = (grid, data) => {
6564
}
6665
}})
6766

68-
screen.append(bar) //must append before setting data
69-
bar.setData(
70-
{ titles: ['Cases', 'Deaths', 'Recovered', 'Active']
71-
, data: [data.cases, data.deaths, data.recovered, data.active]})
72-
67+
screen.append(bar) //must append before setting data
68+
bar.setData({ titles: ['Cases', 'Deaths', 'Recovered', 'Active'], data: [data.cases, data.deaths, data.recovered, data.active]})
7369

7470
let donut = grid.set(2, 7, 3, 2, contrib.donut,{
7571
label: 'Mortality Rate',

0 commit comments

Comments
 (0)