diff options
author | Filipp Lepalaan <filipp@mac.com> | 2015-08-04 10:11:24 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2015-08-04 10:11:24 +0300 |
commit | 63b0fc6269b38edf7234b9f151b80d81f614c0a3 (patch) | |
tree | 555de3068f33f8dddb4619349bbea7d9b7c822fd /servo/templates/stats | |
download | Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.gz Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.bz2 Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.zip |
Initial commit
First public commit
Diffstat (limited to 'servo/templates/stats')
-rwxr-xr-x | servo/templates/stats/index.html | 68 | ||||
-rwxr-xr-x | servo/templates/stats/locations.html | 33 | ||||
-rw-r--r-- | servo/templates/stats/newstats.html | 87 | ||||
-rwxr-xr-x | servo/templates/stats/plot_snippet.html | 9 | ||||
-rwxr-xr-x | servo/templates/stats/queues.html | 29 | ||||
-rwxr-xr-x | servo/templates/stats/sales.html | 33 | ||||
-rwxr-xr-x | servo/templates/stats/statuses.html | 21 |
7 files changed, 280 insertions, 0 deletions
diff --git a/servo/templates/stats/index.html b/servo/templates/stats/index.html new file mode 100755 index 0000000..2edc57d --- /dev/null +++ b/servo/templates/stats/index.html @@ -0,0 +1,68 @@ +{% extends "default.html" %} +{% load i18n %} + +{% block content %} + +<ul class="nav nav-tabs" style="margin-top:30px"> +{% block tabs %} + <li class="active"><a href="{% url 'stats-index' %}">{% trans "Technicians" %}</a></li> + <li><a href="{% url 'stats-locations' %}">{% trans "Locations" %}</a></li> + <li><a href="{% url 'stats-queues' %}">{% trans "Queues" %}</a></li> + <li><a href="{% url 'stats-repairs' %}">{% trans "Repairs" %}</a></li> + <li><a href="{% url 'stats-statuses' %}">{% trans "Statuses" %}</a></li> + <li><a href="{% url 'stats-sales' %}">{% trans "Sales" %}</a></li> +{% endblock tabs %} +</ul> + +<div class="row-fluid"> + <div class="span12 well"> + {% block filter_block %} + <form action="#" method="post" class="form-inline" id="stats-form"> + {% csrf_token %} + {% for field in form %} + <div class="control-group pull-left"> + <label class="control-label">{{ field.label }}</label> + <div class="controls">{{ field }}</div> + </div> + {% endfor %} + <div class="control-group"> + <label class="control-label"> </label> + <div class="controls"> + <button class="btn btn-primary pull-right" type="submit"><i class="icon-search icon-white"></i> {% trans "Search" %}</button> + </div> + </div> + </form> + {% endblock filter_block %} + </div> +</div> +<div class="row-fluid"> + <div class="span12"> + {% block stats %} + <h2>{% trans "Orders Assigned" %}</h2> + <p>{% trans "Shows how many new orders have been assigned to each technician over the given time period." %}</p> + {% include "stats/plot_snippet.html" with url="/stats/data/orders/runrate/" %} + <hr/> + <h2>{% trans "Orders Created" %}</h2> + <p>{% trans "This graph shows how many orders are checked in by each user." %}</p> + {% include "stats/plot_snippet.html" with url="/stats/data/created/user/" %} + <hr/> + <h2>{% trans "Work Distribution" %}</h2> + <p>{% trans "Shows you how the total number of service orders is distributed across the technicians at this location." %}</p> + <div class="plot plot-pie pull-left" data-source="/stats/data/orders/techs/"></div> + {% endblock stats %} + </div> +</div> + +{% endblock content %} + +{% block crumbs %} +<li class="active">{% trans "Statistics" %}</li> +{% endblock crumbs %} + +{% block media %} +<script src="{{ STATIC_URL }}js/flot/jquery.flot.min.js"></script> +<script src="{{ STATIC_URL }}js/flot/jquery.flot.time.min.js"></script> +<script src="{{ STATIC_URL }}js/flot/jquery.flot.pie.min.js"></script> +<script src="{{ STATIC_URL }}js/flot/jquery.flot.resize.min.js"></script> +<script src="{{ STATIC_URL }}js/stats.js" type="text/javascript"></script> +{% endblock media %} diff --git a/servo/templates/stats/locations.html b/servo/templates/stats/locations.html new file mode 100755 index 0000000..576da8b --- /dev/null +++ b/servo/templates/stats/locations.html @@ -0,0 +1,33 @@ +{% extends "stats/index.html" %} +{% load i18n %} + +{% block tabs %} + <li><a href="{% url 'stats-index' %}">{% trans "Technicians" %}</a></li> + <li class="active"><a href="{% url 'stats-index' %}">{% trans "Locations" %}</a></li> + <li><a href="{% url 'stats-queues' %}">{% trans "Queues" %}</a></li> + <li><a href="{% url 'stats-repairs' %}">{% trans "Repairs" %}</a></li> + <li><a href="{% url 'stats-statuses' %}">{% trans "Statuses" %}</a></li> + <li><a href="{% url 'stats-sales' %}">{% trans "Sales" %}</a></li> +{% endblock tabs %} + +{% block stats %} + <h2>{% trans "Orders Created" %}</h2> + <p>{% trans "Shows you how many orders are created at each location." %}</p> + {% include "stats/plot_snippet.html" with url="/stats/data/created/location/" %} + <hr/> + <h2>{% trans "Orders Closed" %}</h2> + <p>{% trans "Shows you how many orders have been closed at each location." %}</p> + {% include "stats/plot_snippet.html" with url="/stats/data/closed/location/" %} + <hr/> + <h2>{% trans "Average Turnaround" %}</h2> + <p>{% trans "Shows how many hours it takes to complete an order at each location." %}</p> + {% include "stats/plot_snippet.html" with url="/stats/data/turnaround/location/" %} + <hr/> + <h2>{% trans "Average Runrate" %}</h2> + <p>{% trans "Shows you how many orders people are working on at each location." %}</p> + {% include "stats/plot_snippet.html" with url="/stats/data/runrate/location/" %} + <hr/> + <h2>{% trans "Work Distribution" %}</h2> + <p>{% trans "This shows you how your overall work load is distributed across your service locations." %}</p> + <div class="plot plot-pie pull-left" data-source="/stats/data/distribution/location/"></div> +{% endblock stats %} diff --git a/servo/templates/stats/newstats.html b/servo/templates/stats/newstats.html new file mode 100644 index 0000000..1900efc --- /dev/null +++ b/servo/templates/stats/newstats.html @@ -0,0 +1,87 @@ +{% extends "default.html" %} +{% load i18n %} + +{% block content %} + +<ul class="nav nav-tabs" style="margin-top:30px"> +{% block tabs %} + <li><a href="{% url 'stats-index' %}">{% trans "Technicians" %}</a></li> + <li><a href="{% url 'stats-locations' %}">{% trans "Locations" %}</a></li> + <li><a href="{% url 'stats-queues' %}">{% trans "Queues" %}</a></li> + <li class="active"><a href="{% url 'stats-repairs' %}">{% trans "Repairs" %}</a></li> + <li><a href="{% url 'stats-statuses' %}">{% trans "Statuses" %}</a></li> + <li><a href="{% url 'stats-sales' %}">{% trans "Sales" %}</a></li> +{% endblock tabs %} +</ul> + +<div class="row-fluid"> + <div class="span12 well"> + {% block filter_block %} + <form action="#" method="get" class="form-inline" id="stats-form"> + {% for field in form %} + <div class="control-group pull-left"> + <label class="control-label">{{ field.label }}</label> + <div class="controls">{{ field }}</div> + </div> + {% endfor %} + <div class="control-group"> + <label class="control-label"> </label> + <div class="controls"> + <button class="btn btn-primary pull-right" type="submit"><i class="icon-search icon-white"></i> {% trans "Search" %}</button> + </div> + </div> + </form> + {% endblock filter_block %} + </div> +</div> +<div class="row-fluid"> + <div class="span12"> + {% block stats %} + <table class="table table-hover sortable"> + <thead> + <tr> + <th>{% trans "Technician" %}</th> + <th>{% trans "Cases Created" %}</th> + <th>{% trans "Cases Assigned" %}</th> + <th>{% trans "Repairs Created" %}</th> + <th>{% trans "Cases Dispatched" %}</th> + <td></td> + </tr> + </thead> + <tbody> + {% for r in results %} + <tr> + <td>{{ r.name }}</td> + <td>{{ r.created }}</td> + <td>{{ r.assigned }}</td> + <td>{{ r.repairs }}</td> + <td>{{ r.dispatched }}</td> + <td></td> + </tr> + {% endfor %} + </tbody> + <tfoot style="font-weight:bold"> + <tr> + <td>{% trans "Total" %}</td> + <td>{{ totals.created }}</td> + <td>{{ totals.assigned }}</td> + <td>{{ totals.repairs }}</td> + <td>{{ totals.dispatched }}</td> + <td>{{ totals.diff }}</td> + </tr> + {% if totals.turnaround.nonzero %} + <tr> + <td>{% trans "Average turnaround time" %}</td> + <td colspan="5">{{ totals.turnaround.days }} {% trans "days" %}, {{ totals.turnaround.hours }} {% trans "hours" %}</td> + </tr> + {% endif %} + </tfoot> + </table> + {% endblock stats %} + </div> +</div> +{% endblock content %} + +{% block crumbs %} + <li class="active">{% trans "Statistics" %}</li> +{% endblock crumbs %} diff --git a/servo/templates/stats/plot_snippet.html b/servo/templates/stats/plot_snippet.html new file mode 100755 index 0000000..c93a41e --- /dev/null +++ b/servo/templates/stats/plot_snippet.html @@ -0,0 +1,9 @@ +<div class="row-fluid"> + <div class="span12"> + <div class="span10"> + <div class="plot" data-source="{{ url }}"></div> + <div class="legend-container"></div> + </div> + <div class="span2"></div> + </div> +</div> diff --git a/servo/templates/stats/queues.html b/servo/templates/stats/queues.html new file mode 100755 index 0000000..eefec46 --- /dev/null +++ b/servo/templates/stats/queues.html @@ -0,0 +1,29 @@ +{% extends "stats/index.html" %} +{% load i18n %} + +{% block tabs %} + <li><a href="{% url 'stats-index' %}">{% trans "Technicians" %}</a></li> + <li><a href="{% url 'stats-locations' %}">{% trans "Locations" %}</a></li> + <li class="active"><a href="{% url 'stats-queues' %}">{% trans "Queues" %}</a></li> + <li><a href="{% url 'stats-repairs' %}">{% trans "Repairs" %}</a></li> + <li><a href="{% url 'stats-statuses' %}">{% trans "Statuses" %}</a></li> + <li><a href="{% url 'stats-sales' %}">{% trans "Sales" %}</a></li> +{% endblock tabs %} + +{% block stats %} + <h2>{% trans "Orders Created" %}</h2> + <p>{% trans "This is your total number of orders per queue in the specified time period" %}</p> + {% include "stats/plot_snippet.html" with url="/stats/data/orders/count/" %} + <hr/> + <h2>{% trans "Orders Closed" %}</h2> + <p>{% trans "Shows you how many orders have been closed in each queue." %}</p> + {% include "stats/plot_snippet.html" with url="/stats/data/closed/queue/" %} + <hr/> + <h2>{% trans "Average Turnaround" %}</h2> + <p>{% trans "Shows how many hours it takes to complete an order in each queue." %}</p> + {% include "stats/plot_snippet.html" with url="/stats/data/orders/turnaround/" %} + <hr/> + <h2>{% trans "Work Distribution" %}</h2> + <p>{% trans "This shows your total ratio of orders over the time period distributed over each queue." %}</p> + <div class="plot plot-pie pull-left" data-source="/stats/data/orders/queues/"></div> +{% endblock stats %} diff --git a/servo/templates/stats/sales.html b/servo/templates/stats/sales.html new file mode 100755 index 0000000..186e897 --- /dev/null +++ b/servo/templates/stats/sales.html @@ -0,0 +1,33 @@ +{% extends "stats/index.html" %} +{% load i18n %} + +{% block tabs %} +<li><a href="{% url 'stats-index' %}">{% trans "Technicians" %}</a></li> +<li><a href="{% url 'stats-locations' %}">{% trans "Locations" %}</a></li> +<li><a href="{% url 'stats-queues' %}">{% trans "Queues" %}</a></li> +<li><a href="{% url 'stats-repairs' %}">{% trans "Repairs" %}</a></li> +<li><a href="{% url 'stats-statuses' %}">{% trans "Statuses" %}</a></li> +<li class="active"><a href="{% url 'stats-sales' %}">{% trans "Sales" %}</a></li> +{% endblock tabs %} + +{% block stats %} +<h2>{% trans "Sales" %}</h2> +<p>{% trans "Shows you invoice totals per queue within the selected time period." %}</p> +{% include "stats/plot_snippet.html" with url="/stats/data/sales/invoices/" %} +<hr/> +<h2>{% trans "Purchases" %}</h2> +<p>{% trans "Shows you Purchase Order totals per queue within the selected time period." %}</p> +{% include "stats/plot_snippet.html" with url="/stats/data/sales/purchases/" %} +<hr/> +<h2>{% trans "Service Parts" %}</h2> +<p>{% trans "Shows you how many parts have been ordered for each labour tier." %}</p> +<div class="row-fluid"> + <div class="span12"> + <div class="span10"> + <div class="plot plot-bar" data-source="/stats/data/sales/parts/"></div> + <div class="legend-container"></div> + </div> + <div class="span2"></div> + </div> +</div> +{% endblock stats %} diff --git a/servo/templates/stats/statuses.html b/servo/templates/stats/statuses.html new file mode 100755 index 0000000..f4fb427 --- /dev/null +++ b/servo/templates/stats/statuses.html @@ -0,0 +1,21 @@ +{% extends "stats/index.html" %} +{% load i18n %} + +{% block tabs %} + <li><a href="{% url 'stats-index' %}">{% trans "Technicians" %}</a></li> + <li><a href="{% url 'stats-locations' %}">{% trans "Locations" %}</a></li> + <li><a href="{% url 'stats-queues' %}">{% trans "Queues" %}</a></li> + <li><a href="{% url 'stats-repairs' %}">{% trans "Repairs" %}</a></li> + <li class="active"><a href="{% url 'stats-statuses' %}">{% trans "Statuses" %}</a></li> + <li><a href="{% url 'stats-sales' %}">{% trans "Sales" %}</a></li> +{% endblock tabs %} + +{% block stats %} + <h2>{% trans "Orders per location" %}</h2> + <p>{% trans "Shows the number of orders with a particular status at the selected location that have been assigned to a technician over the specified time period." %}</p> + {% include "stats/plot_snippet.html" with url="/stats/data/status/location/" %} + <hr/> + <h2>{% trans "Orders per user" %}</h2> + <p>{% trans "Shows the number of orders with a particular status per each user at the given location that have been assigned to a technician over the specified time period." %}</p> + {% include "stats/plot_snippet.html" with url="/stats/data/status/tech/" %} +{% endblock stats %} |