mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
2010-05-20 Raul Mateos <raulofpandora@gmail.com>
* godmode/alerts/alert_list.php: Added code to show different header depending on GET parameter. * godmode/alerts/alert_list_builder.php: Changed final icon. * godmode/agentes/planned_downtime.php: Center some icons. Now table header is shown only if there are planned downtimes. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2775 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
d7fcd8d59b
commit
87d3077ec4
@ -1,3 +1,13 @@
|
|||||||
|
2010-05-20 Raúl Mateos <raulofpandora@gmail.com>
|
||||||
|
|
||||||
|
* godmode/alerts/alert_list.php: Added code to show different
|
||||||
|
header depending on GET parameter.
|
||||||
|
|
||||||
|
* godmode/alerts/alert_list_builder.php: Changed final icon.
|
||||||
|
|
||||||
|
* godmode/agentes/planned_downtime.php: Center some icons. Now table
|
||||||
|
header is shown only if there are planned downtimes.
|
||||||
|
|
||||||
2010-05-20 Ramon Novoa <rnovoa@artica.es>
|
2010-05-20 Ramon Novoa <rnovoa@artica.es>
|
||||||
|
|
||||||
* DEBIAN/control, DEBIAN/make_deb_package.sh,
|
* DEBIAN/control, DEBIAN/make_deb_package.sh,
|
||||||
|
@ -219,6 +219,13 @@ if ($create_downtime || $update_downtime) {
|
|||||||
|
|
||||||
//Start Overview of existing planned downtime
|
//Start Overview of existing planned downtime
|
||||||
echo '<h3>'.__('Agents planned for this downtime').':</h3>';
|
echo '<h3>'.__('Agents planned for this downtime').':</h3>';
|
||||||
|
|
||||||
|
$sql = sprintf ("SELECT tagente.nombre, tplanned_downtime_agents.id, tagente.id_os, tagente.id_agente, tagente.id_grupo, tagente.ultimo_contacto FROM tagente, tplanned_downtime_agents WHERE tplanned_downtime_agents.id_agent = tagente.id_agente AND tplanned_downtime_agents.id_downtime = %d ",$id_downtime);
|
||||||
|
|
||||||
|
$downtimes = get_db_all_rows_sql ($sql);
|
||||||
|
if ($downtimes === false) {
|
||||||
|
echo '<div class="nf">'. __('There are no scheduled downtimes').'</div>';
|
||||||
|
} else {
|
||||||
$table->class = 'databox';
|
$table->class = 'databox';
|
||||||
$table->width = '80%';
|
$table->width = '80%';
|
||||||
$table->data = array ();
|
$table->data = array ();
|
||||||
@ -228,15 +235,7 @@ if ($create_downtime || $update_downtime) {
|
|||||||
$table->head[2] = __('OS');
|
$table->head[2] = __('OS');
|
||||||
$table->head[3] = __('Last contact');
|
$table->head[3] = __('Last contact');
|
||||||
$table->head[4] = __('Remove');
|
$table->head[4] = __('Remove');
|
||||||
|
$table->align[4] = "center";;
|
||||||
$sql = sprintf ("SELECT tagente.nombre, tplanned_downtime_agents.id, tagente.id_os, tagente.id_agente, tagente.id_grupo, tagente.ultimo_contacto FROM tagente, tplanned_downtime_agents WHERE tplanned_downtime_agents.id_agent = tagente.id_agente AND tplanned_downtime_agents.id_downtime = %d ",$id_downtime);
|
|
||||||
|
|
||||||
$downtimes = get_db_all_rows_sql ($sql);
|
|
||||||
if ($downtimes === false) {
|
|
||||||
$table->colspan[0][0] = 5;
|
|
||||||
$table->data[0][0] = __('There are no scheduled downtimes');
|
|
||||||
$downtimes = array();
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($downtimes as $downtime) {
|
foreach ($downtimes as $downtime) {
|
||||||
$data = array ();
|
$data = array ();
|
||||||
@ -259,6 +258,7 @@ if ($create_downtime || $update_downtime) {
|
|||||||
}
|
}
|
||||||
print_table ($table);
|
print_table ($table);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
// View available downtimes present in database (if any of them)
|
// View available downtimes present in database (if any of them)
|
||||||
@ -275,6 +275,10 @@ if ($create_downtime || $update_downtime) {
|
|||||||
$table->head[5] = __('Delete');
|
$table->head[5] = __('Delete');
|
||||||
$table->head[6] = __('Update');
|
$table->head[6] = __('Update');
|
||||||
$table->head[7] = __('Running');
|
$table->head[7] = __('Running');
|
||||||
|
$table->align[2] = "center";
|
||||||
|
$table->align[5] = "center";
|
||||||
|
$table->align[6] = "center";
|
||||||
|
$table->align[7] = "center";
|
||||||
|
|
||||||
$sql = "SELECT * FROM tplanned_downtime WHERE id_group IN (" . implode (",", array_keys ($groups)) . ")";
|
$sql = "SELECT * FROM tplanned_downtime WHERE id_group IN (" . implode (",", array_keys ($groups)) . ")";
|
||||||
$downtimes = get_db_all_rows_sql ($sql);
|
$downtimes = get_db_all_rows_sql ($sql);
|
||||||
|
@ -88,7 +88,7 @@ echo '<form class="add_alert_form" method="post">';
|
|||||||
print_table ($table);
|
print_table ($table);
|
||||||
|
|
||||||
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
echo '<div class="action-buttons" style="width: '.$table->width.'">';
|
||||||
print_submit_button (__('Add'), 'add', false, 'class="sub next"');
|
print_submit_button (__('Add'), 'add', false, 'class="sub wand"');
|
||||||
print_input_hidden ('create_alert', 1);
|
print_input_hidden ('create_alert', 1);
|
||||||
echo '</div></form>';
|
echo '</div></form>';
|
||||||
|
|
||||||
|
@ -180,7 +180,11 @@ else {
|
|||||||
|
|
||||||
$buttons[$tab]['active'] = true;
|
$buttons[$tab]['active'] = true;
|
||||||
|
|
||||||
|
if (isset($_GET["tab"])) {
|
||||||
|
print_page_header(__('Alerts') . ' » ' . __('Manage alerts') . ' » ' . __('Create'), "images/god2.png", false, "manage_alert_list", true, $buttons);
|
||||||
|
} else {
|
||||||
print_page_header(__('Alerts') . ' » ' . __('Manage alerts') . ' » ' . __('List'), "images/god2.png", false, "manage_alert_list", true, $buttons);
|
print_page_header(__('Alerts') . ' » ' . __('Manage alerts') . ' » ' . __('List'), "images/god2.png", false, "manage_alert_list", true, $buttons);
|
||||||
|
}
|
||||||
|
|
||||||
echo $messageAction;
|
echo $messageAction;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user