Skip to content

Commit

Permalink
Tweaks to page headings
Browse files Browse the repository at this point in the history
  • Loading branch information
m-mortimer committed Sep 28, 2016
1 parent 5574ace commit f3233eb
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 42 deletions.
9 changes: 4 additions & 5 deletions controller/app/templates/tasks/task.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@

{% block content %}

<div class="row">
<div class="col-lg-9">
<h2>Task details</h2>
</div>
<div class="col-lg-3" align="right">
<div class="page-header">
<div class="btn-group-xs pull-right">
<a href="{{ url_for('tasks.get_task', task_id=tasks[0]._id) }}" class="btn btn-primary">Refresh</a>
<a href="{{ url_for('tasks.delete_task', task_id=tasks[0]._id) }}" class="btn btn-danger">Delete</a>
</div>
<h2>Task details</h2>
</div>

<div class="row">
Expand Down
71 changes: 34 additions & 37 deletions controller/app/templates/tasks/tasks.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,44 @@
{% extends "base.html" %}
{% block content %}

<div class="row">
<div class="col-lg-9">
<h2>All Tasks</h2>
</div>
<div class="col-lg-3" align="right">
<a href="{{ url_for('tasks.add_tasks') }}" class="btn btn-primary">Add task</a>
</div>
<div class="page-header">
<a href="{{ url_for('tasks.add_tasks') }}" class="btn-xs btn-primary pull-right">Add task</a>
<h2>All Tasks</h2>
</div>

<div class="row">
<table class="table table-condensed">
<tr>
<th>type</th>
<th>recurrence time (sec)</th>
<th>recurrence count</th>
<th>destination</th>
<th>poller</th>
<th></th>
</tr>
{% for task_id, data in tasks.items() %}
<div class="col-lg-9">
<table class="table table-condensed">
<tr>
<td>{{ data[0].type }}</td>
<td>{{ data[0].recurrence_time }}</td>
<td>{% if data[0].recurrence_count %}{{ data[0].recurrence_count }}{% else %}Infinite{% endif %}</td>
{% if data[0].type == 'GetPage' %}
<td>{{ data[0].url }}</td>
{% else %}
<td>{{ data[0].device }}</td>
{% endif %}
<td>{% for poller in data %}{{poller.poller}}<br>{% endfor %}</td>
<td>
<div class="btn-group-xs" role="group" aria-label="taskcontrol">
<a href="{{ url_for('tasks.get_task', task_id=task_id) }}" class="btn btn-primary">details</a>
<a href="{{ url_for('tasks.delete_task', task_id=task_id) }}" class="btn btn-danger">X</a>
</div>
</td>
<th>type</th>
<th>recurrence time (sec)</th>
<th>recurrence count</th>
<th>destination</th>
<th>poller</th>
<th></th>
</tr>
{% else %}
<tr><td colspan=6>No tasks found</td></tr>
{% endfor %}
</table>
{% for task_id, data in tasks.items() %}
<tr>
<td>{{ data[0].type }}</td>
<td>{{ data[0].recurrence_time }}</td>
<td>{% if data[0].recurrence_count %}{{ data[0].recurrence_count }}{% else %}Infinite{% endif %}</td>
{% if data[0].type == 'GetPage' %}
<td>{{ data[0].url }}</td>
{% else %}
<td>{{ data[0].device }}</td>
{% endif %}
<td>{% for poller in data %}{{poller.poller}}<br>{% endfor %}</td>
<td>
<div class="btn-group-xs" role="group" aria-label="taskcontrol">
<a href="{{ url_for('tasks.get_task', task_id=task_id) }}" class="btn btn-primary">details</a>
<a href="{{ url_for('tasks.delete_task', task_id=task_id) }}" class="btn btn-danger">X</a>
</div>
</td>
</tr>
{% else %}
<tr><td colspan=6>No tasks found</td></tr>
{% endfor %}
</table>
</div>
</div>

{% endblock %}

0 comments on commit f3233eb

Please sign in to comment.