lib/cli/jenkins.js
function dashboard(cb) {
  return function (args) {
    function resultCb(result) {
      var jobs = result.jobs;
      if (_.isEmpty(jobs)) {
        console.log(text.__('Jobless Jenkins'));
      } else {
        jobs.forEach(function (job) {
          var status = util.statusByColor(job.color);
          var color  = util.colorByStatus(status, job.color);
          console.log('%s - %s', text.__(status)[color], job.name);
        });
      }
    }
    function jenkinsCb(jenkins) {
      jenkins.info(cli.exitCb(null, resultCb));
    }
    cb(args, jenkinsCb);
  };
}
function dashboard(cb) {
  return function (args) {
    function resultCb(result) {
      var jobs = result.jobs;
      if (_.isEmpty(jobs)) {
        console.log(text.__('Jobless Jenkins'));
      } else {
        jobs.forEach(function (job) {
          var status = util.statusByColor(job.color);
          var color  = util.colorByStatus(status, job.color);
          console.log('%s - %s', text.__(status)[color], job.name);
        });
      }
    }
    function jenkinsCb(jenkins) {
      jenkins.info(cli.exitCb(null, resultCb));
    }
    cb(args, jenkinsCb);
  };
}
function dashboard ( cb ) { return function ( args ) { function resultCb ( result ) { var jobs = result . jobs ; if ( _ . isEmpty ( jobs ) ) { console . log ( text . __ ( 'Jobless Jenkins' ) ) ; } else { jobs . forEach ( function ( job ) { var status = util . statusByColor ( job . color ) ; var color = util . colorByStatus ( status , job . color ) ; console . log ( '%s - %s' , text . __ ( status ) [ color ] , job . name ) ; } ) ; } } function jenkinsCb ( jenkins ) { jenkins . info ( cli . exitCb ( null , resultCb ) ) ; } cb ( args , jenkinsCb ) ; } ; }
Get a handler that calls Jenkins API to get a list of all jobs on the Jenkins instance.

@param {Function} cb: callback for argument handling
@return Jenkins API handler function
Get a handler that calls Jenkins API to get a list of all jobs on the Jenkins instance .