Browse Source

fix bugs

devel
www-data 8 years ago
parent
commit
c9ec0214ed
  1. 5
      agent/netflow/netflow_handler.py
  2. 24
      clientsideapp/templates/clientsideapp/index.html
  3. 2
      devapp/models.py
  4. 4
      static/clientside/custom.css
  5. 2
      systemd_units/djing_rotate.service
  6. 14
      taskapp/templates/taskapp/tasklist.html
  7. 10
      taskapp/templates/taskapp/tasklist_failed.html
  8. 2
      taskapp/templates/taskapp/tasklist_own.html

5
agent/netflow/netflow_handler.py

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

24
clientsideapp/templates/clientsideapp/index.html

@ -1,18 +1,6 @@
{% extends 'clientsideapp/ext.html' %} {% extends 'clientsideapp/ext.html' %}
{% block client_main %} {% block client_main %}
<div class="panel panel-primary">
<div class="panel-heading">Наши реквизиты</div>
<div class="panel-body">
<ul>
<li><b>Режим работы:</b> с 9:00 до 22:00</li>
<li><b>Телефоны:</b> +79788328885, +79788318999</li>
<li><b>Адрес:</b> пос. Нижнегорский, ул. Победы 38. 2й этаж старого дома быта, возле рынка</li>
</ul>
<script type="text/javascript" charset="utf-8" async src="https://api-maps.yandex.ru/services/constructor/1.0/js/?um=constructor%3A62221c38a606ad870f2cabc9fd476c8ae1a532993915b73553693f7fb5c7de68&amp;width=100%25&amp;height=654&amp;lang=ru_RU&amp;scroll=true"></script>
</div>
</div>
<div class="page-header"> <div class="page-header">
<h3 class="page-header">Тарифы на дополнительные услуги</h3> <h3 class="page-header">Тарифы на дополнительные услуги</h3>
@ -70,4 +58,16 @@
</table> </table>
</div> </div>
<div class="panel panel-primary">
<div class="panel-heading">Наши реквизиты</div>
<div class="panel-body">
<ul>
<li><b>Режим работы:</b> с 9:00 до 22:00</li>
<li><b>Телефоны:</b> +79788328885, +79788318999</li>
<li><b>Адрес:</b> пос. Нижнегорский, ул. Победы 38. 2й этаж старого дома быта, возле рынка</li>
</ul>
<script type="text/javascript" charset="utf-8" async src="https://api-maps.yandex.ru/services/constructor/1.0/js/?um=constructor%3A62221c38a606ad870f2cabc9fd476c8ae1a532993915b73553693f7fb5c7de68&amp;width=100%25&amp;height=654&amp;lang=ru_RU&amp;scroll=true"></script>
</div>
</div>
{% endblock %} {% endblock %}

2
devapp/models.py

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

4
static/clientside/custom.css

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

2
systemd_units/djing_rotate.service

@ -4,7 +4,7 @@ Description=A job for rotate djing netflow data
[Service] [Service]
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/bin" Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/bin"
Type=oneshot 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 User=root
Group=root Group=root

14
taskapp/templates/taskapp/tasklist.html

@ -7,13 +7,13 @@
<table class="table table-striped table-bordered"> <table class="table table-striped table-bordered">
<thead> <thead>
<tr> <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> </tr>
</thead> </thead>
<tbody> <tbody>

10
taskapp/templates/taskapp/tasklist_failed.html

@ -46,8 +46,14 @@
<td>{{ task.get_mode_display }}</td> <td>{{ task.get_mode_display }}</td>
<td>{{ task.descr }}</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="hidden-xs">{{ task.time_of_create|date:'d E H:i' }}</td>
<td class="btn-group btn-group-sm btn-group-justified"> <td class="btn-group btn-group-sm btn-group-justified">

2
taskapp/templates/taskapp/tasklist_own.html

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

Loading…
Cancel
Save