41 changed files with 356 additions and 73 deletions
-
BINabonapp/locale/ru/LC_MESSAGES/django.mo
-
38abonapp/templates/abonapp/editAbon.html
-
2abonapp/views.py
-
BINaccounts_app/locale/ru/LC_MESSAGES/django.mo
-
7accounts_app/templates/accounts/login.html
-
3devapp/dev_types.py
-
1devapp/models.py
-
92devapp/templates/devapp/add_dev.html
-
16devapp/templates/devapp/dev.html
-
20devapp/templates/devapp/devices.html
-
81devapp/templates/devapp/devices_null_group.html
-
21devapp/templates/devapp/ext.htm
-
51devapp/templates/devapp/group_list.html
-
4devapp/templates/devapp/ports.html
-
12devapp/urls.py
-
61devapp/views.py
-
BINdjango_messages/locale/ar/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/cs/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/da/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/de/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/el/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/es/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/es_AR/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/fa/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/fr/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/it/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/ko/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/lt/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/nl/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/pl/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/pt_BR/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/ro/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/ru/LC_MESSAGES/django.mo
-
BINdjango_messages/locale/zh_CN/LC_MESSAGES/django.mo
-
4taskapp/models.py
-
2taskapp/templates/taskapp/tasklist.html
-
2taskapp/templates/taskapp/tasklist_active.html
-
2taskapp/templates/taskapp/tasklist_all.html
-
2taskapp/templates/taskapp/tasklist_finish.html
-
2taskapp/templates/taskapp/tasklist_own.html
-
6templates/base.html
@ -0,0 +1,92 @@ |
|||
{% extends request.is_ajax|yesno:'bajax.html,base.html' %} |
|||
{% load i18n %} |
|||
{% block main %} |
|||
|
|||
<ol class="breadcrumb"> |
|||
<li><span class="glyphicon glyphicon-home"></span></li> |
|||
<li><a href="{% url 'devapp:group_list' %}">{% trans 'Groups' %}</a></li> |
|||
<li class="active">{% trans 'Add new device' %}</li> |
|||
</ol> |
|||
|
|||
{% include 'message_block.html' %} |
|||
|
|||
<div class="page-header"> |
|||
<h2>{{ dev.comment|default:_('Not assigned') }}</h2> |
|||
</div> |
|||
|
|||
<div class="panel panel-default"> |
|||
<div class="panel-heading"> |
|||
<h3 class="panel-title">{% trans 'Device info' %}</h3> |
|||
</div> |
|||
<div class="panel-body"> |
|||
|
|||
<form role="form" action="{% url 'devapp:add' %}" method="post">{% csrf_token %} |
|||
|
|||
<div class="form-group"> |
|||
<label for="id_ip_address">{% trans 'Ip address' %}</label> |
|||
|
|||
<div class="input-group"> |
|||
<span class="input-group-addon"><span class="glyphicon glyphicon-globe"></span></span> |
|||
{{ form.ip_address }}{{ form.ip_address.errors }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label for="id_comment">{% trans 'Comment' %}</label> |
|||
|
|||
<div class="input-group"> |
|||
<span class="input-group-addon"><span class="glyphicon glyphicon-comment"></span></span> |
|||
{{ form.comment }}{{ form.comment.errors }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label for="id_devtype">{% trans 'Device type' %}</label> |
|||
|
|||
<div class="input-group"> |
|||
<span class="input-group-addon"><span class="glyphicon glyphicon-hdd"></span></span> |
|||
{{ form.devtype }}{{ form.devtype.errors }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label for="id_man_passw">{% trans 'SNMP password' %}</label> |
|||
|
|||
<div class="input-group"> |
|||
<span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span> |
|||
{{ form.man_passw }}{{ form.man_passw.errors }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label for="id_map_dot">{% trans 'Map point' %}</label> |
|||
|
|||
<div class="input-group"> |
|||
<span class="input-group-addon"><span class="glyphicon glyphicon-map-marker"></span></span> |
|||
{{ form.map_dot }}{{ form.devtype.errors }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="form-group"> |
|||
<label for="id_user_group">{% trans 'User group' %}</label> |
|||
|
|||
<div class="input-group"> |
|||
<span class="input-group-addon"><span class="glyphicon glyphicon-subscript"></span></span> |
|||
{{ form.user_group }}{{ form.user_group.errors }} |
|||
</div> |
|||
</div> |
|||
|
|||
<div class="btn-group"> |
|||
<button type="submit" class="btn btn-sm btn-primary"> |
|||
<span class="glyphicon glyphicon-save"></span> {% trans 'Save' %} |
|||
</button> |
|||
<button type="reset" class="btn btn-sm btn-default"> |
|||
<span class="glyphicon glyphicon-remove-circle"></span> {% trans 'Reset' %} |
|||
</button> |
|||
</div> |
|||
|
|||
</form> |
|||
</div> |
|||
</div> |
|||
|
|||
{% endblock %} |
|||
@ -0,0 +1,81 @@ |
|||
{% extends request.is_ajax|yesno:'bajax.html,base.html' %} |
|||
{% load i18n %} |
|||
{% block main %} |
|||
|
|||
<ol class="breadcrumb"> |
|||
<li><span class="glyphicon glyphicon-home"></span></li> |
|||
<li><a href="{% url 'devapp:group_list' %}">{% trans 'Groups' %}</a></li> |
|||
<li class="active">{% trans 'Devices' %}</li> |
|||
</ol> |
|||
|
|||
{% include 'message_block.html' %} |
|||
|
|||
<h3>{% trans 'Devices without group' %}</h3> |
|||
<div class="table-responsive"> |
|||
<table class="table table-striped table-bordered"> |
|||
<thead> |
|||
<tr> |
|||
<th> |
|||
<a href="{% url 'devapp:devices_null_group' %}?order_by=ip_address&dir={{ dir|default:"down" }}"> |
|||
{% trans 'Ip address' %} |
|||
</a> |
|||
{% if order_by == 'ip_address' %}<span class="glyphicon glyphicon-filter"></span>{% endif %} |
|||
</th> |
|||
<th> |
|||
<a href="{% url 'devapp:devices_null_group' %}?order_by=comment&dir={{ dir|default:"down" }}"> |
|||
{% trans 'Comment' %} |
|||
</a> |
|||
{% if order_by == 'comment' %}<span class="glyphicon glyphicon-filter"></span>{% endif %} |
|||
</th> |
|||
<th width="250"> |
|||
<a href="{% url 'devapp:devices_null_group' %}?order_by=devtype&dir={{ dir|default:"down" }}"> |
|||
{% trans 'Device type' %} |
|||
</a> |
|||
{% if order_by == 'devtype' %}<span class="glyphicon glyphicon-filter"></span>{% endif %} |
|||
</th> |
|||
<th width="100">Do</th> |
|||
</tr> |
|||
</thead> |
|||
|
|||
<tbody> |
|||
{% for dev in devices %} |
|||
<tr> |
|||
<td><a href="{% url 'devapp:view' dev.user_group.pk|default:0 dev.id %}">{{ dev.ip_address }}</a></td> |
|||
<td>{{ dev.comment }}</td> |
|||
<td>{{ dev.get_devtype_display }}</td> |
|||
<td class="btn-group btn-group-sm"> |
|||
{% if perms.devapp.delete_device %} |
|||
<a href="{% url 'devapp:del' dev.user_group.pk|default:0 dev.id %}" class="btn btn-danger btn-sm"> |
|||
<span class="glyphicon glyphicon-remove"></span> |
|||
</a> |
|||
{% endif %} |
|||
{% if perms.devapp.change_device %} |
|||
<a href="{% url 'devapp:edit' dev.user_group.pk|default:0 dev.id %}" class="btn btn-default btn-sm"> |
|||
<span class="glyphicon glyphicon-edit"></span> |
|||
</a> |
|||
{% endif %} |
|||
</td> |
|||
</tr> |
|||
{% empty %} |
|||
<tr> |
|||
<td colspan="4">{% trans 'Devices does not found' %}. <a href="{% url 'devapp:add' %}">{% trans 'Create' %}</a></td> |
|||
</tr> |
|||
{% endfor %} |
|||
</tbody> |
|||
|
|||
<tfoot> |
|||
<tr> |
|||
<td colspan="4"> |
|||
<a href="{% url 'devapp:add' %}" class="btn btn-success btn-sm"> |
|||
<span class="glyphicon glyphicon-plus"></span> {% trans 'Create' %} |
|||
</a> |
|||
</td> |
|||
</tr> |
|||
</tfoot> |
|||
|
|||
</table> |
|||
</div> |
|||
|
|||
{% include 'toolbar_page.html' with pag=devices %} |
|||
|
|||
{% endblock %} |
|||
@ -0,0 +1,51 @@ |
|||
{% extends 'base.html' %} |
|||
{% load i18n %} |
|||
{% block main %} |
|||
|
|||
<ol class="breadcrumb"> |
|||
<li><span class="glyphicon glyphicon-home"></span></li> |
|||
<li class="active">{% trans 'Groups' %}</li> |
|||
</ol> |
|||
|
|||
<h3>{% trans 'Groups' %}</h3> |
|||
|
|||
{% include 'message_block.html' %} |
|||
|
|||
<div class="table-responsive"> |
|||
<table class="table table-striped table-bordered"> |
|||
<thead> |
|||
<tr> |
|||
<th>{% trans 'Group title' %}</th> |
|||
</tr> |
|||
</thead> |
|||
<tbody> |
|||
{% for gr in groups %} |
|||
<tr> |
|||
<td><a href="{% url 'devapp:devs' gr.id %}">{{ gr.title }}</a></td> |
|||
</tr> |
|||
{% empty %} |
|||
<tr> |
|||
<td><a href="#">{% trans 'Groups was not found' %}</a></td> |
|||
</tr> |
|||
{% endfor %} |
|||
</tbody> |
|||
<tfoot> |
|||
<tr> |
|||
<td class="btn-group"> |
|||
{% if perms.abonapp.add_abongroup %} |
|||
<a href="{% url 'abonapp:add_group' %}" class="btn btn-success btn-sm"> |
|||
<span class="glyphicon glyphicon-plus"></span> {% trans 'Add group' %} |
|||
</a> |
|||
{% endif %} |
|||
<a href="{% url 'devapp:devices_null_group' %}" class="btn btn-primary btn-sm"> |
|||
<span class="glyphicon glyphicon-list-alt"></span> {% trans 'Devices without group' %} |
|||
</a> |
|||
</td> |
|||
</tr> |
|||
</tfoot> |
|||
</table> |
|||
</div> |
|||
|
|||
{% include 'toolbar_page.html' with pag=groups %} |
|||
|
|||
{% endblock %} |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue