2010-10-06 Sergio Martin <sergio.martin@artica.es>
* godmode/reporting/visual_console_builder.php godmode/reporting/visual_console_builder.editor.js godmode/reporting/visual_console_builder.editor.php: Fixed the bad icon change in visual console editor when update an item for bug 3078016 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3355 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
82c18ebd12
commit
dcb33813df
|
@ -1,3 +1,11 @@
|
|||
2010-10-06 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* godmode/reporting/visual_console_builder.php
|
||||
godmode/reporting/visual_console_builder.editor.js
|
||||
godmode/reporting/visual_console_builder.editor.php: Fixed the
|
||||
bad icon change in visual console editor when update an item
|
||||
for bug 3078016
|
||||
|
||||
2010-10-06 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* extras/pandoradb_migrate_v3.1_to_v3.2.sql: added default sound events in
|
||||
|
|
|
@ -130,8 +130,32 @@ function updateAction() {
|
|||
$("#text_" + idItem).html(values['label']);
|
||||
|
||||
$("#" + idItem).css('color', values['label_color']);
|
||||
|
||||
$("#image_" + idItem).attr('src', getImageElement(idItem));
|
||||
|
||||
switch ($('#hidden-status_' + idItem).val()) {
|
||||
case '1':
|
||||
//Critical (BAD)
|
||||
suffix = "_bad.png";
|
||||
break;
|
||||
case '4':
|
||||
//Critical (ALERT)
|
||||
suffix = "_bad.png";
|
||||
break;
|
||||
case '0':
|
||||
//Normal (OK)
|
||||
suffix = "_ok.png";
|
||||
break;
|
||||
case '2':
|
||||
//Warning
|
||||
suffix = "_warning.png";
|
||||
break;
|
||||
case '3':
|
||||
//Unknown
|
||||
default:
|
||||
suffix = ".png";
|
||||
// Default is Grey (Other)
|
||||
}
|
||||
|
||||
$("#image_" + idItem).attr('src', 'images/console/icons/' + values['image'] + suffix);
|
||||
if ((values['width'] != 0) && (values['height'] != 0)) {
|
||||
$("#image_" + idItem).attr('width', values['width']);
|
||||
$("#image_" + idItem).attr('height', values['height']);
|
||||
|
@ -187,7 +211,7 @@ function readFields() {
|
|||
var values = {};
|
||||
|
||||
values['label'] = $("input[name=label]").val();
|
||||
values['image'] = $("select[name=image]").val();
|
||||
values['image'] = $("select[name=image]").val();
|
||||
values['left'] = $("input[name=left]").val();
|
||||
values['top'] = $("input[name=top]").val();
|
||||
values['agent'] = $("input[name=agent]").val();
|
||||
|
|
|
@ -68,7 +68,7 @@ $heightBackground = $visualConsole['height'];
|
|||
$layoutDatas = get_db_all_rows_field_filter ('tlayout_data', 'id_layout', $idVisualConsole);
|
||||
if ($layoutDatas === false)
|
||||
$layoutDatas = array();
|
||||
|
||||
|
||||
/* Layout_data editor form */
|
||||
$intervals = array ();
|
||||
$intervals[3600] = "1 ".__('hour');
|
||||
|
@ -235,6 +235,7 @@ foreach ($layoutDatas as $layoutData) {
|
|||
continue;
|
||||
|
||||
printItemInVisualConsole($layoutData);
|
||||
print_input_hidden('status_'.$layoutData['id'], getStatusElement($layoutData));
|
||||
}
|
||||
|
||||
echo '</div>';
|
||||
|
|
|
@ -117,6 +117,7 @@ switch ($activeTab) {
|
|||
foreach ($idsElements as $idElement) {
|
||||
$id = $idElement['id'];
|
||||
$values = array();
|
||||
//$values['label'] = get_parameter('label_' . $id, '');
|
||||
$values['label'] = get_parameter('label_' . $id, '');
|
||||
$values['image'] = get_parameter('image_' . $id, '');
|
||||
$values['width'] = get_parameter('width_' . $id, 0);
|
||||
|
|
Loading…
Reference in New Issue