Browse Source

Merge branch 'devel' of https://github.com/nerosketch/djing into devel

devel
bashmak 8 years ago
parent
commit
65e2b7502d
  1. 5
      agent/netflow/netflow_handler.py
  2. 2
      devapp/models.py
  3. 4
      static/clientside/custom.css
  4. 2
      systemd_units/djing_rotate.service
  5. 14
      taskapp/templates/taskapp/tasklist.html
  6. 10
      taskapp/templates/taskapp/tasklist_failed.html
  7. 2
      taskapp/templates/taskapp/tasklist_own.html

5
agent/netflow/netflow_handler.py

@ -4,6 +4,7 @@ import sys
import os
from importlib import import_module
if __name__ == '__main__':
if len(sys.argv) < 2:
print("File name of netflow required")
@ -48,8 +49,8 @@ if __name__ == '__main__':
db.close()
os.system(
'/usr/bin/bash -c '
'"%(CUR_DIR)s/djing_flow %(TMP_IPUSER_FILE)s < %(TMP_DUMP)s | '
'bash -c "export LD_LIBRARY_PATH=. && '
'%(CUR_DIR)s/djing_flow %(TMP_IPUSER_FILE)s < %(TMP_DUMP)s | '
'/usr/bin/mysql -u%(DB_USER)s -h %(HOST)s -p %(DB_NAME)s --password=%(DB_PASSW)s"' % {
'CUR_DIR': cur_dir,
'TMP_IPUSER_FILE': tmp_ipuser_file,

2
devapp/models.py

@ -75,7 +75,7 @@ class Device(models.Model):
)
verbose_name = _('Device')
verbose_name_plural = _('Devices')
ordering = ['comment']
ordering = ['id']
def get_abons(self):
pass

4
static/clientside/custom.css

@ -5,10 +5,6 @@ img.navbar-brand {
margin: 0 15px 0 0;
}
body > .container {
padding: 60px 15px 0;
}
.table thead {
background-color: #ddd;
}

2
systemd_units/djing_rotate.service

@ -4,7 +4,7 @@ Description=A job for rotate djing netflow data
[Service]
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/bin"
Type=oneshot
ExecStart=/bin/bash -c "kill -HUP `cat /run/flow.pid.6343`"
ExecStart=/bin/bash -c "kill -HUP `/bin/cat /run/flow.pid.6343`"
User=root
Group=root

14
taskapp/templates/taskapp/tasklist.html

@ -7,13 +7,13 @@
<table class="table table-striped table-bordered">
<thead>
<tr>
<th class="col-sm-3">{% trans 'Name and comment count' %}</th>
<th class="col-sm-1">{% trans 'Address' %}</th>
<th class="col-sm-1">{% trans 'The nature of the damage' %}</th>
<th class="col-sm-4">{% trans 'Description' %}</th>
<th class="col-sm-1">{% trans 'Task author' %}</th>
<th class="col-sm-1">{% trans 'Date of create' %}</th>
<th class="col-sm-1">{% trans 'Actions' %}</th>
<th class="col-sm-3 col-xs-3">{% trans 'Name and comment count' %}</th>
<th class="col-sm-1 col-xs-2">{% trans 'Address' %}</th>
<th class="col-sm-1 col-xs-1">{% trans 'The nature of the damage' %}</th>
<th class="col-sm-4 col-xs-4">{% trans 'Description' %}</th>
<th class="col-sm-1 col-xs-1">{% trans 'Task author' %}</th>
<th class="col-sm-1 hidden-xs">{% trans 'Date of create' %}</th>
<th class="col-sm-1 col-xs-1">{% trans 'Actions' %}</th>
</tr>
</thead>
<tbody>

10
taskapp/templates/taskapp/tasklist_failed.html

@ -46,8 +46,14 @@
<td>{{ task.get_mode_display }}</td>
<td>{{ task.descr }}</td>
<td><a href="{% url 'acc_app:other_profile' task.author.pk %}" data-toggle="tooltip"
title="{{ task.author.get_full_name }}">{{ task.author.username }}</a></td>
<td>
{% if task.author %}
<a href="{% url 'acc_app:other_profile' task.author.pk %}" data-toggle="tooltip"
title="{{ task.author.get_full_name }}">{{ task.author.username }}</a>
{% else %}
{% trans 'Not assigned' %}
{% endif %}
</td>
<td class="hidden-xs">{{ task.time_of_create|date:'d E H:i' }}</td>
<td class="btn-group btn-group-sm btn-group-justified">

2
taskapp/templates/taskapp/tasklist_own.html

@ -52,7 +52,7 @@
{% endif %}
<td>{{ task.get_mode_display }}</td>
<td>{{ task.descr }}</td>
<td>{{ task.descr|default:'' }}</td>
<td>{{ task.get_state_display }}</td>
<td class="hidden-xs">{{ task.time_of_create|date:'d E H:i' }}</td>

Loading…
Cancel
Save