pull/26/head
ibuler 9 years ago
parent 2afce31e95
commit 601747ac49

@ -160,7 +160,7 @@ def gen_resource(ob, ex='', perm=None):
except IndexError:
continue
info['username'] = role.name
info['password'] = role.password
info['password'] = CRYPTOR.decrypt(role.password)
info['ssh_key'] = get_role_key(ob, role)
res.append(info)
elif isinstance(ob, User):
@ -175,7 +175,7 @@ def gen_resource(ob, ex='', perm=None):
except IndexError:
continue
info['username'] = role.name
info['password'] = role.password
info['password'] = CRYPTOR.decrypt(role.password)
info['ssh_key'] = get_role_key(ob, role)
res.append(info)
elif isinstance(ob, (list, QuerySet)):

@ -24,11 +24,11 @@
<div class="ibox-content">
<form id="asset_form">
{# <div class="col-sm-1">#}
{# <a target="_blank" href="/jasset/group_add/" class="btn btn-sm btn-primary "> 添加资产 </a>#}
{# </div>#}
<div class="col-sm-8" style="padding-left: 0px">
<a target="_blank" href="/jasset/group_add/" class="btn btn-sm btn-primary" > 添加资产 </a>
<div class="col-sm-1" style="padding-left: 0">
<a target="_blank" href="/jasset/group_add/" class="btn btn-sm btn-primary "> 添加资产 </a>
</div>
<div class="col-sm-7" style="padding-left: 0px">
<label>
<select name="idc" class="form-control m-b" onchange="change_info()">
<option value="">IDC机房</option>
@ -55,19 +55,6 @@
</select>
</label>
<label>
<select name="group" class="form-control m-b" onchange="change_info()">
<option value="">主机组</option>
{% for asset_group in asset_group_all %}
{% ifequal asset_group.name group_name %}
<option value="{{ asset_group.name }}" selected> {{ asset_group.name }} </option>
{% else %}
<option value="{{ asset_group.name }}"> {{ asset_group.name }} </option>
{% endifequal %}
{% endfor %}
</select>
</label>
<label>
<select name="asset_type" class="form-control m-b" onchange="change_info()">
<option value="">所有类型</option>
@ -95,7 +82,7 @@
</label>
</div>
<div class="col-sm-4">
<div class="col-sm-4" style="padding-right: 0">
<div class="input-group inline-group">
<input type="text" class="form-control m-b" id="search_input" name="keyword" value="{{ keyword }}" placeholder="Search">
<input type="text" style="display: none">

Loading…
Cancel
Save