mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fixed problems with line father when use pure in visual console. Internal ticket: #3936
This commit is contained in:
parent
d0c1d5eede
commit
e815ea022b
@ -130,7 +130,7 @@ $options['view']['text'] = '<a href="index.php?sec=reporting&sec2=operation/visu
|
|||||||
. html_print_image("images/operation.png", true, array ("title" => __('View'))) .'</a>';
|
. html_print_image("images/operation.png", true, array ("title" => __('View'))) .'</a>';
|
||||||
$options['view']['active'] = true;
|
$options['view']['active'] = true;
|
||||||
|
|
||||||
if (! defined('METACONSOLE')) {
|
if (!is_metaconsole()) {
|
||||||
if (!$config['pure']) {
|
if (!$config['pure']) {
|
||||||
$options['pure']['text'] = '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&id='.$id_layout.'&refr='.$refr.'&pure=1">'
|
$options['pure']['text'] = '<a href="index.php?sec=reporting&sec2=operation/visual_console/render_view&id='.$id_layout.'&refr='.$refr.'&pure=1">'
|
||||||
. html_print_image('images/full_screen.png', true, array('title' => __('Full screen mode')))
|
. html_print_image('images/full_screen.png', true, array('title' => __('Full screen mode')))
|
||||||
@ -147,7 +147,10 @@ else {
|
|||||||
|
|
||||||
if ($config['pure']) {
|
if ($config['pure']) {
|
||||||
// Container of the visual map (ajax loaded)
|
// Container of the visual map (ajax loaded)
|
||||||
echo '<div id="vc-container"></div>';
|
echo '<div id="vc-container">' .
|
||||||
|
visual_map_print_visual_map ($id_layout, true, true,
|
||||||
|
null, null, '', false, $graph_javascript)
|
||||||
|
. '</div>';
|
||||||
|
|
||||||
// Floating menu - Start
|
// Floating menu - Start
|
||||||
echo '<div id="vc-controls">';
|
echo '<div id="vc-controls">';
|
||||||
@ -215,54 +218,54 @@ ui_require_javascript_file('pandora_visual_console');
|
|||||||
var pure = <?php echo (int) $config['pure']; ?>;
|
var pure = <?php echo (int) $config['pure']; ?>;
|
||||||
|
|
||||||
if (pure) {
|
if (pure) {
|
||||||
var startCountDown = function (duration, cb) {
|
//~ var startCountDown = function (duration, cb) {
|
||||||
$('div.vc-countdown').countdown('destroy');
|
//~ $('div.vc-countdown').countdown('destroy');
|
||||||
if (!duration) return;
|
//~ if (!duration) return;
|
||||||
var t = new Date();
|
//~ var t = new Date();
|
||||||
t.setTime(t.getTime() + duration * 1000);
|
//~ t.setTime(t.getTime() + duration * 1000);
|
||||||
$('div.vc-countdown').countdown({
|
//~ $('div.vc-countdown').countdown({
|
||||||
until: t,
|
//~ until: t,
|
||||||
format: 'MS',
|
//~ format: 'MS',
|
||||||
layout: '(%M%nn%M:%S%nn%S <?php echo __('Until refresh'); ?>) ',
|
//~ layout: '(%M%nn%M:%S%nn%S <?php echo __('Until refresh'); ?>) ',
|
||||||
alwaysExpire: true,
|
//~ alwaysExpire: true,
|
||||||
onExpiry: function () {
|
//~ onExpiry: function () {
|
||||||
$('div.vc-countdown').countdown('destroy');
|
//~ $('div.vc-countdown').countdown('destroy');
|
||||||
cb();
|
//~ cb();
|
||||||
}
|
//~ }
|
||||||
});
|
//~ });
|
||||||
}
|
//~ }
|
||||||
|
|
||||||
var fetchMap = function () {
|
//~ var fetchMap = function () {
|
||||||
$.ajax({
|
//~ $.ajax({
|
||||||
url: 'ajax.php',
|
//~ url: 'ajax.php',
|
||||||
type: 'GET',
|
//~ type: 'GET',
|
||||||
dataType: 'html',
|
//~ dataType: 'html',
|
||||||
data: {
|
//~ data: {
|
||||||
page: 'include/ajax/visual_console.ajax',
|
//~ page: 'include/ajax/visual_console.ajax',
|
||||||
render_map: true,
|
//~ render_map: true,
|
||||||
keep_aspect_ratio: true,
|
//~ keep_aspect_ratio: true,
|
||||||
id_visual_console: <?php echo $id_layout; ?>,
|
//~ id_visual_console: <?php echo $id_layout; ?>,
|
||||||
graph_javascript: <?php echo (int) $graph_javascript; ?>,
|
//~ graph_javascript: <?php echo (int) $graph_javascript; ?>,
|
||||||
width: $(window).width(),
|
//~ width: $(window).width(),
|
||||||
height: $(window).height()
|
//~ height: $(window).height()
|
||||||
}
|
//~ }
|
||||||
})
|
//~ })
|
||||||
.done(function (data, textStatus, xhr) {
|
//~ .done(function (data, textStatus, xhr) {
|
||||||
$('div#vc-container').html(data);
|
//~ $('div#vc-container').html(data);
|
||||||
startCountDown(refr, fetchMap);
|
//~ startCountDown(refr, fetchMap);
|
||||||
});
|
//~ });
|
||||||
}
|
//~ }
|
||||||
|
|
||||||
// Auto hide controls
|
//~ // Auto hide controls
|
||||||
var controls = document.getElementById('vc-controls');
|
//~ var controls = document.getElementById('vc-controls');
|
||||||
autoHideElement(controls, 1000);
|
//~ autoHideElement(controls, 1000);
|
||||||
$('select#refr').change(function (event) {
|
//~ $('select#refr').change(function (event) {
|
||||||
refr = Number.parseInt(event.target.value, 10);
|
//~ refr = Number.parseInt(event.target.value, 10);
|
||||||
startCountDown(refr, fetchMap);
|
//~ startCountDown(refr, fetchMap);
|
||||||
});
|
//~ });
|
||||||
|
|
||||||
// Start the map fetch
|
//~ // Start the map fetch
|
||||||
fetchMap();
|
//~ fetchMap();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('#refr').change(function () {
|
$('#refr').change(function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user