summaryrefslogtreecommitdiffstats
path: root/usr/local/www/widgets/widgets/cpu_graphs.widget.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@sullrich-MacBookPro.local>2009-03-08 18:04:22 -0400
committerScott Ullrich <sullrich@sullrich-MacBookPro.local>2009-03-08 18:05:55 -0400
commit7a2154f63719495879401ee55e80f8f4e11ef480 (patch)
tree76d90d3da9b0fae28c0e2375145464cefd790325 /usr/local/www/widgets/widgets/cpu_graphs.widget.php
parent21f32cf4bbb928c24db2321b1936da085abe665d (diff)
downloadpfsense-7a2154f63719495879401ee55e80f8f4e11ef480.zip
pfsense-7a2154f63719495879401ee55e80f8f4e11ef480.tar.gz
Replace SVG graph with Graphlink Ajax graph that used to be in
HEAD before the Dashboard import.
Diffstat (limited to 'usr/local/www/widgets/widgets/cpu_graphs.widget.php')
-rw-r--r--usr/local/www/widgets/widgets/cpu_graphs.widget.php38
1 files changed, 35 insertions, 3 deletions
diff --git a/usr/local/www/widgets/widgets/cpu_graphs.widget.php b/usr/local/www/widgets/widgets/cpu_graphs.widget.php
index f9dcfca..8e9004f 100644
--- a/usr/local/www/widgets/widgets/cpu_graphs.widget.php
+++ b/usr/local/www/widgets/widgets/cpu_graphs.widget.php
@@ -35,7 +35,39 @@ require_once("guiconfig.inc");
require_once("pfsense-utils.inc");
require_once("functions.inc");
?>
+<link href="/themes/nervecenter/graphlink.css" rel="stylesheet" type="text/css" />
+<script src="/widgets/javascript/cpu_graphs.js" type="text/javascript"></script>
+<script type="text/javascript">
+ /* initialize the graph */
+ // --- Global Data --- //
+ var graphs; // An array that stores all created graphs
+ var graph_dir; // The direction in which each graph moves
+ var last_val; // An array of values for each graph
+ var last_val_span; // References to Last Value span tags for each graph
+ var pause; // Controls execution
+
+ var ajaxStarted = false;
+
+ /**
+ * Launches the GraphLink demo. It initializes the graph along with the ajax
+ * engine and starts the main execution loop.
+ */
+ graph = new Array();
+ graph_dir = new Array();
+ last_val = new Array();
+ last_val_span = new Array();
+</script>
+<div class="GraphLink" id="GraphOutput"></div>
+<script language="javascript" type="text/javascript">
+
+ // Graph 1
+ graph[0] = GraphInitialize('GraphOutput', 200, 50, 2);
+ graph_dir[0] = GL_END;
+ last_val[0] = Math.floor(Math.random() * 50);
+ last_val_span[0] = document.getElementById('LastValue0');
+
+ //GraphSetVMax(graph[0], 100);
+ //GraphDynamicScale(graph[0]);
+
+</script>
-<div style="float:left;width:49%">
-<embed id="graph" src="graph_cpu.php" type="image/svg+xml" width="356" height="150" pluginspage="http://www.adobe.com/svg/viewer/install/auto" />
-</div> \ No newline at end of file
OpenPOWER on IntegriCloud