forked from hasgeek/hasjob
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Open company links in a new window or tab.
- Loading branch information
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{% extends "inc/layout.html" %} | ||
{% from "inc/forms.html" import renderfield %} | ||
{% block title %}Job listing statistics{% endblock %} | ||
{% block content %} | ||
<div id="sheet"> | ||
<div class="section first"> | ||
<h1> | ||
{{ self.title()|e }} | ||
</h1> | ||
<p class="caption"> | ||
Nice charts on jobs listed on this site. | ||
</p> | ||
</div> | ||
<div class="section"> | ||
<h2>Listings by date</h2> | ||
<div class="chart" id="listings-by-date" style="height: 300px"> | ||
</div> | ||
</div> | ||
<div class="section"> | ||
<h2>Listings by type</h2> | ||
<div class="chart" id="listings-by-type" style="height: 300px"> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} | ||
{% block footerscripts %} | ||
<script type="text/javascript" src="{{ url_for('static', filename='js/libs/jquery.flot.min.js') }}"></script> | ||
<script type="text/javascript"> | ||
$(function () { | ||
|
||
var onListingsByDate = function (source) { | ||
$.plot($("#listings-by-date"), source.data, source.options); | ||
}; | ||
|
||
$.ajax({ | ||
url: '{{url_for("stats_listings_by_date") }}', | ||
method: 'GET', | ||
dataType: 'json', | ||
success: onListingsByDate | ||
}); | ||
|
||
var onListingsByType = function (source) { | ||
console.log(source.data); | ||
$.plot($("#listings-by-type"), source.data, source.options); | ||
}; | ||
|
||
$.ajax({ | ||
url: '{{url_for("stats_listings_by_type") }}', | ||
method: 'GET', | ||
dataType: 'json', | ||
success: onListingsByType | ||
}); | ||
|
||
}); | ||
</script> | ||
|
||
{% endblock %} |