Change views and styles in Console

This commit is contained in:
m-lopez-f 2015-04-01 13:24:53 +02:00
parent acfd2146dc
commit 0213cd7405
12 changed files with 99 additions and 99 deletions

View File

@ -34,7 +34,7 @@ $agent_name = agents_get_name($id_agente);
$agent_name = md5($agent_name); $agent_name = md5($agent_name);
/* Map with the current position */ /* Map with the current position */
echo "<div id=\"" . $agent_name . "_agent_map\" style=\"border:1px solid black; width:98%; height: 30em;\"></div>"; echo "<div id=\"" . $agent_name . "_agent_map\" style=\"border:1px solid black; width:100%; height: 30em;\"></div>";
if (!gis_get_agent_map($id_agente, "500px", "98%", false)) { if (!gis_get_agent_map($id_agente, "500px", "98%", false)) {
ui_print_error_message(__("There is no default map. Please go to the setup for to set a default map.")); ui_print_error_message(__("There is no default map. Please go to the setup for to set a default map."));
@ -51,27 +51,30 @@ if ($agentData === false) {
echo "<div class='warn'>" . echo "<div class='warn'>" .
__("Warning: When you change the Agent position, the agent automatically activates the 'Ignore new GIS data' option") . "</div>"; __("Warning: When you change the Agent position, the agent automatically activates the 'Ignore new GIS data' option") . "</div>";
$table->width = '85%'; $table->width = '100%';
$table->class = 'databox filters';
$table->data = array(); $table->data = array();
$table->cellpadding = 0;
$table->cellspacing = 0;
$table->head[0] =__('Agent position'); $table->head[0] =__('Agent position');
$table->head_colspan[0] = 2; $table->head_colspan[0] = 4;
$table->headstyle[0] = "text-align:center";
$table->data[1][0] = __('Latitude: '); $table->data[1][0] = __('Latitude: ');
$table->data[1][1] = html_print_input_text_extended ('latitude', $agentData['stored_latitude'], 'text-latitude', '', 20, 20, false, '', $table->data[1][1] = html_print_input_text_extended ('latitude', $agentData['stored_latitude'], 'text-latitude', '', 20, 20, false, '',
array('onchange' => "setIgnoreGISDataEnabled()", 'onkeyup' => "setIgnoreGISDataEnabled()"), true); array('onchange' => "setIgnoreGISDataEnabled()", 'onkeyup' => "setIgnoreGISDataEnabled()"), true);
$table->data[2][0] = __('Longitude: '); $table->data[1][2] = __('Longitude: ');
$table->data[2][1] = html_print_input_text_extended ('longitude', $agentData['stored_longitude'], 'text-longitude', '', 20, 20, false, '', $table->data[1][3] = html_print_input_text_extended ('longitude', $agentData['stored_longitude'], 'text-longitude', '', 20, 20, false, '',
array('onchange' => "setIgnoreGISDataEnabled()", 'onkeyup' => "setIgnoreGISDataEnabled()"), true); array('onchange' => "setIgnoreGISDataEnabled()", 'onkeyup' => "setIgnoreGISDataEnabled()"), true);
$table->data[3][0] = __('Altitude: '); $table->data[2][0] = __('Altitude: ');
$table->data[3][1] = html_print_input_text_extended ('altitude', $agentData['stored_altitude'], 'text-altitude', '', 10, 10, false, '', $table->data[2][1] = html_print_input_text_extended ('altitude', $agentData['stored_altitude'], 'text-altitude', '', 10, 10, false, '',
array('onchange' => "setIgnoreGISDataEnabled()", 'onkeyup' => "setIgnoreGISDataEnabled()"), true); array('onchange' => "setIgnoreGISDataEnabled()", 'onkeyup' => "setIgnoreGISDataEnabled()"), true);
$table->data[4][0] = __('Ignore new GIS data:'); $table->data[2][2] = __('Ignore new GIS data:');
$table->data[4][1] = __('Yes').' '.html_print_radio_button_extended ("update_gis_data", 0, '', $updateGisData, false, '', 'style="margin-right: 40px;"', true); $table->data[2][3] = __('Yes').' '.html_print_radio_button_extended ("update_gis_data", 0, '', $updateGisData, false, '', 'style="margin-right: 40px;"', true);
$table->data[4][1] .= __('No').' '.html_print_radio_button_extended ("update_gis_data", 1, '', $updateGisData, false, '', 'style="margin-right: 40px;"', true); $table->data[2][3] .= __('No').' '.html_print_radio_button_extended ("update_gis_data", 1, '', $updateGisData, false, '', 'style="margin-right: 40px;"', true);
$url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=gis&id_agente='.$id_agente; $url = 'index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=gis&id_agente='.$id_agente;
echo "<form method='post' action='" . $url . "' onsubmit ='return validateFormFields();'>"; echo "<form method='post' action='" . $url . "' onsubmit ='return validateFormFields();'>";

View File

@ -164,7 +164,6 @@ if (isset ($_POST["template_id"])) {
// TEMPLATE ASSIGMENT FORM // TEMPLATE ASSIGMENT FORM
// ========================== // ==========================
echo "<br>";
echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'">'; echo '<form method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=template&id_agente='.$id_agente.'">';
$nps = db_get_all_fields_in_table ("tnetwork_profile", "name"); $nps = db_get_all_fields_in_table ("tnetwork_profile", "name");
@ -177,7 +176,7 @@ foreach ($nps as $row) {
$select[$row["id_np"]] = $row["name"]; $select[$row["id_np"]] = $row["name"];
} }
echo '<table width="98%" cellpadding="2" cellspacing="2" class="databox" >'; echo '<table width="100%" cellpadding="2" cellspacing="2" class="databox filters" >';
echo "<tr><td class='datos' style='width:50%'>"; echo "<tr><td class='datos' style='width:50%'>";
html_print_select ($select, "template_id", '', '', '', 0, false, false, true, '', false, 'max-width: 200px !important'); html_print_select ($select, "template_id", '', '', '', 0, false, false, true, '', false, 'max-width: 200px !important');
echo '</td>'; echo '</td>';
@ -213,10 +212,10 @@ if ($result === false) {
$result = array (); $result = array ();
} }
$table->width = '98%'; $table->width = '100%';
$table->cellpadding = 4; $table->cellpadding = 4;
$table->cellspacing = 4; $table->cellspacing = 4;
$table->class = "databox"; $table->class = "databox data";
$table->head = array (); $table->head = array ();
$table->data = array (); $table->data = array ();
$table->align = array (); $table->align = array ();

View File

@ -125,7 +125,7 @@ if ($disable_agent) {
__('Successfully disabled'), __('Could not be disabled')); __('Successfully disabled'), __('Could not be disabled'));
} }
echo "<table cellpadding='4' cellspacing='4' class='databox' width='98%' style='font-weight: bold; margin-bottom: 10px;'> echo "<table cellpadding='4' cellspacing='4' class='databox filters' width='100%' style='font-weight: bold; margin-bottom: 10px;'>
<tr>"; <tr>";
echo "<form method='post' echo "<form method='post'
action='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'>"; action='index.php?sec=gagente&sec2=godmode/agentes/modificar_agente'>";
@ -164,14 +164,6 @@ echo "</form>";
echo "<td>"; echo "<td>";
echo "</tr></table>"; echo "</tr></table>";
echo '<div style="text-align: right; float: right;">';
echo '<form method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente">';
html_print_input_hidden ('new_agent', 1);
html_print_submit_button (__('Create agent'), 'crt-1', false, 'class="sub next"');
echo "</form>";
echo "</div>";
$order_collation = ""; $order_collation = "";
switch ($config["dbtype"]) { switch ($config["dbtype"]) {
case "mysql": case "mysql":
@ -420,7 +412,7 @@ ui_pagination ($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modifi
if ($agents !== false) { if ($agents !== false) {
echo "<table cellpadding='4' id='agent_list' cellspacing='4' width='98%' class='databox'>"; echo "<table cellpadding='4' id='agent_list' cellspacing='4' width='100%' class='databox data'>";
echo "<th>".__('Agent name') . ' ' . echo "<th>".__('Agent name') . ' ' .
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search .'&offset='.$offset.'&sort_field=name&sort=up&disabled=$disabled">' . html_print_image("images/sort_up.png", true, array("style" => $selectNameUp)) . '</a>' . '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search .'&offset='.$offset.'&sort_field=name&sort=up&disabled=$disabled">' . html_print_image("images/sort_up.png", true, array("style" => $selectNameUp)) . '</a>' .
'<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search .'&offset='.$offset.'&sort_field=name&sort=down&disabled=$disabled">' . html_print_image("images/sort_down.png", true, array("style" => $selectNameDown)) . '</a>'; '<a href="index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id='.$ag_group.'&recursion='.$recursion.'&search='.$search .'&offset='.$offset.'&sort_field=name&sort=down&disabled=$disabled">' . html_print_image("images/sort_down.png", true, array("style" => $selectNameDown)) . '</a>';
@ -570,7 +562,7 @@ if ($agents !== false) {
} }
echo "</table>"; echo "</table>";
ui_pagination ($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group&search=$search&sort_field=$sortField&sort=$sort&disabled=$disabled", $offset); ui_pagination ($total_agents, "index.php?sec=gagente&sec2=godmode/agentes/modificar_agente&group_id=$ag_group&search=$search&sort_field=$sortField&sort=$sort&disabled=$disabled", $offset);
echo "<table width='98%'><tr><td align='right'>"; echo "<table width='100%'><tr><td align='right'>";
} }
else { else {
echo "<div class='nf'>" . __('There are no defined agents') . "</div>"; echo "<div class='nf'>" . __('There are no defined agents') . "</div>";
@ -579,7 +571,7 @@ else {
if (check_acl ($config["id_user"], 0, "AW")) { if (check_acl ($config["id_user"], 0, "AW")) {
// Create agent button // Create agent button
echo '<div style="text-align: right; float: right;">'; echo '<div style="text-align: right;">';
echo '<form method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente">'; echo '<form method="post" action="index.php?sec=gagente&amp;sec2=godmode/agentes/configurar_agente">';
html_print_input_hidden ('new_agent', 1); html_print_input_hidden ('new_agent', 1);
html_print_submit_button (__('Create agent'), 'crt-2', false, html_print_submit_button (__('Create agent'), 'crt-2', false,

View File

@ -32,7 +32,7 @@ $search_string = io_safe_output(urldecode(trim(get_parameter ("search_string", "
// Search string filter form // Search string filter form
//echo '<form id="create_module_type" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente='.$id_agente.'">'; //echo '<form id="create_module_type" method="post" action="index.php?sec=gagente&sec2=godmode/agentes/configurar_agente&tab=module&id_agente='.$id_agente.'">';
echo '<form id="create_module_type" method="post" action="'.$url.'">'; echo '<form id="create_module_type" method="post" action="'.$url.'">';
echo '<table width="98%" cellpadding="2" cellspacing="2" class="databox" >'; echo '<table width="100%" cellpadding="2" cellspacing="2" class="databox filters" >';
echo "<tr><td class='datos' style='width:20%'>"; echo "<tr><td class='datos' style='width:20%'>";
echo __('Search') . ' ' . echo __('Search') . ' ' .
html_print_input_text ('search_string', $search_string, '', 15, 255, true); html_print_input_text ('search_string', $search_string, '', 15, 255, true);
@ -40,8 +40,8 @@ echo "</td>";
echo "<td class='datos' style='width:20%'>"; echo "<td class='datos' style='width:20%'>";
html_print_submit_button (__('Filter'), 'filter', false, 'class="sub search"'); html_print_submit_button (__('Filter'), 'filter', false, 'class="sub search"');
echo "</td>"; echo "</td>";
echo "<td class='datos' style='width:20%'>"; echo "<td class='datos' style='width:20%'></td>";
echo '</form>'; //echo '</form>';
// Check if there is at least one server of each type available to assign that // Check if there is at least one server of each type available to assign that
// kind of modules. If not, do not show server type in combo // kind of modules. If not, do not show server type in combo
@ -110,7 +110,8 @@ if (($policy_page) || (isset($agent))) {
if ($show_creation) { if ($show_creation) {
// Create module/type combo // Create module/type combo
echo '<form id="create_module_type" method="post" action="'.$url.'">'; //echo '<form id="create_module_type" method="post" action="'.$url.'">';
echo '<td class="datos">';
html_print_select ($modules, 'moduletype', '', '', '', '', false, false, false, '', false, 'max-width:300px;' ); html_print_select ($modules, 'moduletype', '', '', '', '', false, false, false, '', false, 'max-width:300px;' );
html_print_input_hidden ('edit_module', 1); html_print_input_hidden ('edit_module', 1);
echo '</td>'; echo '</td>';
@ -118,13 +119,14 @@ if (($policy_page) || (isset($agent))) {
echo '<input align="right" name="updbutton" type="submit" class="sub next" value="'.__('Create').'">'; echo '<input align="right" name="updbutton" type="submit" class="sub next" value="'.__('Create').'">';
echo '</td>'; echo '</td>';
echo '</tr>'; echo '</tr>';
echo "</form>"; //echo "</form>";
} }
} }
echo "</table>"; echo "</table>";
echo "</form>";
echo '<div style="text-align: right; width: 98%;">'; echo '<div style="text-align: right; width: 100%;">';
echo "<strong>"; echo "<strong>";
echo "<a style='color: #004A1B;' target='_blank' href='http://pandorafms.com/Library/Library/'>".__("Get more modules in Pandora FMS Library")."</a>"; echo "<a style='color: #004A1B;' target='_blank' href='http://pandorafms.com/Library/Library/'>".__("Get more modules in Pandora FMS Library")."</a>";
echo "</strong>"; echo "</strong>";
@ -494,7 +496,8 @@ if ($paginate_module) {
ui_pagination($total_modules, $url); ui_pagination($total_modules, $url);
} }
$table->width = '98%'; $table->width = '100%';
$table->class = 'databox data';
$table->head = array (); $table->head = array ();
$table->head[0] = __('Name') . ' ' . $table->head[0] = __('Name') . ' ' .
'<a href="' . $url . '&sort_field=name&sort=up">' . html_print_image("images/sort_up.png", true, array("style" => $selectNameUp)) . '</a>' . '<a href="' . $url . '&sort_field=name&sort=up">' . html_print_image("images/sort_up.png", true, array("style" => $selectNameUp)) . '</a>' .

View File

@ -31,14 +31,14 @@ include_once($config['homedir'] . '/include/functions_users.php');
$pure = get_parameter('pure', 0); $pure = get_parameter('pure', 0);
$table->id = 'add_alert_table'; $table->id = 'add_alert_table';
$table->class = 'databox'; $table->class = 'databox filters';
$table->width = '98%'; $table->width = '100%';
$table->head = array (); $table->head = array ();
$table->data = array (); $table->data = array ();
$table->size = array (); $table->size = array ();
$table->size = array (); $table->size = array ();
$table->size[0] = '20%'; $table->size[0] = '20%';
$table->size[1] = '80%'; $table->size[1] = '30%';
$table->style[0] = 'font-weight: bold; vertical-align: top;'; $table->style[0] = 'font-weight: bold; vertical-align: top;';
$table->align[0] = 'left'; $table->align[0] = 'left';
$table->align[1] = 'left'; $table->align[1] = 'left';
@ -76,7 +76,7 @@ $table->data[0][1] .= '<span id="value">&nbsp;</span></span>';
$table->data[0][1] .= ' <span id="module_loading" class="invisible">'; $table->data[0][1] .= ' <span id="module_loading" class="invisible">';
$table->data[0][1] .= html_print_image('images/spinner.png', true) . '</span>'; $table->data[0][1] .= html_print_image('images/spinner.png', true) . '</span>';
$table->data[1][0] = __('Template'); $table->data[0][2] = __('Template');
$own_info = get_user_info ($config['id_user']); $own_info = get_user_info ($config['id_user']);
if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM")) if ($own_info['is_admin'] || check_acl ($config['id_user'], 0, "PM"))
$templates = alerts_get_alert_templates (false, array ('id', 'name')); $templates = alerts_get_alert_templates (false, array ('id', 'name'));
@ -87,18 +87,18 @@ else {
$templates = alerts_get_alert_templates (array ('id_group IN (' . $filter_groups . ')'), array ('id', 'name')); $templates = alerts_get_alert_templates (array ('id_group IN (' . $filter_groups . ')'), array ('id', 'name'));
} }
$table->data[1][1] = html_print_select (index_array ($templates, 'id', 'name'), $table->data[0][3] = html_print_select (index_array ($templates, 'id', 'name'),
'template', '', '', __('Select'), 0, true, false, true, '', false, 'width: 250px;'); 'template', '', '', __('Select'), 0, true, false, true, '', false, 'width: 250px;');
$table->data[1][1] .= ' <a class="template_details invisible" href="#">' . $table->data[0][3] .= ' <a class="template_details invisible" href="#">' .
html_print_image("images/zoom.png", true, array("class" => 'img_help')) . '</a>'; html_print_image("images/zoom.png", true, array("class" => 'img_help')) . '</a>';
if (check_acl ($config['id_user'], 0, "LM")) { if (check_acl ($config['id_user'], 0, "LM")) {
$table->data[1][1] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template&pure='.$pure.'">'; $table->data[0][3] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_template&pure='.$pure.'">';
$table->data[1][1] .= html_print_image ('images/add.png', true); $table->data[0][3] .= html_print_image ('images/add.png', true);
$table->data[1][1] .= __('Create Template'); $table->data[0][3] .= __('Create Template');
$table->data[1][1] .= '</a>'; $table->data[0][3] .= '</a>';
} }
$table->data[2][0] = __('Actions'); $table->data[1][0] = __('Actions');
$groups_user = users_get_groups($config["id_user"]); $groups_user = users_get_groups($config["id_user"]);
if (!empty($groups_user)) { if (!empty($groups_user)) {
@ -106,28 +106,27 @@ if (!empty($groups_user)) {
$sql = "SELECT id, name FROM talert_actions WHERE id_group IN ($groups)"; $sql = "SELECT id, name FROM talert_actions WHERE id_group IN ($groups)";
$actions = db_get_all_rows_sql($sql); $actions = db_get_all_rows_sql($sql);
} }
$table->data[2][1] = '<div class="actions_container">';
$table->data[2][1] .= html_print_select( $table->data[1][1] = html_print_select(
index_array($actions, 'id', 'name'), 'action_select', '', '', index_array($actions, 'id', 'name'), 'action_select', '', '',
__('Default action'), '0', true, '', true, '', false, __('Default action'), '0', true, '', true, '', false,
'width: 250px;'); 'width: 250px;');
$table->data[2][1] .= '<span id="advanced_action" class="advanced_actions invisible"><br>'; $table->data[1][1] .= '<span id="advanced_action" class="advanced_actions invisible"><br>';
$table->data[2][1] .= __('Number of alerts match from').' '; $table->data[1][1] .= __('Number of alerts match from').' ';
$table->data[2][1] .= html_print_input_text ('fires_min', '', '', 4, 10, true); $table->data[1][1] .= html_print_input_text ('fires_min', '', '', 4, 10, true);
$table->data[2][1] .= ' ' . __('to') . ' '; $table->data[1][1] .= ' ' . __('to') . ' ';
$table->data[2][1] .= html_print_input_text ('fires_max', '', '', 4, 10, true); $table->data[1][1] .= html_print_input_text ('fires_max', '', '', 4, 10, true);
$table->data[2][1] .= ui_print_help_icon ("alert-matches", true, $table->data[1][1] .= ui_print_help_icon ("alert-matches", true,
ui_get_full_url(false, false, false, false)); ui_get_full_url(false, false, false, false));
$table->data[2][1] .= '</span>'; $table->data[1][1] .= '</span>';
$table->data[2][1] .= '</div>';
if (check_acl ($config['id_user'], 0, "LM")) { if (check_acl ($config['id_user'], 0, "LM")) {
$table->data[2][1] .= '<br>' . html_print_image ('images/add.png', true); $table->data[1][1] .= '' . html_print_image ('images/add.png', true);
$table->data[2][1] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_action&pure='.$pure.'">'; $table->data[1][1] .= '<a href="index.php?sec=galertas&sec2=godmode/alerts/configure_alert_action&pure='.$pure.'">';
$table->data[2][1] .= __('Create Action'); $table->data[1][1] .= __('Create Action');
$table->data[2][1] .= '</a>'; $table->data[1][1] .= '</a>';
} }
$table->data[3][0] = __('Threshold'); $table->data[1][2] = __('Threshold');
$table->data[3][1] = html_print_extended_select_for_time ('module_action_threshold', 0, '', 0, $table->data[1][3] = html_print_extended_select_for_time ('module_action_threshold', 0, '', 0,
__('None'), false, true) . ui_print_help_icon ('action_threshold', true, ui_get_full_url(false, false, false, false)); __('None'), false, true) . ui_print_help_icon ('action_threshold', true, ui_get_full_url(false, false, false, false));
echo '<form class="add_alert_form" method="post">'; echo '<form class="add_alert_form" method="post">';

View File

@ -50,7 +50,7 @@ else {
// Table for filter controls // Table for filter controls
$form_filter = '<form method="post" action="index.php?sec=' . $sec . '&amp;sec2=' . $sec2 . '&amp;refr=' . ((int)get_parameter('refr', 0)) . '&amp;pure='.$config["pure"].'">'; $form_filter = '<form method="post" action="index.php?sec=' . $sec . '&amp;sec2=' . $sec2 . '&amp;refr=' . ((int)get_parameter('refr', 0)) . '&amp;pure='.$config["pure"].'">';
$form_filter .= "<input type='hidden' name='search' value='1' />\n"; $form_filter .= "<input type='hidden' name='search' value='1' />\n";
$form_filter .= '<table style="width: 98%;" cellpadding="4" cellspacing="4" class="databox">'."\n"; $form_filter .= '<table style="width: 100%;" cellpadding="0" cellspacing="0" class="databox filters">'."\n";
$form_filter .= "<tr>\n"; $form_filter .= "<tr>\n";
$form_filter .= "<td>" . __('Template name') . "</td><td>"; $form_filter .= "<td>" . __('Template name') . "</td><td>";
$form_filter .= html_print_input_text ('template_name', $templateName, '', 12, 255, true); $form_filter .= html_print_input_text ('template_name', $templateName, '', 12, 255, true);
@ -325,7 +325,7 @@ else {
} }
$table->class = 'alert_list databox'; $table->class = 'alert_list databox';
$table->width = '98%'; $table->width = '100%';
$table->size = array (); $table->size = array ();
$table->align[2] = 'left'; $table->align[2] = 'left';

View File

@ -34,8 +34,7 @@ svg * {
font-size: 11pt; font-size: 11pt;
} }
body { body {
text-align: center; background-color: #FFF;
background-color: #fafafa;
margin: 0 auto; margin: 0 auto;
} }

View File

@ -52,7 +52,8 @@ if ($fields === false) {
echo "<div class='nf'>". __("No fields defined"). "</div>"; echo "<div class='nf'>". __("No fields defined"). "</div>";
} }
else { else {
$table->width = '98%'; $table->width = '100%';
$table->class = 'databox data';
$table->head = array (); $table->head = array ();
$table->head[0] = __('Field'); $table->head[0] = __('Field');
$table->head[1] = __('Display on front') . $table->head[1] = __('Display on front') .
@ -60,7 +61,7 @@ else {
$table->head[2] = __('Description'); $table->head[2] = __('Description');
$table->align = array (); $table->align = array ();
$table->align[1] = 'center'; $table->align[1] = 'center';
$table->align[2] = 'center'; $table->align[2] = 'left';
$table->data = array (); $table->data = array ();
foreach ($fields as $field) { foreach ($fields as $field) {

View File

@ -155,10 +155,10 @@ if (isset($result_delete)) {
ui_print_error_message(__("There was an error message deleting the agent")); ui_print_error_message(__("There was an error message deleting the agent"));
} }
echo '<table cellpadding="4" cellspacing="4" class="databox" width="98%" style="font-weight: bold; margin-bottom: 10px;">';
echo '<form method="post" action="?sec=estado&sec2=operation/agentes/estado_agente&group_id=' . $group_id . '">'; echo '<form method="post" action="?sec=estado&sec2=operation/agentes/estado_agente&group_id=' . $group_id . '">';
echo '<table cellpadding="4" cellspacing="4" class="databox filters" width="100%" style="font-weight: bold; margin-bottom: 10px;">';
echo '<tr><td style="white-space:nowrap;">'; echo '<tr><td style="white-space:nowrap;">';
echo __('Group') . '&nbsp;'; echo __('Group') . '&nbsp;';
@ -193,9 +193,9 @@ echo '</td><td style="white-space:nowrap;">';
html_print_submit_button (__('Search'), "srcbutton", '', array ("class" => "sub search")); html_print_submit_button (__('Search'), "srcbutton", '', array ("class" => "sub search"));
echo '</td><td style="width:5%;">&nbsp;</form></td>'; echo '</td><td style="width:5%;">&nbsp;</td>';
echo '</tr></table>'; echo '</tr></table></form>';
if (check_acl ($config['id_user'], 0, "AW") || check_acl ($config['id_user'], 0, "AM")) { if (check_acl ($config['id_user'], 0, "AW") || check_acl ($config['id_user'], 0, "AM")) {
echo '<div style="text-align: right; float: right;">'; echo '<div style="text-align: right; float: right;">';
@ -432,8 +432,8 @@ ui_pagination ($total_agents,
// Show data. // Show data.
$table->cellpadding = 4; $table->cellpadding = 4;
$table->cellspacing = 4; $table->cellspacing = 4;
$table->width = "98%"; $table->width = "100%";
$table->class = "databox"; $table->class = "databox data";
$table->head = array (); $table->head = array ();
$table->head[0] = __('Agent'). ' ' . $table->head[0] = __('Agent'). ' ' .

View File

@ -60,10 +60,10 @@ if (! check_acl ($config["id_user"], $agent["id_grupo"], "AR") && !$is_extra) {
// START: TABLE AGENT BUILD // START: TABLE AGENT BUILD
$table_agent->id = 'agent_details_main'; $table_agent->id = 'agent_details_main';
$table_agent->width = '100%'; $table_agent->width = '450px';
$table_agent->cellspacing = 4; $table_agent->cellspacing = 4;
$table_agent->cellpadding = 4; $table_agent->cellpadding = 4;
$table_agent->class = 'databox_frame'; $table_agent->class = 'databox';
$table_agent->style[0] = 'width: 16px; text-align:center; padding: 0px;'; $table_agent->style[0] = 'width: 16px; text-align:center; padding: 0px;';
$table_agent->style[5] = 'width: 16px; text-align:center; padding: 0px;'; $table_agent->style[5] = 'width: 16px; text-align:center; padding: 0px;';
$table_agent->styleTable = 'padding:0px;'; $table_agent->styleTable = 'padding:0px;';
@ -186,7 +186,7 @@ $table_contact->id = 'agent_contact_main';
$table_contact->width = '100%'; $table_contact->width = '100%';
$table_contact->cellspacing = 4; $table_contact->cellspacing = 4;
$table_contact->cellpadding = 4; $table_contact->cellpadding = 4;
$table_contact->class = 'databox'; $table_contact->class = 'databox data';
$table_contact->style[0] = 'width: 30%;'; $table_contact->style[0] = 'width: 30%;';
$table_contact->style[1] = 'width: 70%;'; $table_contact->style[1] = 'width: 70%;';
@ -229,7 +229,7 @@ $table_data->id = 'agent_data_main';
$table_data->width = '100%'; $table_data->width = '100%';
$table_data->cellspacing = 4; $table_data->cellspacing = 4;
$table_data->cellpadding = 4; $table_data->cellpadding = 4;
$table_data->class = 'databox'; $table_data->class = 'databox data';
$table_data->style[0] = 'width: 30%;'; $table_data->style[0] = 'width: 30%;';
$table_data->style[1] = 'width: 70%;'; $table_data->style[1] = 'width: 70%;';
@ -483,23 +483,23 @@ if (!empty($network_interfaces)) {
$table = null; $table = null;
$table->id = 'agent_details'; $table->id = 'agent_details';
$table->width = '98%'; $table->width = '100%';
$table->cellspacing = 4; $table->cellspacing = 4;
$table->cellpadding = 4; $table->cellpadding = 4;
$table->class = 'databox'; $table->class = 'agents';
$table->style = array_fill(0, 3, 'vertical-align: top;'); $table->style = array_fill(0, 3, 'vertical-align: top;');
$data = array(); $data = array();
$data[0] = html_print_table($table_agent, true); $data[0] = html_print_table($table_agent, true);
$data[0] .= $data[0] .=
'<fieldset class="databox" style="position: static;"> '<table width=450px class="databox" style="">
<legend style="text-align:left; color: #666;">' . <tr><th>' .
__('Events (24h)') . __('Events (24h)') .
'</legend>' . '</th></tr>' .
'<div style="margin: auto; text-align:center; width: 300px;">' . '<tr><td style="text-align:center;">' .
graph_graphic_agentevents ($id_agente, 300, 15, SECONDS_1DAY, '', true) . graph_graphic_agentevents ($id_agente, 450, 15, SECONDS_1DAY, '', true) .
'</div>' . '</td></tr>' .
'</fieldset>'; '</table>';
// ACCESS RATE GRAPH // ACCESS RATE GRAPH
$access_agent = db_get_value_sql("SELECT COUNT(id_agent) $access_agent = db_get_value_sql("SELECT COUNT(id_agent)
@ -508,16 +508,16 @@ $access_agent = db_get_value_sql("SELECT COUNT(id_agent)
if ($config["agentaccess"] && $access_agent > 0) { if ($config["agentaccess"] && $access_agent > 0) {
$data[0] .= $data[0] .=
'<fieldset class="databox" style="position: static;"> '<table width=100% class="databox" style="position: static;">
<legend style="text-align:left; color: #666;">' . <tr><th>' .
__('Agent access rate (24h)') . __('Agent access rate (24h)') .
'</legend>' . '</th></tr>' .
'<div style="margin: auto; text-align:center; width: 300px;">' . '<tr><td style="margin: auto; text-align:center; width: 300px;">' .
graphic_agentaccess($id_agente, 300, 100, SECONDS_1DAY, true) . graphic_agentaccess($id_agente, 300, 100, SECONDS_1DAY, true) .
'</div>' . '</td></tr>' .
'</fieldset>'; '</table>';
} }
$table->style[0] = 'width:40%;';
$data[1] = html_print_table($table_contact, true); $data[1] = html_print_table($table_contact, true);
$data[1] .= empty($table_data->data) ? $data[1] .= empty($table_data->data) ?
'' : '' :
@ -529,7 +529,7 @@ $data[1] .= !isset($table_interface) ?
'' : '' :
'<br>' . html_print_table($table_interface, true); '<br>' . html_print_table($table_interface, true);
$table->rowspan[0][1] = 2; $table->rowspan[0][1] = 0;
$data[2] = '<div style="width:100%; text-align:right">'; $data[2] = '<div style="width:100%; text-align:right">';
$data[2] .= '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'&amp;refr=60">' . html_print_image("images/refresh.png", true, array("border" => '0', "title" => __('Refresh data'), "alt" => "")) . '</a><br>'; $data[2] .= '<a href="index.php?sec=estado&amp;sec2=operation/agentes/ver_agente&amp;id_agente='.$id_agente.'&amp;refr=60">' . html_print_image("images/refresh.png", true, array("border" => '0', "title" => __('Refresh data'), "alt" => "")) . '</a><br>';

View File

@ -416,7 +416,8 @@ function print_form_filter_monitors($id_agent, $status_filter_monitor = -1,
$status_text_monitor = '', $status_module_group=-1) { $status_text_monitor = '', $status_module_group=-1) {
$form_text = ''; $form_text = '';
$table->class = "databox filters";
$table->width = "100%";
$table->data[0][0] = html_print_input_hidden('filter_monitors', 1, true); $table->data[0][0] = html_print_input_hidden('filter_monitors', 1, true);
$table->data[0][0] .= html_print_input_hidden('monitors_change_filter', 1, true); $table->data[0][0] .= html_print_input_hidden('monitors_change_filter', 1, true);
$table->data[0][0] .= __('Status:'); $table->data[0][0] .= __('Status:');

View File

@ -51,7 +51,7 @@ echo "<div style='margin-bottom: 30px;'></div>";
/* Map with the current position */ /* Map with the current position */
echo "<div id=\"" . $agent_name . "_agent_map\" style=\"border:1px solid black; width:98%; height: 30em;\"></div>"; echo "<div id=\"" . $agent_name . "_agent_map\" style=\"border:1px solid black; width:98%; height: 30em;\"></div>";
if (!gis_get_agent_map($id_agente, "500px", "98%", true, true, $period)) { if (!gis_get_agent_map($id_agente, "500px", "100%", true, true, $period)) {
ui_print_error_message(__("There is no default map. Please go to the setup for to set a default map.")); ui_print_error_message(__("There is no default map. Please go to the setup for to set a default map."));
echo "<script type='text/javascript'> echo "<script type='text/javascript'>
$(document).ready(function() { $(document).ready(function() {
@ -95,11 +95,14 @@ if ($dataLastPosition !== false) {
$dataLastPosition['stored_longitude'] . ", " . $dataLastPosition['stored_latitude'] . ", " . $dataLastPosition['stored_altitude']; $dataLastPosition['stored_longitude'] . ", " . $dataLastPosition['stored_latitude'] . ", " . $dataLastPosition['stored_altitude'];
} }
echo "<br />"; echo "<br />";
echo "<form action='index.php?" . $url . "' method='POST'>"; echo "<form class='' action='index.php?" . $url . "' method='POST'>";
echo __("Period to show data as path") . ": "; echo "<table width=100% class='databox filters'>";
echo "<tr><td>" . __("Period to show data as path") . ": ";
echo "<td>";
html_print_extended_select_for_time ('period', $period, '', '', '0', 10); html_print_extended_select_for_time ('period', $period, '', '', '0', 10);
echo "<td>";
html_print_submit_button(__('Refresh path'), 'refresh', false, 'class = "sub upd"'); html_print_submit_button(__('Refresh path'), 'refresh', false, 'class = "sub upd"');
echo "</form>"; echo "</table></form>";
echo "<h4>" . __("Positional data from the last") . " " . human_time_description_raw ($period) ."</h4>"; echo "<h4>" . __("Positional data from the last") . " " . human_time_description_raw ($period) ."</h4>";
/* Get the total number of Elements for the pagination */ /* Get the total number of Elements for the pagination */