diff options
author | Dan McGee <dan@archlinux.org> | 2011-10-05 22:45:44 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-10-05 22:45:44 +0200 |
commit | d5063bd1d2cae79df7ce6e826c7413fed61ff9db (patch) | |
tree | c2e80d2cdcd1407ee5e65a2d3dd5f5d58a78d63b /templates/visualize | |
parent | e157f942e96ba827aebf08dd253c866fec88beaa (diff) | |
download | archweb-d5063bd1d2cae79df7ce6e826c7413fed61ff9db.tar.gz archweb-d5063bd1d2cae79df7ce6e826c7413fed61ff9db.tar.xz |
Add package visualizations page
Why the hell not? Have fun clicking all the pretty buttons.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates/visualize')
-rw-r--r-- | templates/visualize/index.html | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/templates/visualize/index.html b/templates/visualize/index.html new file mode 100644 index 0000000..99525e6 --- /dev/null +++ b/templates/visualize/index.html @@ -0,0 +1,43 @@ +{% extends "base.html" %} + +{% block title %}Arch Linux - Visualizations{% endblock %} + +{% block content %} +<div class="box"> + + <h2>Visualizations of Packaging Data</h2> + + <h3>Package Treemap</h3> + + <div class="visualize-buttons"> + <div> + <span>Scale Using:</span> + <button id="visualize-archrepo-count" class="visualize-archrepo-scaleby active">Package Count</button> + <button id="visualize-archrepo-flagged" class="visualize-archrepo-scaleby">Flagged</button> + <button id="visualize-archrepo-csize" class="visualize-archrepo-scaleby">Compressed Size</button> + <button id="visualize-archrepo-isize" class="visualize-archrepo-scaleby">Installed Size</button> + </div> + <div> + <span>Group By:</span> + <button id="visualize-archrepo-repo" class="visualize-archrepo-groupby active">Repository</button> + <button id="visualize-archrepo-arch" class="visualize-archrepo-groupby">Architecture</button> + </div> + </div> + <div id="visualize-archrepo" class="visualize-chart"></div> +</div> + +{% load cdn %}{% jquery %} +<script type="text/javascript" src="/media/d3.min.js"></script> +<script type="text/javascript" src="/media/d3.layout.min.js"></script> +<script type="text/javascript" src="/media/archweb.js"></script> +<script type="text/javascript" src="/media/visualize.js"></script> +<script type="text/javascript"> +$(document).ready(function() { + var orderings = { + "repo": { url: "{% url visualize-byrepo %}", color_attr: "repo" }, + "arch": { url: "{% url visualize-byarch %}", color_attr: "arch" }, + }; + packages_treemap("#visualize-archrepo", orderings, "repo"); +}); +</script> +{% endblock %} |