[Console Tree view] Added counter

This commit is contained in:
fermin831 2018-02-27 11:46:28 +01:00
parent 85bc975606
commit 80ecb6f366
2 changed files with 11 additions and 0 deletions

View File

@ -20,6 +20,7 @@ var TreeController = {
recipient: '',
tree: [],
emptyMessage: "No data found.",
foundMessage: "Found items",
errorMessage: "Error",
baseURL: "",
ajaxURL: "ajax.php",
@ -683,6 +684,12 @@ var TreeController = {
}
controller.recipient.empty();
controller.recipient.html(
"<div> " +
controller.foundMessage + ": " + controller.tree.length +
"</div>" +
"<br/>"
);
var $children = _processGroup(this.recipient, this.tree, true);
$children.show();
@ -712,6 +719,9 @@ var TreeController = {
if (typeof data.emptyMessage !== 'undefined' && data.emptyMessage.length > 0) {
this.emptyMessage = data.emptyMessage;
}
if (typeof data.foundMessage !== 'undefined' && data.foundMessage.length > 0) {
this.foundMessage = data.foundMessage;
}
if (typeof data.errorMessage !== 'undefined' && data.errorMessage.length > 0) {
this.errorMessage = data.errorMessage;
}

View File

@ -283,6 +283,7 @@ enterprise_hook('close_meta_frame');
detailRecipient: $.fixedBottomBox({ width: 400, height: window.innerHeight * 0.9 }),
page: parameters['page'],
emptyMessage: "<?php echo __('No data found'); ?>",
foundMessage: "<?php echo __('Found items'); ?>",
tree: data.tree,
baseURL: "<?php echo ui_get_full_url(false, false, false, is_metaconsole()); ?>",
ajaxURL: "<?php echo ui_get_full_url('ajax.php', false, false, false); ?>",