Merge branch '2896-Vista-de-monitores-en-metaconsola' into 'develop'

first load it does not show the data

See merge request artica/pandorafms!2112

Former-commit-id: 5f88566e4123c079956274ac4f7db27316e11718
This commit is contained in:
Daniel Rodriguez 2019-01-14 19:21:01 +01:00
commit f68cc53bb2

View File

@ -552,7 +552,7 @@ if (is_metaconsole()) {
$filters .= html_print_table($table, true);
$filters .= "</form>";
ui_toggle($filters, __('Show Options'));
ui_toggle($filters, __('Show Options'), '', false);
}
else {
$table->colspan[3][0] = 7;
@ -778,15 +778,19 @@ $sql = 'SELECT
ORDER BY ' . $order['field'] . " " . $order['order'] . '
LIMIT '.$offset.",".$limit_sql;
// When you enter for the first time you have less than 4 query params in the url
$first_interaction = count($_GET) > 4;
// We do not show the modules until the user searches with the filter
if ($first_interaction) {
if (! defined ('METACONSOLE')) {
$result = db_get_all_rows_sql($sql);
if ($result === false) {
$result = array();
}
else
} else {
ui_pagination($count, false, $offset);
}
}
else {
// For each server defined and not disabled:
$servers = db_get_all_rows_sql('SELECT *
@ -857,6 +861,7 @@ else {
// Get number of elements of the pagination
$result = ui_meta_get_subset_array($result, $inferior_limit, $superior_limit);
}
}
if (($config['dbtype'] == 'oracle') && ($result !== false)) {
for ($i=0; $i < count($result); $i++) {
@ -1391,9 +1396,14 @@ if (!empty($result)) {
}
html_print_table ($table);
}
else
} else {
if ($first_interaction) {
ui_print_info_message(array('no_close' => true, 'message' => __('This group doesn\'t have any monitor')));
} else {
ui_print_info_message(array('no_close' => true, 'message' => __('Sorry no search parameters')));
}
}
// End Build List Result
/////////////////////////////////////