Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{ title: 'Level', key: 'level', format: v => levelColors[v](v) },
{ title: 'D', key: 'data', length: 1, format: v => _.isEmpty(v) ? ' ' : '*' },
{ title: 'Message', key: 'message' },
];
const highlight = (row, index) => {
const str = row.split('\n')[0];
if (index === this.relativeRow) {
return `{white-bg}{black-fg}${str}{/}`;
}
return str;
};
const content = formatRows(
this.rows, columns, this.colSpacing, this.pageWidth-1).map(highlight).join('\n');
const list = blessed.element({ tags: true, content });
this.append(list);
this.screen.render();
if (notify) {
this.setUpdated();
}
}
}
bottom: 2,
width: 1,
height: 1
})
var cap_right = blessed.element({
parent: manifests.box,
content: '┤',
right: 0,
bottom: 2,
width: 1,
height: 1
})
var cap_upper = blessed.element({
parent: manifests.box,
content: '┬',
left: width,
top: 0,
width: 1,
height: 1
})
var cap_lower = blessed.element({
parent: manifests.box,
content: '┴',
left: width,
bottom: 2,
height: 1,
width: 1
})
})
var cap_upper = blessed.element({
parent: connections,
content: '┬',
style: {
bg: 'white',
fg: 247,
},
left: sidePanelWidth,
top: 0,
width: 1,
height: 1
})
var cap_lower = blessed.element({
parent: connections,
content: '┴',
style: {
bg: 'white',
fg: 247,
},
left: sidePanelWidth,
bottom: 2,
height: 1,
width: 1
})
return connections
}
bg: 239,
fg: 'white'
}
}
},
border: {
bg: 'white',
fg: 247,
type: 'ascii'
}
})
info._.usageLabelText = 'Disk usage '
info._.client = client
info._.usageLabel = blessed.element({
parent: info,
content: info._.usageLabelText,
left: 2,
right: 2,
top: 2,
height: 1,
style: {
bg: 'white',
fg: 'black',
}
})
info._.header = blessed.element({
parent: info,
left: 2,
right: 2,
update() {
if (this.el) {
this.el.detach();
this.el = null;
}
const content = this.json
? JSON.stringify(this.entry, null, 2)
: formatObject(this.entry);
this.el = blessed.element({
scrollable: true,
alwaysScroll: true,
keys: true,
scrollbar: { ch: ' ', track: { bg: 'grey' }, style: { bg: 'yellow' } },
tags: true,
content,
});
this.el.on('keypress', this.handleKeyPress.bind(this));
this.el.focus();
this.append(this.el);
this.screen.render();
}
}
orientation: 'vertical',
left: width,
top: 1,
bottom: 2
})
var sep_h = blessed.line({
parent: manifests.box,
orientation: 'horizontal',
left: width,
bottom: 2,
right: 0,
left: 0
})
var cap_left = blessed.element({
parent: manifests.box,
content: '├',
left: 0,
bottom: 2,
width: 1,
height: 1
})
var cap_right = blessed.element({
parent: manifests.box,
content: '┤',
right: 0,
bottom: 2,
width: 1,
height: 1
})
var formLabelRemote = blessed.element({
parent: form,
content: ['Name\n\nType\n\nKey Encoding Value Encoding',
'\n\n\n\nPort\n\nHost\n\nManifest File'].join(''),
left: 1,
style: {
bg: 'white',
fg: 'black',
},
top: 1,
left: sidePanelWidth + 1,
right: 1,
height: 14
})
var formLabelLocal = blessed.element({
parent: form,
content: ['Name\n\nType\n\nKey Encoding Value Encoding',
'\n\n\n\nPath\n\nCache Size\n\nCompression'].join(''),
left: 1,
style: {
bg: 'white',
fg: 'black',
},
top: 1,
left: sidePanelWidth + 1,
right: 1,
hidden: true,
height: 14
})
var textName = blessed.textbox({
content: ' Exec ',
align: 'center',
style: {
bg: 243,
fg: 'white',
focus: {
bg: 'black'
}
},
hoverBg: 'black',
hoverFg: 'white',
autoFocus: true,
mouse: true
})
var qLabel = blessed.element({
parent: query,
content: 'Start\n\nEnd\n\nReverse\n\nLimit',
left: 2,
style: {
bg: 'white',
fg: 'black',
},
top: 2,
width: 15,
height: 8
})
var textStart = blessed.textbox({
parent: query,
mouse: true,
keys: true,