From c9ec0214ed095268e44ac4922981cc4a1e3b0d87 Mon Sep 17 00:00:00 2001 From: www-data Date: Sun, 11 Mar 2018 20:42:58 +0300 Subject: [PATCH] fix bugs --- agent/netflow/netflow_handler.py | 5 ++-- .../templates/clientsideapp/index.html | 24 +++++++++---------- devapp/models.py | 2 +- static/clientside/custom.css | 4 ---- systemd_units/djing_rotate.service | 2 +- taskapp/templates/taskapp/tasklist.html | 14 +++++------ .../templates/taskapp/tasklist_failed.html | 10 ++++++-- taskapp/templates/taskapp/tasklist_own.html | 2 +- 8 files changed, 33 insertions(+), 30 deletions(-) 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/clientsideapp/templates/clientsideapp/index.html b/clientsideapp/templates/clientsideapp/index.html index a0ff0b2..3c9b642 100644 --- a/clientsideapp/templates/clientsideapp/index.html +++ b/clientsideapp/templates/clientsideapp/index.html @@ -1,18 +1,6 @@ {% extends 'clientsideapp/ext.html' %} {% block client_main %} -
-
Наши реквизиты
-
-
    -
  • Режим работы: с 9:00 до 22:00
  • -
  • Телефоны: +79788328885, +79788318999
  • -
  • Адрес: пос. Нижнегорский, ул. Победы 38. 2й этаж старого дома быта, возле рынка
  • -
- -
-
- +
+
Наши реквизиты
+
+
    +
  • Режим работы: с 9:00 до 22:00
  • +
  • Телефоны: +79788328885, +79788318999
  • +
  • Адрес: пос. Нижнегорский, ул. Победы 38. 2й этаж старого дома быта, возле рынка
  • +
+ +
+
+ {% endblock %} 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 @@ - - - - - - - + + + + + + + diff --git a/taskapp/templates/taskapp/tasklist_failed.html b/taskapp/templates/taskapp/tasklist_failed.html index c890117..64ff05b 100644 --- a/taskapp/templates/taskapp/tasklist_failed.html +++ b/taskapp/templates/taskapp/tasklist_failed.html @@ -46,8 +46,14 @@ - + - +
{% 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 %} + 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 }}