2010-06-29 Sergio Martin <sergio.martin@artica.es>
* godmode/reporting/visual_console_builder.php godmode/reporting/visual_console_builder.editor.js: Fixed the setting of original size by javascript when you choose 0 x 0 in the visual map background for Bug: 3020721 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2931 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
67e46066e8
commit
fcf9cf2a2d
|
@ -1,3 +1,10 @@
|
||||||
|
2010-06-29 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* godmode/reporting/visual_console_builder.php
|
||||||
|
godmode/reporting/visual_console_builder.editor.js:
|
||||||
|
Fixed the setting of original size by javascript when you
|
||||||
|
choose 0 x 0 in the visual map background for Bug: 3020721
|
||||||
|
|
||||||
2010-06-29 Junichi Satoh <junichi@rworks.jp>
|
2010-06-29 Junichi Satoh <junichi@rworks.jp>
|
||||||
|
|
||||||
* pandora_console_install: Added support for FreeBSD and RHEL/CentOS.
|
* pandora_console_install: Added support for FreeBSD and RHEL/CentOS.
|
||||||
|
|
|
@ -122,6 +122,7 @@ function updateAction() {
|
||||||
case 'background':
|
case 'background':
|
||||||
$("#background").css('width', values['width']);
|
$("#background").css('width', values['width']);
|
||||||
$("#background").css('height', values['height']);
|
$("#background").css('height', values['height']);
|
||||||
|
|
||||||
$("#background").css('background', 'url(images/console/background/' + values['background'] + ')');
|
$("#background").css('background', 'url(images/console/background/' + values['background'] + ')');
|
||||||
var idElement = 0;
|
var idElement = 0;
|
||||||
break;
|
break;
|
||||||
|
@ -662,8 +663,14 @@ function updateDB(type, idElement , values) {
|
||||||
refresh_lines(lines, 'background');
|
refresh_lines(lines, 'background');
|
||||||
break;
|
break;
|
||||||
case 'background':
|
case 'background':
|
||||||
$("#background").css('width', values['width'] + 'px');
|
if(values['width'] == '0' || values['height'] == '0'){
|
||||||
$("#background").css('height', values['height'] + 'px');
|
$("#background").css('width', $("#hidden-background_width").val() + 'px');
|
||||||
|
$("#background").css('height', $("#hidden-background_height").val() + 'px');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#background").css('width', values['width'] + 'px');
|
||||||
|
$("#background").css('height', values['height'] + 'px');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1012,4 +1019,4 @@ function showPreviewStaticGraph(staticGraph) {
|
||||||
$("#preview").append("<img src='" + imgBase + "_warning.png' />");
|
$("#preview").append("<img src='" + imgBase + "_warning.png' />");
|
||||||
$("#preview").append("<img src='" + imgBase + ".png' />");
|
$("#preview").append("<img src='" + imgBase + ".png' />");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,6 +95,13 @@ switch ($activeTab) {
|
||||||
$background = get_parameter('background');
|
$background = get_parameter('background');
|
||||||
$width = get_parameter('width');
|
$width = get_parameter('width');
|
||||||
$height = get_parameter('height');
|
$height = get_parameter('height');
|
||||||
|
|
||||||
|
if($width == 0 && $height == 0) {
|
||||||
|
$sizeBackground = getimagesize($config['homedir'] . '/images/console/background/' . $background);
|
||||||
|
$width = $sizeBackground[0];
|
||||||
|
$height = $sizeBackground[1];
|
||||||
|
}
|
||||||
|
|
||||||
process_sql_update('tlayout', array('background' => $background,
|
process_sql_update('tlayout', array('background' => $background,
|
||||||
'width' => $width, 'height' => $height), array('id' => $idVisualConsole));
|
'width' => $width, 'height' => $height), array('id' => $idVisualConsole));
|
||||||
|
|
||||||
|
@ -142,6 +149,13 @@ switch ($activeTab) {
|
||||||
$range = (int) get_parameter ("range", 50);
|
$range = (int) get_parameter ("range", 50);
|
||||||
$width = (int) get_parameter ("width", 0);
|
$width = (int) get_parameter ("width", 0);
|
||||||
$height = (int) get_parameter ("height", 0);
|
$height = (int) get_parameter ("height", 0);
|
||||||
|
|
||||||
|
if($width == 0 && $height == 0) {
|
||||||
|
$sizeBackground = getimagesize($config['homedir'] . '/images/console/background/' . $background);
|
||||||
|
$width = $sizeBackground[0];
|
||||||
|
$height = $sizeBackground[1];
|
||||||
|
}
|
||||||
|
|
||||||
$message = '';
|
$message = '';
|
||||||
if ($name_modules[0] == '0')
|
if ($name_modules[0] == '0')
|
||||||
$message .= process_wizard_add ($id_agents, $image, $idVisualConsole, $range, $width, $height);
|
$message .= process_wizard_add ($id_agents, $image, $idVisualConsole, $range, $width, $height);
|
||||||
|
|
|
@ -37,15 +37,21 @@ if (isset($_GET['getFile'])) {
|
||||||
|
|
||||||
$fileTemp = sys_get_temp_dir() . "/tumb_" . $newWidth . "x" . $newHeight . "_" . $fileName;
|
$fileTemp = sys_get_temp_dir() . "/tumb_" . $newWidth . "x" . $newHeight . "_" . $fileName;
|
||||||
|
|
||||||
|
$protocol = 'http';
|
||||||
|
if(!empty($_SERVER['HTTPS']))
|
||||||
|
$protocol .= 's';
|
||||||
|
$protocol .= '://';
|
||||||
|
|
||||||
if (is_file($fileTemp)) {
|
if (is_file($fileTemp)) {
|
||||||
if (!is_readable($fileTemp)) {
|
if (!is_readable($fileTemp)) {
|
||||||
$fileTemp = sys_get_temp_dir() . "/tumb_" . $newWidth . "x" . $newHeight . "_" . uniqid() . "_" . $fileName;
|
$fileTemp = sys_get_temp_dir() . "/tumb_" . $newWidth . "x" . $newHeight . "_" . uniqid() . "_" . $fileName;
|
||||||
createthumb( $_SERVER['DOCUMENT_ROOT'] . $file, $fileTemp,$newWidth,$newHeight);
|
createthumb($protocol.$_SERVER['SERVER_NAME'] . $file, $fileTemp,$newWidth,$newHeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else createthumb( $_SERVER['DOCUMENT_ROOT'] . $file, $fileTemp,$newWidth,$newHeight);
|
else createthumb($protocol.$_SERVER['SERVER_NAME'] . $file, $fileTemp,$newWidth,$newHeight);
|
||||||
getFile($fileName, $fileTemp);
|
getFile($fileName, $fileTemp);
|
||||||
unlink($fileTemp);
|
unlink($fileTemp);
|
||||||
|
echo $protocol.$_SERVER['SERVER_NAME'] . $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//END Lines of code for direct url call script
|
//END Lines of code for direct url call script
|
||||||
|
|
Loading…
Reference in New Issue