This is an automated email from the ASF dual-hosted git repository. jfthomps pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/vcl.git
The following commit(s) were added to refs/heads/develop by this push: new 9c7c26e VCL-1111 - statgraphcache table not correctly being used 9c7c26e is described below commit 9c7c26ea18792008f7c599c6d90a067a0dc30273 Author: Josh Thompson <jftho...@ncsu.edu> AuthorDate: Thu Jan 31 11:01:42 2019 -0500 VCL-1111 - statgraphcache table not correctly being used statistics.php: modified getStatGraphDayData, getStatGraphDayConUsersData, getStatGraphConBladeUserData, and getStatGraphConVMUserData: modified query to allow for provisioningid to be NULL or 0 if searching for any provisioningid --- web/.ht-inc/statistics.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/web/.ht-inc/statistics.php b/web/.ht-inc/statistics.php index cd85fda..f30998f 100644 --- a/web/.ht-inc/statistics.php +++ b/web/.ht-inc/statistics.php @@ -678,6 +678,9 @@ function getStatGraphDayData($start, $end, $affilid, $mode, $provid) { $addcache = array(); $reloadid = getUserlistID('vclreload@Local'); $cnt = 0; + $prov = "provisioningid = $provid"; + if($provid == 0) + $prov = "(provisioningid IS NULL OR provisioningid = 0)"; $query = "SELECT statdate, " . "value " . "FROM statgraphcache " @@ -685,7 +688,7 @@ function getStatGraphDayData($start, $end, $affilid, $mode, $provid) { . "affiliationid = $affilid AND " . "statdate >= '$start' AND " . "statdate <= '$end' AND " - . "provisioningid = $provid"; + . "$prov"; $qh = doQuery($query, 101); while($row = mysqli_fetch_assoc($qh)) $cachepts[$row['statdate']] = $row['value']; @@ -947,6 +950,9 @@ function getStatGraphDayConUsersData($start, $end, $affilid, $mode, $provid) { $reloadid = getUserlistID('vclreload@Local'); $cnt = 0; + $prov = "provisioningid = $provid"; + if($provid == 0) + $prov = "(provisioningid IS NULL OR provisioningid = 0)"; $query = "SELECT statdate, " . "value " . "FROM statgraphcache " @@ -954,7 +960,7 @@ function getStatGraphDayConUsersData($start, $end, $affilid, $mode, $provid) { . "affiliationid = $affilid AND " . "statdate >= '$start' AND " . "statdate <= '$end' AND " - . "provisioningid = $provid"; + . "$prov"; $qh = doQuery($query, 101); while($row = mysqli_fetch_assoc($qh)) $cachepts[$row['statdate']] = $row['value']; @@ -1095,6 +1101,9 @@ function getStatGraphConBladeUserData($start, $end, $affilid, $mode, $provid) { $reloadid = getUserlistID('vclreload@Local'); $cnt = 0; + $prov = "provisioningid = $provid"; + if($provid == 0) + $prov = "(provisioningid IS NULL OR provisioningid = 0)"; $query = "SELECT statdate, " . "value " . "FROM statgraphcache " @@ -1102,7 +1111,7 @@ function getStatGraphConBladeUserData($start, $end, $affilid, $mode, $provid) { . "affiliationid = $affilid AND " . "statdate >= '$start' AND " . "statdate <= '$end' AND " - . "provisioningid = $provid"; + . "$prov"; $qh = doQuery($query, 101); while($row = mysqli_fetch_assoc($qh)) $cachepts[$row['statdate']] = $row['value']; @@ -1277,6 +1286,9 @@ function getStatGraphConVMUserData($start, $end, $affilid, $mode, $provid) { $reloadid = getUserlistID('vclreload@Local'); $cnt = 0; + $prov = "provisioningid = $provid"; + if($provid == 0) + $prov = "(provisioningid IS NULL OR provisioningid = 0)"; $query = "SELECT statdate, " . "value " . "FROM statgraphcache " @@ -1284,7 +1296,7 @@ function getStatGraphConVMUserData($start, $end, $affilid, $mode, $provid) { . "affiliationid = $affilid AND " . "statdate >= '$start' AND " . "statdate <= '$end' AND " - . "provisioningid = $provid"; + . "$prov"; $qh = doQuery($query, 101); while($row = mysqli_fetch_assoc($qh)) $cachepts[$row['statdate']] = $row['value'];