
Security News
Happy Birthday, Shai-Hulud
It has been one year since Shai-Hulud made its first appearance on npm.
term-dashboard
Advanced tools
This shows a dashboard on terminal and updated automatically when data is provided.
npm install term-dashboard
var Dashboard = require('term-dashboard').Dashboard;
var dashboard = new Dashboard({
views: {
header: [ { renderer: 'text', text: 'Terminal Dashboard Demo', fg: 'brightWhite', styles: ['bold', 'underline'] } ],
worker: [
{ renderer: 'text', width: 20, key: 'name', align: 'right' },
{ renderer: 'text', width: 2, text: ' ' },
{ renderer: 'progressbar', width: -80, key: 'percent' },
{ renderer: 'text', width: -20, text: '...', align: 'right' }
],
footer: [ { renderer: 'text', text: 'Press Control-C to exit ...' } ]
},
layout: [
'head',
'empty',
{ name: 'body', rows: 8 },
'foot'
]
});
dashboard.update('head', 0, 'header', {}).update('foot', 0, 'footer', {});
workers.start().on('notify', function (worker, state) {
dashboard.update('body', worker.index, 'worker', state);
});
Execute the test for a sample: npm test
When constructing a dashboard, views defines all named views for data models.
A "view" defines the rule to render one specific row in dashboard.
And it is actually an array of renderer configurations for columns.
layout simply defines the rows of the dashboard, with each item called a "slot".
A slot can be a single row, or a number of rows.
Invoke update to send data into dashboard and show on a certain row:
dashboard.update(slot, index, view, data);
Here slot and index specify which row to show the data. Use layout to determine the row.
view specify which view to use to split the data into columns and render them on the same row.
Without specifying data will clear that row.
dashboard.refresh(layout);
Without layout just redraw the whole dashboard. Otherwise reconfigure the layout and redraw.
MIT/X11
FAQs
A terminal dashboard for monitoring concurrent jobs
We found that term-dashboard demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.

Security News
GitHub Actions now supports cache-mode, a least-privilege control on the Actions cache aimed at the cache poisoning technique behind recent compromises.