Unverified Commit 6eaa1bc3 authored by BaiJiangJie's avatar BaiJiangJie Committed by GitHub

Merge pull request #2963 from jumpserver/cmd_filter_detail_delete_bug

[Bugfix] 修复命令过滤器详情页 删除功能无效的bug
parents d8d91744 3c166abd
...@@ -29,7 +29,7 @@ ...@@ -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> <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>
<li class="pull-right"> <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' %} <i class="fa fa-trash-o"></i>{% trans 'Delete' %}
</a> </a>
</li> </li>
...@@ -164,5 +164,13 @@ $(document).ready(function () { ...@@ -164,5 +164,13 @@ $(document).ready(function () {
}); });
updateCMDFilterSystemUsers(system_users) 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> </script>
{% endblock %} {% endblock %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment