* v0.0.5
** Added information about distribution in the package page.
+** Added distribution chart in the package page.
* v0.0.4
** Fixed memory issue (patch submitted by Lekensteyn).
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for ppastats 0.0.4.
+# Generated by GNU Autoconf 2.67 for ppastats 0.0.5.
#
# Report bugs to <jeanfi@gmail.com>.
#
# Identity of this package.
PACKAGE_NAME='ppastats'
PACKAGE_TARNAME='ppastats'
-PACKAGE_VERSION='0.0.4'
-PACKAGE_STRING='ppastats 0.0.4'
+PACKAGE_VERSION='0.0.5'
+PACKAGE_STRING='ppastats 0.0.5'
PACKAGE_BUGREPORT='jeanfi@gmail.com'
PACKAGE_URL='http://wpitchoune.net/ppastats'
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ppastats 0.0.4 to adapt to many kinds of systems.
+\`configure' configures ppastats 0.0.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ppastats 0.0.4:";;
+ short | recursive ) echo "Configuration of ppastats 0.0.5:";;
esac
cat <<\_ACEOF
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ppastats configure 0.0.4
+ppastats configure 0.0.5
generated by GNU Autoconf 2.67
Copyright (C) 2010 Free Software Foundation, Inc.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ppastats $as_me 0.0.4, which was
+It was created by ppastats $as_me 0.0.5, which was
generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
# Define the identity of the package.
PACKAGE='ppastats'
- VERSION='0.0.4'
+ VERSION='0.0.5'
cat >>confdefs.h <<_ACEOF
-
ac_config_files="$ac_config_files Makefile src/Makefile tests/Makefile www/Makefile"
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ppastats $as_me 0.0.4, which was
+This file was extended by ppastats $as_me 0.0.5, which was
generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ppastats config.status 0.0.4
+ppastats config.status 0.0.5
configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
<a href=\"index.html\">\n\
<span id=\"ppa_owner\">N/A</span>/<span id=\"ppa_name\">N/A</span>\n\
</a></p>\n\
- <div id=\"chart\"></div>\n\
+ <div id=\"charts\">\n\
+ <div id=\"chart\"></div>\n\
+ <div id=\"chart_distro\"></div>\n\
+ </div>\n\
<div id=\"details\">\n\
<div id=\"versions\"><em>Versions:</em></div>\n\
<div id=\"distros\"><em>Distros:</em></div>\n\
(json_distro,
"count",
json_object_new_int(distro->download_count));
+
+ json_add_ddts(json_distro, distro->ddts);
+
distros++;
}
}
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4.
-.TH PPASTATS "1" "September 2011" "ppastats 0.0.4" "User Commands"
+.TH PPASTATS "1" "September 2011" "ppastats 0.0.5" "User Commands"
.SH NAME
ppastats \- PPA Statistics command line tool
.SH SYNOPSIS
d->name = strdup(name);
d->archs = NULL;
d->download_count = 0;
+ d->ddts = NULL;
return d;
}
static void
pkg_add_distro(struct package_stats *pkg,
const char *distro_name,
- int distro_count)
+ int distro_count,
+ struct daily_download_total **ddts)
{
struct distro_stats **pkg_distros, *pkg_distro;
}
pkg_distro->download_count += distro_count;
+ pkg_distro->ddts = add_totals(pkg_distro->ddts, ddts);
}
struct ppa_stats *
arch = get_arch_stats(distro, arch_series->architecture_tag);
arch->download_count += count;
- pkg_add_distro(pkg, distro_series->name, count);
+ pkg_add_distro(pkg, distro_series->name, count, totals);
daily_download_total_list_free(totals);
struct arch_stats **archs;
int download_count;
+ struct daily_download_total **ddts;
};
struct version_stats {
text-decoration: underline;
}
-#chart {
+#charts {
color: #000;
float: right;
width: 80%;
});
}
+function ppastats_distros(distros) {
+ var data_chart = [];
+ var max_date = null;
+ var min_date = null;
+ var series_opt = [];
+
+ $.each(distros, function(i, distro) {
+ var arr = [];
+
+ $.each(distro["ddts"], function(j, item) {
+ var tm = item["time"];
+ var d = new Date(tm[0], tm[1]-1, tm[2]);
+ var entry = [d, item["value"]];
+ arr.push(entry);
+
+ if (max_date == null || max_date < d) {
+ max_date = d;
+ }
+
+ if (min_date == null || min_date > d) {
+ min_date = d;
+ }
+ });
+ data_chart[i] = arr;
+ series_opt[i] = {label: distro["name"]};
+ });
+
+ var plot1 = $.jqplot ('chart_distro', data_chart, {
+ title: 'Daily Download Count by Ubuntu Distribution',
+ axes: {
+ xaxis: {
+ renderer:$.jqplot.DateAxisRenderer,
+ tickOptions:{formatString:'%Y/%m/%d'},
+ min: min_date,
+ max: max_date
+ },
+ yaxis: {
+ min: 0
+ }
+ },
+ seriesDefaults: {
+ lineWidth:1,
+ showMarker:false
+ },
+ legend: {
+ show: true
+ },
+ series: series_opt
+ });
+}
+
+
function ppastats_pkg() {
$(document).ready(function() {
$("#ppa_owner").html(data["ppa_owner"]);
ppastats_chart(data["ddts"]);
+ ppastats_distros(data["distros"]);
});
}