Fixed no data found in tree view

This commit is contained in:
Daniel Maya 2021-04-12 12:14:47 +02:00
parent 9184d2b11f
commit 22914f410c

View File

@ -356,6 +356,10 @@ enterprise_hook('close_meta_frame');
if (data.success) {
$(".loading_tree").hide();
var foundMessage = '';
if (data.tree.length === 0) {
foundMessage = "<?php echo __('No data found'); ?>";
$("div#tree-controller-recipient").append(foundMessage);
} else {
switch (parameters['type']) {
case 'policies':
foundMessage = "<?php echo __('Policies found'); ?>";
@ -377,6 +381,8 @@ enterprise_hook('close_meta_frame');
foundMessage = "<?php echo __('Groups found'); ?>";
break;
}
}
treeController.init({
recipient: $("div#tree-controller-recipient"),