nl_tokens: Parses the teraslice client endpoint responses into an array used to generate tables in command line output .
pl_tokens: async function parseResponse ( header , response , active = false , id ) { const rows = [ ] ; _ . each ( response , ( value , key ) => { let row = [ ] ; if ( active ) { _ . each ( response [ key ] . active , ( activeValue ) => { row = [ ] ; // filter by id if ( id === undefined || activeValue . job_id === id || activeValue . ex_id === id ) { _ . each ( header , ( item ) => { if ( item === 'teraslice_version' ) { row . push ( response [ key ] . teraslice_version ) ; } else if ( item === 'node_id' ) { row . push ( response [ key ] . node_id ) ; } else if ( item === 'hostname' ) { row . push ( response [ key ] . hostname ) ; } else if ( item === 'node_version' ) { row . push ( response [ key ] . node_version ) ; } else { row . push ( activeValue [ item ] ) ; } } ) ; rows . push ( row ) ; } } ) ; } else { _ . each ( header , ( item ) => { if ( item === 'active' ) { row . push ( response [ key ] [ item ] . length ) ; } else { row . push ( response [ key ] [ item ] ) ; } } ) ; rows . <mask> ( row ) ; } } ) ; return rows ; }