mirror of https://github.com/jumpserver/jumpserver
fix
parent
2afce31e95
commit
601747ac49
|
@ -160,7 +160,7 @@ def gen_resource(ob, ex='', perm=None):
|
||||||
except IndexError:
|
except IndexError:
|
||||||
continue
|
continue
|
||||||
info['username'] = role.name
|
info['username'] = role.name
|
||||||
info['password'] = role.password
|
info['password'] = CRYPTOR.decrypt(role.password)
|
||||||
info['ssh_key'] = get_role_key(ob, role)
|
info['ssh_key'] = get_role_key(ob, role)
|
||||||
res.append(info)
|
res.append(info)
|
||||||
elif isinstance(ob, User):
|
elif isinstance(ob, User):
|
||||||
|
@ -175,7 +175,7 @@ def gen_resource(ob, ex='', perm=None):
|
||||||
except IndexError:
|
except IndexError:
|
||||||
continue
|
continue
|
||||||
info['username'] = role.name
|
info['username'] = role.name
|
||||||
info['password'] = role.password
|
info['password'] = CRYPTOR.decrypt(role.password)
|
||||||
info['ssh_key'] = get_role_key(ob, role)
|
info['ssh_key'] = get_role_key(ob, role)
|
||||||
res.append(info)
|
res.append(info)
|
||||||
elif isinstance(ob, (list, QuerySet)):
|
elif isinstance(ob, (list, QuerySet)):
|
||||||
|
|
|
@ -24,11 +24,11 @@
|
||||||
|
|
||||||
<div class="ibox-content">
|
<div class="ibox-content">
|
||||||
<form id="asset_form">
|
<form id="asset_form">
|
||||||
{# <div class="col-sm-1">#}
|
<div class="col-sm-1" style="padding-left: 0">
|
||||||
{# <a target="_blank" href="/jasset/group_add/" class="btn btn-sm btn-primary "> 添加资产 </a>#}
|
<a target="_blank" href="/jasset/group_add/" class="btn btn-sm btn-primary "> 添加资产 </a>
|
||||||
{# </div>#}
|
</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-7" style="padding-left: 0px">
|
||||||
<label>
|
<label>
|
||||||
<select name="idc" class="form-control m-b" onchange="change_info()">
|
<select name="idc" class="form-control m-b" onchange="change_info()">
|
||||||
<option value="">IDC机房</option>
|
<option value="">IDC机房</option>
|
||||||
|
@ -55,19 +55,6 @@
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</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>
|
<label>
|
||||||
<select name="asset_type" class="form-control m-b" onchange="change_info()">
|
<select name="asset_type" class="form-control m-b" onchange="change_info()">
|
||||||
<option value="">所有类型</option>
|
<option value="">所有类型</option>
|
||||||
|
@ -95,7 +82,7 @@
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm-4">
|
<div class="col-sm-4" style="padding-right: 0">
|
||||||
<div class="input-group inline-group">
|
<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" class="form-control m-b" id="search_input" name="keyword" value="{{ keyword }}" placeholder="Search">
|
||||||
<input type="text" style="display: none">
|
<input type="text" style="display: none">
|
||||||
|
|
Loading…
Reference in New Issue