mirror of https://github.com/jumpserver/jumpserver
[Bugfix] 修复命令过滤器详情页 删除功能无效的bug
parent
875a069a18
commit
3c166abd2d
|
@ -29,7 +29,7 @@
|
|||
<a class="btn btn-outline btn-default" href="{% url 'assets:cmd-filter-update' pk=object.id %}"><i class="fa fa-edit"></i>{% trans 'Update' %}</a>
|
||||
</li>
|
||||
<li class="pull-right">
|
||||
<a class="btn btn-outline btn-danger btn-del">
|
||||
<a class="btn btn-outline btn-danger btn-del btn-delete-cmd-filter">
|
||||
<i class="fa fa-trash-o"></i>{% trans 'Delete' %}
|
||||
</a>
|
||||
</li>
|
||||
|
@ -164,5 +164,13 @@ $(document).ready(function () {
|
|||
});
|
||||
updateCMDFilterSystemUsers(system_users)
|
||||
})
|
||||
.on('click', '.btn-delete-cmd-filter', function () {
|
||||
var $this = $(this);
|
||||
var name = "{{object.name }}";
|
||||
var uid = "{{ object.id }}";
|
||||
var the_url = '{% url "api-assets:cmd-filter-detail" pk=DEFAULT_PK %}'.replace('{{ DEFAULT_PK }}', uid);
|
||||
var redirect_url = "{% url 'assets:cmd-filter-list' %}";
|
||||
objectDelete($this, name, the_url, redirect_url);
|
||||
})
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue