mirror of https://github.com/jumpserver/jumpserver
[Update] 修改授权页面不显示资产的问题
parent
f3b5823cce
commit
533f32ed48
|
@ -69,6 +69,9 @@ var treeUrl = '{% url 'api-assets:node-children-tree' %}?assets=0';
|
|||
// "showAssets": false,
|
||||
// }
|
||||
function initNodeTree(options) {
|
||||
if (options.showAssets) {
|
||||
treeUrl = setUrlParam(treeUrl, 'assets', '1')
|
||||
}
|
||||
var setting = {
|
||||
view: {
|
||||
dblClickExpand: false,
|
||||
|
@ -106,10 +109,6 @@ function initNodeTree(options) {
|
|||
beforeAsync: options.beforeAsync || defaultCallback("Before async")
|
||||
}
|
||||
};
|
||||
if (options.showAssets) {
|
||||
treeUrl = setUrlParam(treeUrl, 'assets', '1')
|
||||
}
|
||||
|
||||
$.get(treeUrl, function(data, status){
|
||||
zNodes = data;
|
||||
zTree = $.fn.zTree.init($("#nodeTree"), setting, zNodes);
|
||||
|
|
|
@ -200,7 +200,7 @@ function initTree() {
|
|||
onSelected: onNodeSelected,
|
||||
beforeAsync: beforeNodeAsync,
|
||||
showMenu: false,
|
||||
showAssets: true,
|
||||
showAssets: true
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue