mirror of https://github.com/jumpserver/jumpserver
fix asset admin count
parent
b5325fd0ac
commit
2829a7ad31
|
@ -296,11 +296,9 @@ def get_role_push_host(role):
|
|||
asset_all = Asset.objects.all()
|
||||
asset_pushed = {}
|
||||
for push in pushs:
|
||||
print push.result
|
||||
asset_pushed[push.asset] = {'success': push.success, 'key': push.is_public_key, 'password': push.is_password,
|
||||
'result': push.result}
|
||||
asset_no_push = set(asset_all) - set(asset_pushed.keys())
|
||||
print asset_no_push, asset_pushed
|
||||
return asset_pushed, asset_no_push
|
||||
|
||||
|
||||
|
|
|
@ -118,6 +118,13 @@
|
|||
{% block self_footer_js %}
|
||||
<script>
|
||||
$('document').ready(function(){
|
||||
var check_default = "{{ default_setting.name }}";
|
||||
console.log(check_default);
|
||||
if (check_default != 'default'){
|
||||
$('#id_use_default_auth').attr('disabled', true);
|
||||
$('#id_use_default_auth').attr('checked', false);
|
||||
$('#admin_account').css('display', 'block');
|
||||
} else {
|
||||
$('#id_use_default_auth').click(function(){
|
||||
if ($(this).is(':checked')){
|
||||
$('#admin_account').css('display', 'none');
|
||||
|
@ -126,6 +133,8 @@
|
|||
$('#admin_account').css('display', 'block');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
var required_fields = ["id_hostname", "id_port"];
|
||||
|
|
Loading…
Reference in New Issue