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>
|
||||
|
||||
* DEBIAN/control, DEBIAN/make_deb_package.sh,
|
||||
|
|
|
@ -219,26 +219,25 @@ if ($create_downtime || $update_downtime) {
|
|||
|
||||
//Start Overview of existing planned downtime
|
||||
echo '<h3>'.__('Agents planned for this downtime').':</h3>';
|
||||
$table->class = 'databox';
|
||||
$table->width = '80%';
|
||||
$table->data = array ();
|
||||
$table->head = array ();
|
||||
$table->head[0] = __('Name');
|
||||
$table->head[1] = __('Group');
|
||||
$table->head[2] = __('OS');
|
||||
$table->head[3] = __('Last contact');
|
||||
$table->head[4] = __('Remove');
|
||||
|
||||
$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();
|
||||
}
|
||||
echo '<div class="nf">'. __('There are no scheduled downtimes').'</div>';
|
||||
} else {
|
||||
$table->class = 'databox';
|
||||
$table->width = '80%';
|
||||
$table->data = array ();
|
||||
$table->head = array ();
|
||||
$table->head[0] = __('Name');
|
||||
$table->head[1] = __('Group');
|
||||
$table->head[2] = __('OS');
|
||||
$table->head[3] = __('Last contact');
|
||||
$table->head[4] = __('Remove');
|
||||
$table->align[4] = "center";;
|
||||
|
||||
foreach ($downtimes as $downtime) {
|
||||
foreach ($downtimes as $downtime) {
|
||||
$data = array ();
|
||||
|
||||
$data[0] = $downtime['nombre'];
|
||||
|
@ -257,7 +256,8 @@ if ($create_downtime || $update_downtime) {
|
|||
|
||||
array_push ($table->data, $data);
|
||||
}
|
||||
print_table ($table);
|
||||
print_table ($table);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
|
@ -275,6 +275,10 @@ if ($create_downtime || $update_downtime) {
|
|||
$table->head[5] = __('Delete');
|
||||
$table->head[6] = __('Update');
|
||||
$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)) . ")";
|
||||
$downtimes = get_db_all_rows_sql ($sql);
|
||||
|
|
|
@ -88,7 +88,7 @@ echo '<form class="add_alert_form" method="post">';
|
|||
print_table ($table);
|
||||
|
||||
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);
|
||||
echo '</div></form>';
|
||||
|
||||
|
|
|
@ -179,8 +179,12 @@ else {
|
|||
print_image ("images/config.png", true, array ("title" => __('Builder alert'))) .'</a>'));
|
||||
|
||||
$buttons[$tab]['active'] = true;
|
||||
|
||||
print_page_header(__('Alerts') . ' » ' . __('Manage alerts') . ' » ' . __('List'), "images/god2.png", false, "manage_alert_list", true, $buttons);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
echo $messageAction;
|
||||
|
||||
|
|
Loading…
Reference in New Issue