ProcessingNode display in left menu

pull/17/head
Piero Toffanin 2016-09-13 16:54:24 -04:00
rodzic b56d011254
commit e38a4fd198
4 zmienionych plików z 15 dodań i 8 usunięć

Wyświetl plik

@ -26,7 +26,7 @@ class ProcessingNode(models.Model):
queue_count = models.PositiveIntegerField(default=0, help_text="Number of tasks currently being processed by this node (as reported by the node itself)")
available_options = fields.JSONField(default=dict(), help_text="Description of the options that can be used for processing")
def __str__(self):
return '{}:{} ({})'.format(self.hostname, self.port, self.api_version or "?")
return '{}:{}'.format(self.hostname, self.port)
def gcp_directory_path(task, filename):

Wyświetl plik

@ -243,15 +243,14 @@
<li>
<a href="#"><i class="fa fa-wrench fa-fw"></i> Processing Nodes<span class="fa arrow"></span></a>
<ul class="nav nav-second-level">
{% load processingnode_extras %}
{% all_processing_nodes as nodes %}
{% for node in nodes %}
<li>
<a href="#">Server #1</a>
</li>
<li>
<a href="#">Server #2</a>
</li>
<li>
<a href="#">Server #3</a>
<a href="#"><span class="fa fa-laptop"></span> {{node}}</a>
</li>
{% endfor %}
<li>
<a href="/admin/app/processingnode/add/"><span class="fa fa-plus-circle"></span> Add New</a>
</li>

Wyświetl plik

@ -0,0 +1,8 @@
from django import template
from app.models import ProcessingNode
register = template.Library()
@register.assignment_tag
def all_processing_nodes():
return ProcessingNode.objects.all()

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 14 KiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 22 KiB