diff --git a/jasset/views.py b/jasset/views.py index 02f887b69..482ed8fad 100644 --- a/jasset/views.py +++ b/jasset/views.py @@ -5,7 +5,9 @@ from django.shortcuts import render_to_response from django.core.paginator import Paginator, EmptyPage from models import IDC, Asset, BisGroup +from juser.models import UserGroup from connect import PyCrypt, KEY +from jpermission.models import Permission cryptor = PyCrypt(KEY) @@ -20,6 +22,7 @@ def jadd_host(request): groups = [] eidc = IDC.objects.all() egroup = BisGroup.objects.all() + eusergroup = UserGroup.objects.all() if request.method == 'POST': j_ip = request.POST.get('j_ip') diff --git a/logs/connect/20150124/halcyon_192.168.196.73_133619.log b/logs/connect/20150124/halcyon_192.168.196.73_133619.log new file mode 100644 index 000000000..df5a91b5e --- /dev/null +++ b/logs/connect/20150124/halcyon_192.168.196.73_133619.log @@ -0,0 +1,8 @@ +PS1='[\u@192.168.196.73 \W]\$ ' +Last login: Sun Jan 4 13:30:11 2015 from 192.168.199.162 +clear;echo -e '\033[32mLogin 192.168.196.73 done. Enjoy it.\033[0m' +[halcyon@localhost ~]$ PS1='[\u@192.168.196.73 \W]\$ ' +[halcyon@192.168.196.73 ~]$ clear;echo -e '\033[32mLogin 192.168.196.73 done. Enjoy it.\033[0m' +Login 192.168.196.73 done. Enjoy it. +[halcyon@192.168.196.73 ~]$ ls +[halcyon@192.168.196.73 ~]$ \ No newline at end of file diff --git a/templates/jasset/group_add.html b/templates/jasset/group_add.html index f610d740f..4b3d871ce 100644 --- a/templates/jasset/group_add.html +++ b/templates/jasset/group_add.html @@ -74,7 +74,6 @@ form.submit(); } }); - {% endblock %} \ No newline at end of file diff --git a/templates/jasset/host_add.html b/templates/jasset/host_add.html index dc862a315..224e0dc1f 100644 --- a/templates/jasset/host_add.html +++ b/templates/jasset/host_add.html @@ -103,6 +103,16 @@ +
+
+ +
+ {% for g in eusergroup %} + + {% endfor %} +
+
+
@@ -169,6 +179,12 @@ $('#assetForm').validator({ ok: "", msg: {checked: "至少选择一个组"} }, + "j_usergroup": { + rule: "checked", + tip: "选择用户组", + ok: "", + msg: {checked: "至少选择一个组"} + }, "j_user": { rule: "required(type_m)", tip: "普通用户名", diff --git a/templates/jasset/host_edit.html b/templates/jasset/host_edit.html index d3a3f2f00..f197efa53 100644 --- a/templates/jasset/host_edit.html +++ b/templates/jasset/host_edit.html @@ -49,7 +49,7 @@
{% for t, type in login_types.items %} {% ifequal t post.login_type %} -
+
{% else %}
{% endifequal %} @@ -58,22 +58,22 @@ @@ -212,4 +212,5 @@ $('#assetForm').validator({ + {% endblock %} \ No newline at end of file diff --git a/templates/jasset/host_list.html b/templates/jasset/host_list.html index eae48d9e4..58e28733f 100644 --- a/templates/jasset/host_list.html +++ b/templates/jasset/host_list.html @@ -71,23 +71,34 @@ {% endfor %} +
+
+
+ Showing {{ contacts.start_index }} to {{ contacts.end_index }} of {{ p.count }} entries +
+
+
+
+
    -
      - {% if contacts.has_previous %} -
    • «
    • - {% endif %} + {% if contacts.has_previous %} +
    • «
    • + {% endif %} - {% for page in p.page_range %} - {% ifequal offset1 page %} -
    • {{ page }}
    • - {% else %} -
    • {{ page }}
    • - {% endifequal %} - {% endfor %} - {% if contacts.has_next %} -
    • »
    • - {% endif %} -
    + {% for page in p.page_range %} + {% ifequal offset1 page %} +
  • {{ page }}
  • + {% else %} +
  • {{ page }}
  • + {% endifequal %} + {% endfor %} + {% if contacts.has_next %} +
  • »
  • + {% endif %} +
+
+
+
diff --git a/templates/nav.html b/templates/nav.html index 5e44fdefb..2eff7a7fd 100644 --- a/templates/nav.html +++ b/templates/nav.html @@ -11,27 +11,27 @@
  • Dashboard v.3
  • --> -
  • +
  • 用户管理
  • -
  • +
  • 资产管理
  • -
  • +
  • 授权管理
  • -
  • +
  • 日志审计
  • diff --git a/templates/script.html b/templates/script.html index f730bb65e..f63ee35f1 100644 --- a/templates/script.html +++ b/templates/script.html @@ -33,3 +33,11 @@ + + + \ No newline at end of file