|
|
@ -175,7 +175,7 @@
|
|
|
|
<thead>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<th class="text-center">
|
|
|
|
<th class="text-center">
|
|
|
|
<input type="checkbox" id="check_all" onclick="checkAll()">
|
|
|
|
<input type="checkbox" id="check_push" onclick="checkAll('check_push', 'asset_id')">
|
|
|
|
</th>
|
|
|
|
</th>
|
|
|
|
<th class="text-center">主机</th>
|
|
|
|
<th class="text-center">主机</th>
|
|
|
|
<th class="text-center">密钥</th>
|
|
|
|
<th class="text-center">密钥</th>
|
|
|
@ -188,7 +188,7 @@
|
|
|
|
{% for asset, info in pushed_asset.items %}
|
|
|
|
{% for asset, info in pushed_asset.items %}
|
|
|
|
<tr class="gradeX">
|
|
|
|
<tr class="gradeX">
|
|
|
|
<th class="text-center">
|
|
|
|
<th class="text-center">
|
|
|
|
<input type="checkbox" name="checked" value="{{ asset.id }}">
|
|
|
|
<input type="checkbox" name="asset_id" value="{{ asset.id }}">
|
|
|
|
</th>
|
|
|
|
</th>
|
|
|
|
<td class="text-center"> {{ asset.hostname }} </td>
|
|
|
|
<td class="text-center"> {{ asset.hostname }} </td>
|
|
|
|
<td class="text-center"> {{ info.key | yesno:"是,否,未知" }} </td>
|
|
|
|
<td class="text-center"> {{ info.key | yesno:"是,否,未知" }} </td>
|
|
|
@ -220,7 +220,6 @@
|
|
|
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
|
<i class="fa fa-wrench"></i>
|
|
|
|
<i class="fa fa-wrench"></i>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
<a class="close-link">
|
|
|
|
<a class="close-link">
|
|
|
|
<i class="fa fa-times"></i>
|
|
|
|
<i class="fa fa-times"></i>
|
|
|
|
</a>
|
|
|
|
</a>
|
|
|
@ -229,9 +228,13 @@
|
|
|
|
<div class="ibox-content">
|
|
|
|
<div class="ibox-content">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div class="text-left">
|
|
|
|
<div class="text-left">
|
|
|
|
<table class="table table-striped" id="ugedit" >
|
|
|
|
<table class="table table-striped" >
|
|
|
|
|
|
|
|
<a class="btn btn-xs btn-primary push_muti"> 推送 </a>
|
|
|
|
<thead>
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
|
|
|
|
<th class="text-center">
|
|
|
|
|
|
|
|
<input type="checkbox" id="check_no_push" onclick="checkAll('check_no_push', 'asset_no_push_id')">
|
|
|
|
|
|
|
|
</th>
|
|
|
|
<th class="text-center">主机</th>
|
|
|
|
<th class="text-center">主机</th>
|
|
|
|
<th class="text-center">IP</th>
|
|
|
|
<th class="text-center">IP</th>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
@ -239,6 +242,9 @@
|
|
|
|
<tbody>
|
|
|
|
<tbody>
|
|
|
|
{% for asset in need_push_asset %}
|
|
|
|
{% for asset in need_push_asset %}
|
|
|
|
<tr class="gradeX">
|
|
|
|
<tr class="gradeX">
|
|
|
|
|
|
|
|
<th class="text-center">
|
|
|
|
|
|
|
|
<input type="checkbox" name="asset_no_push_id" value="{{ asset.id }}">
|
|
|
|
|
|
|
|
</th>
|
|
|
|
<td class="text-center"> {{ asset.hostname }} </td>
|
|
|
|
<td class="text-center"> {{ asset.hostname }} </td>
|
|
|
|
<td class="text-center"> {{ asset.ip }} </td>
|
|
|
|
<td class="text-center"> {{ asset.ip }} </td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
@ -276,10 +282,11 @@
|
|
|
|
$('.del_muti').click(function(){
|
|
|
|
$('.del_muti').click(function(){
|
|
|
|
var check_array = [];
|
|
|
|
var check_array = [];
|
|
|
|
if (confirm("确定删除")) {
|
|
|
|
if (confirm("确定删除")) {
|
|
|
|
$(".gradeX input:checked").each(function() {
|
|
|
|
$(".gradeX input[name='asset_id']:checked").each(function() {
|
|
|
|
check_array.push($(this).attr("value"))
|
|
|
|
check_array.push($(this).attr("value"))
|
|
|
|
});
|
|
|
|
});
|
|
|
|
var url = '/jperm/role/recycle/?role_id={{ role.id }}&asset_id=' + check_array.join(',');
|
|
|
|
var url = '/jperm/role/recycle/?role_id={{ role.id }}&asset_id=' + check_array.join(',');
|
|
|
|
|
|
|
|
console.log(check_array);
|
|
|
|
$.get(url,
|
|
|
|
$.get(url,
|
|
|
|
{},
|
|
|
|
{},
|
|
|
|
function(data){
|
|
|
|
function(data){
|
|
|
@ -290,6 +297,15 @@
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('.push_muti').click(function(){
|
|
|
|
|
|
|
|
var check_array = [];
|
|
|
|
|
|
|
|
$(".gradeX input[name='asset_no_push_id']:checked").each(function() {
|
|
|
|
|
|
|
|
check_array.push($(this).attr("value"))
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
var url = '/jperm/role/push/?id={{ role.id }}&asset_id=' + check_array.join(',');
|
|
|
|
|
|
|
|
$(this).attr('href', url)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
{% endblock %}
|
|
|
|
{% endblock %}
|