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,
|
// "showAssets": false,
|
||||||
// }
|
// }
|
||||||
function initNodeTree(options) {
|
function initNodeTree(options) {
|
||||||
|
if (options.showAssets) {
|
||||||
|
treeUrl = setUrlParam(treeUrl, 'assets', '1')
|
||||||
|
}
|
||||||
var setting = {
|
var setting = {
|
||||||
view: {
|
view: {
|
||||||
dblClickExpand: false,
|
dblClickExpand: false,
|
||||||
|
@ -106,10 +109,6 @@ function initNodeTree(options) {
|
||||||
beforeAsync: options.beforeAsync || defaultCallback("Before async")
|
beforeAsync: options.beforeAsync || defaultCallback("Before async")
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (options.showAssets) {
|
|
||||||
treeUrl = setUrlParam(treeUrl, 'assets', '1')
|
|
||||||
}
|
|
||||||
|
|
||||||
$.get(treeUrl, function(data, status){
|
$.get(treeUrl, function(data, status){
|
||||||
zNodes = data;
|
zNodes = data;
|
||||||
zTree = $.fn.zTree.init($("#nodeTree"), setting, zNodes);
|
zTree = $.fn.zTree.init($("#nodeTree"), setting, zNodes);
|
||||||
|
|
|
@ -200,7 +200,7 @@ function initTree() {
|
||||||
onSelected: onNodeSelected,
|
onSelected: onNodeSelected,
|
||||||
beforeAsync: beforeNodeAsync,
|
beforeAsync: beforeNodeAsync,
|
||||||
showMenu: false,
|
showMenu: false,
|
||||||
showAssets: true,
|
showAssets: true
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue