mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-06 18:00:57 +00:00
Asset favor (#3352)
* [Update] 拆分filter org * [Update] 修改session支持protocol搜索 * [Bugfix] 修复判断问题 * [Update] 支持收藏资产 * [update] 修改org resource queryset * [Update] 修改form serializer 对应的多对多字段 * [Bugfix] 修复其他组织取消收藏的bug * [Update] 去掉debug信息 * [Update] 修改remote app get queryset * [Update] 修改remote app get queryset * [Update] 修改没有授权时显示情况 * [Bugfix] 修复组织管理员查看用户权限失败问题 * [Update] 优化forms assets queryset设置
This commit is contained in:
@@ -267,7 +267,7 @@ function requestApi(props) {
|
||||
$.ajax({
|
||||
url: props.url,
|
||||
type: props.method || "PATCH",
|
||||
data: props.body,
|
||||
data: props.body || props.data,
|
||||
contentType: props.content_type || "application/json; charset=utf-8",
|
||||
dataType: props.data_type || "json"
|
||||
}).done(function (data, textStatue, jqXHR) {
|
||||
@@ -579,6 +579,9 @@ jumpserver.initServerSideDataTable = function (options) {
|
||||
ajax: {
|
||||
url: options.ajax_url,
|
||||
error: function (jqXHR, textStatus, errorThrown) {
|
||||
if (jqXHR.responseText && jqXHR.responseText.indexOf("%(value)s") !== -1 ) {
|
||||
return
|
||||
}
|
||||
var msg = gettext("Unknown error occur");
|
||||
if (jqXHR.responseJSON) {
|
||||
if (jqXHR.responseJSON.error) {
|
||||
@@ -953,8 +956,13 @@ function initPopover($container, $progress, $idPassword, $el, password_check_rul
|
||||
function rootNodeAddDom(ztree, callback) {
|
||||
var refreshIcon = "<a id='tree-refresh'><i class='fa fa-refresh'></i></a>";
|
||||
var rootNode = ztree.getNodes()[0];
|
||||
var $rootNodeRef = $("#" + rootNode.tId + "_a");
|
||||
$rootNodeRef.after(refreshIcon);
|
||||
if (rootNode) {
|
||||
var $rootNodeRef = $("#" + rootNode.tId + "_a");
|
||||
$rootNodeRef.after(refreshIcon);
|
||||
} else {
|
||||
$rootNodeRef = $('#' + ztree.setting.treeId);
|
||||
$rootNodeRef.html(refreshIcon);
|
||||
}
|
||||
var refreshIconRef = $('#tree-refresh');
|
||||
refreshIconRef.bind('click', function () {
|
||||
ztree.destroy();
|
||||
|
Reference in New Issue
Block a user