mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
Bind task manager backbone app to websocket using autobahn
This commit is contained in:
@@ -1,19 +1,25 @@
|
||||
<div class="page-header">
|
||||
<h1>{{ 'Task Scheduler' | trans }}
|
||||
<small style="font-size:16px;">
|
||||
{% set updateTime %}
|
||||
<span id="pingTime">{{ "now"|date(constant("DateTime::ISO8601")) }}</span>
|
||||
{% endset %}
|
||||
{% trans with {'%updateTime%' : updateTime} %}Last update on %updateTime%{% endtrans %}
|
||||
</small>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div id="task-manager-app">
|
||||
<div class="page-header">
|
||||
<h1>{{ 'Task Scheduler' | trans }}
|
||||
<small style="font-size:16px;">
|
||||
{% set updateTime %}
|
||||
<span id="pingTime" class="ping-view">{{ "now"|date(constant("DateTime::ISO8601")) }}</span>
|
||||
{% endset %}
|
||||
{% trans with {'%updateTime%' : updateTime} %}Last update on %updateTime%{% endtrans %}
|
||||
</small>
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
<table class="admintable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="refresh-view" style="width:80px;" data-refresh-url="{{ path('admin_tasks_live_info') }}">
|
||||
<button class="btn btn-refresh">
|
||||
<i class="icon icon-refresh"/>
|
||||
</button>
|
||||
<i id="spinner" style="font-size:16px" class='icon-spinner icon-spin'>
|
||||
</th>
|
||||
<th>ID</th>
|
||||
<th>PID</th>
|
||||
<th>!</th>
|
||||
@@ -22,7 +28,7 @@
|
||||
<th>{{ "name" | trans | upper }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="scheduler-view">
|
||||
<tbody class="scheduler-view">
|
||||
<tr>
|
||||
<td class="menu">
|
||||
<div class="btn-group">
|
||||
@@ -49,14 +55,14 @@
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
<td>{{ scheduler["process-id"] }}</td>
|
||||
<td></td>
|
||||
<td>{{ scheduler["actual"] }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>{{ scheduler["configuration"] }}</td>
|
||||
<td>{{ scheduler["name"] }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tbody id="tasks-list-view">
|
||||
<tbody class="tasks-list-view">
|
||||
{% for task in tasks %}
|
||||
<tr>
|
||||
<td class="menu">
|
||||
@@ -93,10 +99,10 @@
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>{% if task["id"] != "taskmanager" %}{{ task["id"] }}{% endif %}</td>
|
||||
<td>{{ task["process-id"] }}</td>
|
||||
<td>{{ task["id"] }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>{{ task["actual"] }}</td>
|
||||
<td>{{ task["configuration"] }}</td>
|
||||
<td>{{ task["name"] }}</td>
|
||||
</tr>
|
||||
@@ -115,6 +121,8 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
{#<script src="/assets/autobahnjs/autobahn.js"></script>#}
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$("form[name='form-create-task'] select").bind("change", function() {
|
||||
@@ -126,4 +134,5 @@
|
||||
{# include js templates #}
|
||||
{% include 'admin/task-manager/templates.html.twig' %}
|
||||
|
||||
<script type="text/javascript" src="{{ path('minifier', { 'f' : 'assets/requirejs/require.js,/scripts/apps/admin/tasks-manager/main.js' }) }}"></script>
|
||||
<script type="text/javascript" src="{{ path('minifier', { 'f' : 'assets/requirejs/require.js' }) }}"></script>
|
||||
<script type="text/javascript" src="{{ path('minifier', { 'f' : 'scripts/apps/admin/tasks-manager/main.js' }) }}"></script>
|
||||
|
Reference in New Issue
Block a user