mirror of
https://github.com/jumpserver/jumpserver.git
synced 2026-01-29 21:51:31 +00:00
[Change] 去掉前端html中的hardcode 99991937
This commit is contained in:
@@ -106,7 +106,7 @@
|
||||
}
|
||||
}},
|
||||
{targets: 7, createdCell: function (td, cellData, rowData) {
|
||||
var detail_btn = '<a class="btn btn-xs btn-primary m-l-xs btn-run" data-uid="99991937">{% trans "Detail" %}</a>'.replace('99991937', cellData);
|
||||
var detail_btn = '<a class="btn btn-xs btn-primary m-l-xs btn-run" data-uid="{{ DEFAULT_PK }}">{% trans "Detail" %}</a>'.replace('{{ DEFAULT_PK }}', cellData);
|
||||
if (cellData) {
|
||||
$(td).html(detail_btn);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
}
|
||||
}},
|
||||
{targets: 7, createdCell: function (td, cellData) {
|
||||
var run_btn = '<a class="btn btn-xs btn-primary m-l-xs btn-run" data-uid="99991937">{% trans "Detail" %}</a>'.replace('99991937', cellData);
|
||||
var run_btn = '<a class="btn btn-xs btn-primary m-l-xs btn-run" data-uid="{{ DEFAULT_PK }}">{% trans "Detail" %}</a>'.replace('{{ DEFAULT_PK }}', cellData);
|
||||
if (cellData) {
|
||||
$(td).html(run_btn);
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
var $this = $(this);
|
||||
var name = $(this).closest("tr").find(":nth-child(2)").children('a').html();
|
||||
var uid = $this.data('uid');
|
||||
var the_url = '{% url "api-ops:task-detail" pk=99991937 %}'.replace('99991937', uid);
|
||||
var the_url = '{% url "api-ops:task-detail" pk=DEFAULT_PK %}'.replace('{{ DEFAULT_PK }}', uid);
|
||||
objectDelete($this, name, the_url);
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user