summaryrefslogtreecommitdiffstats
path: root/pts-core
diff options
context:
space:
mode:
Diffstat (limited to 'pts-core')
-rw-r--r--pts-core/modules/system_monitor.php2
-rw-r--r--pts-core/objects/pts_LineGraph.php12
-rw-r--r--pts-core/objects/pts_module.php3
3 files changed, 9 insertions, 8 deletions
diff --git a/pts-core/modules/system_monitor.php b/pts-core/modules/system_monitor.php
index 5969a6f..456c440 100644
--- a/pts-core/modules/system_monitor.php
+++ b/pts-core/modules/system_monitor.php
@@ -112,7 +112,7 @@ class system_monitor extends pts_module_interface
pts_module::save_file(".s/CPU_USAGE");
}
- pts_module::pts_timed_function(30, "pts_monitor_update");
+ pts_module::pts_timed_function(5, "pts_monitor_update");
}
public static function __shutdown($obj = NULL)
{
diff --git a/pts-core/objects/pts_LineGraph.php b/pts-core/objects/pts_LineGraph.php
index fce72d2..958ce56 100644
--- a/pts-core/objects/pts_LineGraph.php
+++ b/pts-core/objects/pts_LineGraph.php
@@ -63,7 +63,8 @@ class pts_LineGraph extends pts_CustomGraph
$previous_offset = -1;
$paint_color = $this->next_paint_color();
- for($i = 0; $i < count($this->graph_data[$i_o]); $i++)
+ $point_counter = count($this->graph_data[$i_o]);
+ for($i = 0; $i < $point_counter; $i++)
{
$value = $this->graph_data[$i_o][$i];
$value_plot_top = $this->graph_top_end + 1 - round(($value / $this->graph_maximum_value) * ($this->graph_top_end - $this->graph_top_start));
@@ -72,13 +73,14 @@ class pts_LineGraph extends pts_CustomGraph
if($previous_placement != -1 && $previous_offset != -1)
{
imageline($this->graph_image, $previous_offset, $previous_placement, $px_from_left, $value_plot_top, $paint_color);
- $this->render_graph_pointer($previous_offset, $previous_placement);
+ if($point_counter < 26)
+ $this->render_graph_pointer($previous_offset, $previous_placement);
}
- if($i == count($this->graph_data[$i_o]) - 1)
+ if($i == 0 || $i == count($this->graph_data[$i_o]) - 1)
$this->render_graph_pointer($px_from_left, $value_plot_top);
- $previous_placement = $value_plot_top;
- $previous_offset = $px_from_left;
+ $previous_placement = $value_plot_top;
+ $previous_offset = $px_from_left;
}
}
diff --git a/pts-core/objects/pts_module.php b/pts-core/objects/pts_module.php
index 0a1f12c..18a8a01 100644
--- a/pts-core/objects/pts_module.php
+++ b/pts-core/objects/pts_module.php
@@ -84,7 +84,6 @@ class pts_module
if(($extra_dir = dirname($to_file)) != "." && !is_dir($save_base_dir . $extra_dir))
mkdir($save_base_dir . $extra_dir);
-
if(is_file($from_file) && (!is_file($save_base_dir . $to_file) || md5_file($from_file) != md5_file($save_base_dir . $to_file)))
if(copy($from_file, $save_base_dir . $to_file))
return $save_base_dir . $to_file;
@@ -93,7 +92,7 @@ class pts_module
}
public static function pts_timed_function($time, $function)
{
- if($time < 15 || $time > 300)
+ if($time < 5 || $time > 300)
return;
$pid = pcntl_fork();