Index: trunk/tools/editor_trends/wikilytics/templates/analyses_available.html |
— | — | @@ -1,16 +0,0 @@ |
2 | | -{% extends "base.html" %} |
3 | | - |
4 | | - |
5 | | -{% block content %} |
6 | | - |
7 | | - {% if analyses %} |
8 | | - <ul> |
9 | | - {% for analysis in analyses %} |
10 | | - {{ analysis }} |
11 | | - <li><a href="{{ analysis.get_absolute_url }}">{{ analysis.hash }}</a></li> |
12 | | - {% endfor %} |
13 | | - </ul> |
14 | | - {% endif %} |
15 | | - |
16 | | - |
17 | | -{% endblock %} |
\ No newline at end of file |
Index: trunk/tools/editor_trends/wikilytics/templates/queue.html |
— | — | @@ -1,25 +0,0 @@ |
2 | | -{% extends "base.html" %} |
3 | | - |
4 | | - |
5 | | -{% block content %} |
6 | | -<h1>Job Status</h1> |
7 | | - {% if jobs %} |
8 | | - {% for job in jobs %} |
9 | | - <ul> |
10 | | - <li>Project: {{ job.project }}</li> |
11 | | - <li>Language: {{ job.language }}</li> |
12 | | - <li>Created: {{ job.created }}</li> |
13 | | - <li>Finished: {{ job.finished }}</li> |
14 | | - <li>In progress: {{ job.in_progress }}</li> |
15 | | - </ul> |
16 | | - {% for subtasks in job.tasks %} |
17 | | - |
18 | | - {% endfor %} |
19 | | - {% endfor %} |
20 | | - <h2>Please return in a couple of hours, the dataset will be finished by then.<h2> |
21 | | - |
22 | | - {% else %} |
23 | | - <h2> There are currently no jobs in the queue.</h2> |
24 | | - {% endif %} |
25 | | - |
26 | | -{% endblock %} |
\ No newline at end of file |
Index: trunk/tools/editor_trends/wikilytics/templates/datasets_available.html |
— | — | @@ -1,30 +0,0 @@ |
2 | | -{% extends "base.html" %} |
3 | | - |
4 | | - |
5 | | -{% block content %} |
6 | | - {% if datasets %} |
7 | | - {% for dataset in datasets %} |
8 | | - <h1>Dataset {{ dataset.name }}</h1> |
9 | | - <ul> |
10 | | - <li>{{ dataset.project }} </li> |
11 | | - <li>{{ dataset.collection }} </li> |
12 | | - <h2>Variables</h2> |
13 | | - <ul> |
14 | | - {% for variable_name,variables in dataset.variables.items %} |
15 | | - <h3>Variable {{ variable_name }}</h3> |
16 | | - {% for key ,variable in variables.items %} |
17 | | - <h4>Observation:{{ key }}</h4> |
18 | | - {% for k, v in variable.items %} |
19 | | - <li>{{ k }}: {{ v }}</li> |
20 | | - {% endfor %} |
21 | | - {% endfor %} |
22 | | - {% endfor %} |
23 | | - </ul> |
24 | | - <ul> |
25 | | - {% endfor %} |
26 | | - |
27 | | - {% else %} |
28 | | - <h1>There are no datasets available yet.</h1> |
29 | | - {% endif %} |
30 | | - |
31 | | -{% endblock %} |
\ No newline at end of file |
Index: trunk/tools/editor_trends/wikilytics/templates/analyses.html |
— | — | @@ -0,0 +1,21 @@ |
| 2 | +{% extends "base.html" %} |
| 3 | + |
| 4 | + |
| 5 | +{% block content %} |
| 6 | + |
| 7 | + {% if analyses %} |
| 8 | + <h1>The following analyses are currently available.</h1> |
| 9 | + <ul> |
| 10 | + {% for analysis in analyses %} |
| 11 | + <li><a href="{{ analysis.get_absolute_url }}">{{ analysis.jobtype }}</a></li> |
| 12 | + {% endfor %} |
| 13 | + </ul> |
| 14 | + {% else %} |
| 15 | + <h1>There are no analyses available at this moment.</h1> |
| 16 | + <p>The dataset job is probably not finished yet.</p> |
| 17 | + |
| 18 | + |
| 19 | + {% endif %} |
| 20 | + |
| 21 | + |
| 22 | +{% endblock %} |
\ No newline at end of file |
Property changes on: trunk/tools/editor_trends/wikilytics/templates/analyses.html |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 23 | + native |
Index: trunk/tools/editor_trends/wikilytics/templates/chart.html |
— | — | @@ -2,54 +2,65 @@ |
3 | 3 | |
4 | 4 | |
5 | 5 | {% block js %} |
| 6 | + {% if not queue %} |
| 7 | + <script src="/static/js/jquery-1.4.4.min.js" type="text/javascript"></script> |
| 8 | + <script type="text/javascript" src="/static/js/jquery.flot.js"></script> |
| 9 | + <script type="text/javascript" src="/static/js/jquery.flot.stack.js"></script> |
| 10 | + |
| 11 | + <script type="text/javascript"> |
| 12 | + $(document).ready(function() { |
| 13 | + $.ajax({ |
| 14 | + url: '{{ url }}', |
| 15 | + dataType: 'json', |
| 16 | + data: 'json', |
| 17 | + contentType: 'application/json; charset=utf-8', |
| 18 | + success: function(json){ |
| 19 | + var data = json['data']; |
| 20 | + var options = json['options']; |
| 21 | + var css_id = "#wikilytics"; |
| 22 | + console.log(options); |
| 23 | + //$.plot($(css_id), data, options); |
| 24 | + } |
| 25 | + }); |
| 26 | + |
| 27 | + $(function () { |
| 28 | + |
| 29 | + var css_id = "#placeholder2"; |
| 30 | + var data = [ |
| 31 | + {label: 'foo', data: [[1,300], [2,300], [3,300], [4,300], [5,300]]}, |
6 | 32 | |
7 | | - <script src="/static/js/jquery-1.4.4.min.js" type="text/javascript"></script> |
8 | | - <script type="text/javascript" src="/static/js/jquery.flot.js"></script> |
9 | | - <script type="text/javascript" src="/static/js/jquery.flot.stack.js"></script> |
| 33 | + ]; |
10 | 34 | |
11 | | - <script type="text/javascript"> |
12 | | - $(document).ready(function() { |
13 | | - |
14 | | - |
15 | | - $.ajax({ |
16 | | - url: '{{ url }}', |
17 | | - dataType: 'json', |
18 | | - data: 'json', |
19 | | - contentType: 'application/json; charset=utf-8', |
20 | | - success: function(json){ |
21 | | - var data = json['data']; |
22 | | - var options = json['options']; |
23 | | - var css_id = "#wikilytics"; |
24 | | - console.log(options); |
25 | | - $.plot($(css_id), data, options); |
26 | | - } |
| 35 | + var options = { |
| 36 | + series: {stack: 0, |
| 37 | + lines: {show: false, steps: false }, |
| 38 | + bars: {show: true, barWidth: 0.9, align: 'center',},}, |
| 39 | + xaxis: {ticks: [[1,'One'], [2,'Two'], [3,'Three'], [4,'Four'], [5,'Five']]}, |
| 40 | + }; |
| 41 | + console.log(options); |
| 42 | + $.plot($(css_id), data, options); |
27 | 43 | }); |
28 | | - |
29 | | - $(function () { |
30 | | - |
31 | | - var css_id = "#placeholder2"; |
32 | | - var data = [ |
33 | | - {label: 'foo', data: [[1,300], [2,300], [3,300], [4,300], [5,300]]}, |
34 | | - {label: 'bar', data: [[1,800], [2,600], [3,400], [4,200], [5,0]]}, |
35 | | - {label: 'baz', data: [[1,100], [2,200], [3,300], [4,400], [5,500]]}, |
36 | | - ]; |
37 | | - |
38 | | - var options = { |
39 | | - series: {stack: 0, |
40 | | - lines: {show: false, steps: false }, |
41 | | - bars: {show: true, barWidth: 0.9, align: 'center',},}, |
42 | | - xaxis: {ticks: [[1,'One'], [2,'Two'], [3,'Three'], [4,'Four'], [5,'Five']]}, |
43 | | - }; |
44 | | - console.log(options); |
45 | | - $.plot($(css_id), data, options); |
46 | | - |
47 | | - }); |
48 | | - |
49 | | - }); |
50 | | - </script> |
| 44 | + }); |
| 45 | + </script> |
| 46 | + {% endif %} |
51 | 47 | {% endblock %} |
52 | 48 | |
53 | 49 | {% block content %} |
54 | | -<div id="wikilytics" style="width:1000px;height:400px;"></div> |
| 50 | +{% if queue %} |
| 51 | + <h1>We are currently gathering the data for the {{ chart }} chart.</h1> |
| 52 | + <p>This should be finished in a couple of minutes (depending on the size |
| 53 | + of the project and the length of the queue).</p> |
| 54 | +{% else %} |
| 55 | + <div id="placeholder2" style="width:1000px;height:400px;"></div> |
| 56 | + <div id="wikilytics" style="width:1000px;height:400px;"></div> |
| 57 | +{% endif %} |
55 | 58 | |
| 59 | + {% if analysis %} |
| 60 | + <form method='POST' action=''> |
| 61 | + {% csrf_token %} |
| 62 | + {{ analysis }} |
| 63 | + <input type="submit" value="Show"> |
| 64 | + </form> |
| 65 | + {% endif %} |
| 66 | + |
56 | 67 | {% endblock %} |
\ No newline at end of file |
Index: trunk/tools/editor_trends/wikilytics/templates/datasets.html |
— | — | @@ -0,0 +1,52 @@ |
| 2 | +{% extends "base.html" %} |
| 3 | + |
| 4 | + |
| 5 | +{% block content %} |
| 6 | + {% if datasets %} |
| 7 | + <h1> Available Datasets</h1> |
| 8 | + {% for dataset in datasets %} |
| 9 | + <h1>Dataset {{ dataset.name }}</h1> |
| 10 | + <ul> |
| 11 | + <li>{{ dataset.project }} </li> |
| 12 | + <li>{{ dataset.collection }} </li> |
| 13 | + <h2>Variables</h2> |
| 14 | + <ul> |
| 15 | + {% for variable_name,variables in dataset.variables.items %} |
| 16 | + <h3>Variable {{ variable_name }}</h3> |
| 17 | + {% for key ,variable in variables.items %} |
| 18 | + <h4>Observation:{{ key }}</h4> |
| 19 | + {% for k, v in variable.items %} |
| 20 | + <li>{{ k }}: {{ v }}</li> |
| 21 | + {% endfor %} |
| 22 | + {% endfor %} |
| 23 | + {% endfor %} |
| 24 | + </ul> |
| 25 | + <ul> |
| 26 | + {% endfor %} |
| 27 | + |
| 28 | + {% else %} |
| 29 | + <h1>There are no datasets available yet.</h1> |
| 30 | + {% endif %} |
| 31 | + |
| 32 | + |
| 33 | + {% if jobs %} |
| 34 | + <h1>Job Status</h1> |
| 35 | + {% for job in jobs %} |
| 36 | + <ul> |
| 37 | + <li>Project: {{ job.project }}</li> |
| 38 | + <li>Language: {{ job.language }}</li> |
| 39 | + <li>Created: {{ job.created }}</li> |
| 40 | + <li>Finished: {{ job.finished }}</li> |
| 41 | + <li>In progress: {{ job.in_progress }}</li> |
| 42 | + </ul> |
| 43 | + {% for subtasks in job.tasks %} |
| 44 | + |
| 45 | + {% endfor %} |
| 46 | + {% endfor %} |
| 47 | + <h2>Please return in a couple of hours, the dataset will be finished by then.<h2> |
| 48 | + |
| 49 | + {% else %} |
| 50 | + <h2> There are currently no jobs in the queue.</h2> |
| 51 | + {% endif %} |
| 52 | + |
| 53 | +{% endblock %} |
\ No newline at end of file |
Property changes on: trunk/tools/editor_trends/wikilytics/templates/datasets.html |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 54 | + native |