Skip to content

Commit

Permalink
feature: add id column in stacked mode (80 char mode)
Browse files Browse the repository at this point in the history
  • Loading branch information
wallet77 committed Aug 20, 2018
1 parent 98f49dc commit 83033d4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/API/CliUx.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ UX.describeTable = function(process) {
*/
UX.dispAsTable = function(list, commander) {
var stacked = (process.stdout.columns || 90) < 90;
var app_head = stacked ? ['Name', 'mode', 'status', '↺', 'cpu', 'memory'] :
var app_head = stacked ? ['Name', 'id', 'mode', 'status', '↺', 'cpu', 'memory'] :
['App name', 'id', 'mode', 'pid', 'status', 'restart', 'uptime', 'cpu', 'mem', 'user', 'watching'];
var mod_head = stacked ? ['Module', 'status', 'cpu', 'mem'] :
['Module', 'version', 'target PID', 'status', 'restart', 'cpu', 'memory', 'user'];
Expand Down Expand Up @@ -302,8 +302,7 @@ UX.dispAsTable = function(list, commander) {
obj[key] = [];

// PM2 ID
if (!stacked)
obj[key].push(l.pm2_env.pm_id);
obj[key].push(l.pm2_env.pm_id);

// Exec mode
obj[key].push(mode == 'fork_mode' ? chalk.inverse.bold('fork') : chalk.blue.bold('cluster'));
Expand Down

0 comments on commit 83033d4

Please sign in to comment.