diff --git a/agent/netflow/netflow_handler.py b/agent/netflow/netflow_handler.py index f88a4ea..41c23c1 100755 --- a/agent/netflow/netflow_handler.py +++ b/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, diff --git a/devapp/models.py b/devapp/models.py index 7bb24de..97d1353 100644 --- a/devapp/models.py +++ b/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 diff --git a/static/clientside/custom.css b/static/clientside/custom.css index 1da3ca9..461ffb8 100644 --- a/static/clientside/custom.css +++ b/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; } diff --git a/systemd_units/djing_rotate.service b/systemd_units/djing_rotate.service index 4e1678b..f783804 100644 --- a/systemd_units/djing_rotate.service +++ b/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 diff --git a/taskapp/templates/taskapp/tasklist.html b/taskapp/templates/taskapp/tasklist.html index 4171d95..60c0138 100644 --- a/taskapp/templates/taskapp/tasklist.html +++ b/taskapp/templates/taskapp/tasklist.html @@ -7,13 +7,13 @@
| {% trans 'Name and comment count' %} | -{% trans 'Address' %} | -{% trans 'The nature of the damage' %} | -{% trans 'Description' %} | -{% trans 'Task author' %} | -{% trans 'Date of create' %} | -{% trans 'Actions' %} | +{% trans 'Name and comment count' %} | +{% trans 'Address' %} | +{% trans 'The nature of the damage' %} | +{% trans 'Description' %} | +{% trans 'Task author' %} | + +{% trans 'Actions' %} | {{ task.get_mode_display }} | {{ task.descr }} | -{{ task.author.username }} | ++ {% if task.author %} + {{ task.author.username }} + {% else %} + {% trans 'Not assigned' %} + {% endif %} + | {{ task.time_of_create|date:'d E H:i' }} | diff --git a/taskapp/templates/taskapp/tasklist_own.html b/taskapp/templates/taskapp/tasklist_own.html index bd12cd2..b4bc996 100644 --- a/taskapp/templates/taskapp/tasklist_own.html +++ b/taskapp/templates/taskapp/tasklist_own.html @@ -52,7 +52,7 @@ {% endif %} | {{ task.get_mode_display }} | -{{ task.descr }} | +{{ task.descr|default:'' }} | {{ task.get_state_display }} | {{ task.time_of_create|date:'d E H:i' }} |
|---|