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/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_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 84e0fa29e..2eff7a7fd 100644 --- a/templates/nav.html +++ b/templates/nav.html @@ -14,21 +14,21 @@
  • 用户管理
  • 资产管理
  • @@ -40,11 +40,11 @@
  • 添加sudo
  • -
  • +
  • 日志审计
  • diff --git a/templates/script.html b/templates/script.html index 81634629d..f63ee35f1 100644 --- a/templates/script.html +++ b/templates/script.html @@ -37,5 +37,7 @@ \ No newline at end of file