var _ = require('lodash');
var store = require('../store');

module.exports.listAllPorts = function(req, res) {
    var list = [];

    Object.keys(store.ports).forEach(function(port) {
        var portData = store.ports[port];
        list.push({
            port: portData.port,
            connected: _.size(portData.sockets),
            ready: portData.ready,
            pending: portData.pending,
            queueTotal: portData.q_total,
            queueExecuted: portData.q_executed,
            gcode: portData.gcode
        });
    });

    res.send(list);
};

@@ -418,33 +418,61 @@
 ueue
-Total: portData.q_total,%0A
+: %7B%0A                size: portData.queue.size(),%0A    
     
@@ -483,14 +483,9 @@
     
-queueE
+e
 xecu
@@ -503,17 +503,21 @@
 ta.q
-_
+ueue.
 executed
 ,%0A  
@@ -512,16 +512,87 @@
 executed
+(),%0A                isRunning: portData.queue.isRunning()%0A            %7D
 ,%0A      

Update ports api