/** * returns all users * * @param boolean $include_docs if set to true, users documents will also be included * @return array users array : each row is a stdObject with "id", "rev" and optionally "doc" properties */ public function getAllUsers($include_docs = false) { $client = new couchClient($this->client->dsn(), $this->userdb, $this->client->options()); if ($include_docs) { $client->include_docs(true); } return $client->startkey("org.couchdb.user:"******"org.couchdb.user;")->getAllDocs()->rows; }
?> </a> <----</a> Go to ----><a href="#" onclick='getJobsListing("<?php print $_GET['search_type'] . "\",\"" . $next_timeperiod; ?> "); return false;'><?php print $next_timeperiod; ?> </a> <?php // view fetching, using the view option limit try { $start_time = $unixtime; $end_time = $start_time + 86400; $client->startkey($start_time); $client->endkey($end_time); $view = $client->limit(100)->asArray()->getView('cronview', 'by_unixtime'); } catch (Exception $e) { echo "ERROR while getting view contents: " . $e->getMessage() . "<BR>\n"; } ############################################################## # Did we get any response for the key we were looking for ############################################################## if (sizeof($view["rows"]) > 0) { if (isset($_GET['search_type']) && $_GET['search_type'] == "errors") { print "<p><h2>Displaying jobs that ran on " . date("Y-m-d", $unixtime) . " and had errors</h2><p>"; } print "\n <table cellspacing=1 class=tablesorter border=1>\n <thead>\n <tr><th>Start time</th><th>Job duration</th><th>Return code</th>\n <th>Username</th><th>Hostname</th><th>Command</th>\n <th>StdOut (Bytes)</th><th>StdErr (Bytes)</th>\n </tr>\n </thead>\n <tbody>"; foreach ($view["rows"] as $key => $row) { if (isset($_GET['search_type']) && $_GET['search_type'] == "errors") {