mirror of https://github.com/jumpserver/jumpserver
bugs
parent
bb94cfc7a1
commit
d28d72c42d
|
@ -422,7 +422,7 @@ def list_idc(request):
|
|||
if keyword:
|
||||
posts = IDC.objects.filter(Q(name__contains=keyword) | Q(comment__contains=keyword))
|
||||
else:
|
||||
posts = IDC.objects.all().order_by('id')
|
||||
posts = IDC.objects.exclude(name='ALL').order_by('id')
|
||||
contact_list, p, contacts, page_range, current_page, show_first, show_end = pages(posts, request)
|
||||
return render_to_response('jasset/idc_list.html', locals(), context_instance=RequestContext(request))
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@ urlpatterns = patterns('',
|
|||
# Examples:
|
||||
# url(r'^$', 'jumpserver.views.home', name='home'),
|
||||
# url(r'^blog/', include('blog.urls')),
|
||||
(r'^$', view_splitter, {'su': index, 'adm': admin_index}),
|
||||
# (r'^$', view_splitter, {'su': index, 'adm': admin_index}),
|
||||
(r'^$', 'jumpserver.views.index'),
|
||||
(r'^api/user/$', 'jumpserver.api.api_user'),
|
||||
(r'^skin_config/$', 'jumpserver.views.skin_config'),
|
||||
(r'^install/$', 'jumpserver.views.install'),
|
||||
|
|
|
@ -45,7 +45,7 @@ def get_data(data, items, option):
|
|||
return dic
|
||||
|
||||
|
||||
@require_super_user
|
||||
@require_login
|
||||
def index(request):
|
||||
users = User.objects.all()
|
||||
hosts = Asset.objects.all()
|
||||
|
|
|
@ -184,40 +184,22 @@ $('#assetForm').validator({
|
|||
msg: {required: "必须填写!"}
|
||||
},
|
||||
"j_group": {
|
||||
rule: "checked",
|
||||
tip: "选择业务组",
|
||||
rule: "required",
|
||||
tip: "选择主机组",
|
||||
ok: "",
|
||||
msg: {checked: "至少选择一个组"}
|
||||
},
|
||||
"j_usergroup": {
|
||||
rule: "checked",
|
||||
tip: "选择用户组",
|
||||
"j_idc": {
|
||||
rule: "required",
|
||||
tip: "选择IDC",
|
||||
ok: "",
|
||||
msg: {checked: "至少选择一个组"}
|
||||
msg: {checked: "必须填写!"}
|
||||
},
|
||||
"j_user": {
|
||||
rule: "required(type_m)",
|
||||
tip: "普通用户名",
|
||||
"j_dept": {
|
||||
rule: "required",
|
||||
tip: "选择部门",
|
||||
ok: "",
|
||||
msg: {required: "请填写用户名"}
|
||||
},
|
||||
"j_password": {
|
||||
rule: "required(type_m);length[6~16]",
|
||||
tip: "密码6-16位",
|
||||
ok: "",
|
||||
msg: {required: "6-16位"}
|
||||
},
|
||||
"j_root": {
|
||||
rule: "required(type_m)",
|
||||
tip: "超管用户名",
|
||||
ok: "",
|
||||
msg: {required: "请填写用户名"}
|
||||
},
|
||||
"j_passwd": {
|
||||
rule: "required(type_m);length[6~16]",
|
||||
tip: "密码6-16位",
|
||||
ok: "",
|
||||
msg: {required: "6-16位"}
|
||||
msg: {checked: "至少选择一个部门"}
|
||||
}
|
||||
},
|
||||
valid: function(form) {
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<div class="alert alert-success text-center">{{ smg }}</div>
|
||||
{% endif %}
|
||||
<form id="assetForm" method="post" class="form-horizontal">
|
||||
<div class="form-group"><label class="col-sm-2 control-label"> IDC名 </label>
|
||||
<div class="form-group"><label class="col-sm-2 control-label"> IDC名 <span class="red-fonts">*</span></label>
|
||||
<div class="col-sm-8"><input type="text" value="{{ j_idc.name }}" placeholder="北京联通" name="j_idc" class="form-control"></div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue