Skip to content

Commit

Permalink
(dashboard) somes small changes + new screenshot
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech committed Feb 5, 2017
1 parent 2e6ed64 commit 063ed6f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 2.4.0

- #2631 new pm2 monit command (blessed dashboard!)
- #2670 allow to expose a folder over http via `pm2 serve <path> <port>`
- #2617 fix startup script generation on macosx (launchd)
- #2650 new option to append env name to app name (used to allow the same app to be launched in different environement w/o name conflict)
Expand Down
22 changes: 12 additions & 10 deletions lib/API/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ var DEFAULT_PADDING = {
right : 1
};

var WIDTH_LEFT_PANEL = 30;

/**
* Synchronous Dashboard init method
* @method init
Expand All @@ -37,9 +39,9 @@ Dashboard.init = function() {
this.list = blessed.list({
top: '0',
left: '0',
width: '35%',
width: WIDTH_LEFT_PANEL + '%',
height: '70%',
padding: DEFAULT_PADDING,
padding: 0,
scrollbar: {
ch: ' ',
inverse: false
Expand Down Expand Up @@ -71,9 +73,9 @@ Dashboard.init = function() {

this.logBox = blessed.box({
label: ' Global Logs ',
top: '0%',
left: '35%',
width: '65%',
top: '0',
left: WIDTH_LEFT_PANEL + '%',
width: 100 - WIDTH_LEFT_PANEL + '%',
height: '70%',
padding: DEFAULT_PADDING,
scrollable: true,
Expand Down Expand Up @@ -102,8 +104,8 @@ Dashboard.init = function() {
this.metadataBox = blessed.box({
label: ' Metadata ',
top: '70%',
left: '35%',
width: '65%',
left: WIDTH_LEFT_PANEL + '%',
width: 100 - WIDTH_LEFT_PANEL + '%',
height: '26%',
padding: DEFAULT_PADDING,
scrollable: true,
Expand All @@ -130,10 +132,10 @@ Dashboard.init = function() {
});

this.metricsBox = blessed.list({
label: ' Custom metrics {#444-fg}http://bit.ly/code-metrics{/}',
label: ' Custom metrics {#444-fg}(http://bit.ly/code-metrics){/} ',
top: '70%',
left: '0%',
width: '35%',
width: WIDTH_LEFT_PANEL + '%',
height: '26%',
padding: DEFAULT_PADDING,
scrollbar: {
Expand Down Expand Up @@ -263,7 +265,7 @@ Dashboard.refresh = function(processes) {
var name = processes[i].pm2_env.name || p.basename(processes[i].pm2_env.pm_exec_path);

// Line of list
var item = sprintf('[%2d] %s {|} Mem: {bold}{%s-fg}%3d{/} MB CPU: {bold}{%s-fg}%2d{/} %s %s',
var item = sprintf('[%2s] %s {|} Mem: {bold}{%s-fg}%3d{/} MB CPU: {bold}{%s-fg}%2d{/} %s %s',
processes[i].pm2_env.pm_id,
name,
gradient(memPercent, [255, 0, 0], [0, 255, 0]),
Expand Down
Binary file modified pres/pm2-monit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 063ed6f

Please sign in to comment.