Skip to content

Commit

Permalink
Made changes in tutorial and changes for redis db
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Apr 26, 2012
1 parent 0151fe9 commit 64bd256
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
16 changes: 5 additions & 11 deletions templates/ui/home.html
Expand Up @@ -27,17 +27,11 @@
<div class='font-set'>
<h1>Graphos Examples</h1>
<p class='font-set'>
Graphos is a helper library for django to plot data into a live graph, fetching data from a modelfield or a redis list.

Just use a templatetag and specify which model you what to plot, and add jquery.js and jquery.plot.js to your base.html, you are done. You can tweak with extra options to the tag.

As of now, this is just a proof of concept design. Missing a lot of functional implementations a lot code refactoring.
Graphos is a helper library for django to plot data into a live graph, fetching data from a modelfield or a redis list. Just use a templatetag and specify which model you what to plot, and add jquery.js and jquery.plot.js to your base.html, you are done. You can tweak with extra options to the tag. As of now, this is just a proof of concept design. Missing a lot of functional implementations a lot code refactoring.
</p>
<h2>HOW TO TRY</h2>
<br>

syncdb, runserver, and click on the add data to see the magic.
Or even, try POST to / with curl, and graph gets plotted automatically.
<p class='font-set'>You can update a chart, in real-time.</p>
<p class='control-group success font-set'>You can update a chart, in real-time.</p>



Expand All @@ -51,8 +45,8 @@ <h2>Django Model field TimeSeries Plot</h2>
<br>
<br>
<h2>Redis List TimeSeries Plot</h2><br>
{{ "{% plot_redis_series '2' 'seashell' 'graphos' '200' '100' '1000' '800' '200' '##5BC0DE' "|add:"%}" }}
{% plot_redis_series '2' 'seashell' 'graphos' '200' '100' '1000' '800' '200' '##5BC0DE'%}
{{ "{% plot_redis_series '2' 'localhost' 'graphos' '200' '100' '1000' '800' '200' '##5BC0DE' "|add:"%}" }}
{% plot_redis_series '2' 'localhost' 'graphos' '200' '100' '1000' '800' '200' '##5BC0DE'%}
<!--
This is where magic happens.
-->
Expand Down
13 changes: 7 additions & 6 deletions templates/ui/tutorial.html
Expand Up @@ -27,7 +27,7 @@
<h1>Graphos Tutorial</h1>
<p class='font-set'>
<p>
You can use graphos to plot any <strong><em>integer or float &nbsp;</em></strong>values to a nice time-series without any hazzle.</p>
You can use graphos to plot any <strong><em>integer or float &nbsp;</em></strong>values to a nice time-series without any hazzle, from a django model or from a redis list.</p>
<p>
&nbsp;</p>
<p>
Expand Down Expand Up @@ -92,7 +92,7 @@ <h4>
<br>
<br>
<strong>{{ "{% plot_model_series 'id' 'x_model_name' 'x_field_name' 'count' 'y_max' 'frequency' 'width' 'height' 'color' "|add:"%}" }}</strong>
<br>
<br><br>
&nbsp; &nbsp; id : a unique identifier within the django project.
<div>
&nbsp; &nbsp; x_model_name : name of the model in which data to be plotted is stored</div>
Expand All @@ -117,8 +117,9 @@ <h4>
PLOTTING REDIS LISTS</h4>
<br><br>
<div>
{{ "{% plot_redis_series 'id' 'redis_servername' 'redis_list' 'count' 'y_max' 'frequency' 'width' 'height' 'color' "|add:"%}" }}
<strong>{{ "{% plot_redis_series 'id' 'redis_servername' 'redis_list' 'count' 'y_max' 'frequency' 'width' 'height' 'color' "|add:"%}" }}</strong>
</div>
<br><br>
<div>
&nbsp; &nbsp; id : a unique identifier within the django project</div>
<div>
Expand Down Expand Up @@ -156,12 +157,12 @@ <h2>Django Model field TimeSeries Plot</h2>
<br>
<br>
<h2>Redis List TimeSeries Plot</h2><br>
{{ "{% plot_redis_series '2' 'seashell' 'graphos' '200' '100' '1000' '800' '200' '##5BC0DE' "|add:"%}" }}
{% plot_redis_series '2' 'seashell' 'graphos' '200' '100' '1000' '800' '200' '#5BC0DE'%}
{{ "{% plot_redis_series '2' 'localhost' 'graphos' '200' '100' '1000' '800' '200' '##5BC0DE' "|add:"%}" }}
{% plot_redis_series '2' 'localhost' 'graphos' '200' '100' '1000' '800' '200' '#5BC0DE'%}
<!--
This is where magic happens.
-->
<br>
<button class='redis_button btn btn-info'> Add Redis Data </button>
</div>
{% endblock %}
{% endblock %}

0 comments on commit 64bd256

Please sign in to comment.