/openshift/adei

To get this branch, use:
bzr branch http://darksoft.org/webbzr/openshift/adei

« back to all changes in this revision

Viewing changes to modules/graph.php

  • Committer: Suren A. Chilingaryan
  • Date: 2011-01-26 02:48:39 UTC
  • mto: This revision was merged to the branch mainline in revision 212.
  • Revision ID: csa@dside.dyndns.org-20110126024839-nv6qp2ie9stmd2dn
Support of Appled devices by Toni Pirhonen

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
$graph_title = _("Graph");
4
4
 
5
5
function graphJS() {
 
6
    global $ADEI_MODE;
6
7
    global $GRAPH_MARGINS;
7
8
    global $GRAPH_SELECTION;
 
9
        
8
10
?>
9
11
    zeus_graph = new GRAPH("graph_image_div", "graph_selector_div");
10
12
    zeus_graph.SetMargins(<?echo $GRAPH_MARGINS['left'] . "," . $GRAPH_MARGINS['top'] . "," . $GRAPH_MARGINS['right'] . "," .$GRAPH_MARGINS['bottom']?>);
11
13
    zeus_graph.SetAllSizes(<?echo $GRAPH_SELECTION['min_width'] . "," . $GRAPH_SELECTION['min_height']?>);
12
14
    adei.AttachGraphModule(zeus_graph);
13
 
 
14
 
<?
 
15
<?
 
16
    if ($ADEI_MODE == "iAdei") {
 
17
?>    
 
18
    graph_control = new GRAPHCONTROL("shadow","show_controls_div","imgdiv",zeus_graph,"graphimg","emailform","sensorlist");
 
19
                
 
20
<?
 
21
    }
15
22
    return "zeus_graph";
16
23
}
17
24
 
18
25
 
19
26
function graphPage() {
 
27
    global $ADEI_MODE;
 
28
    
20
29
/*    <div id="graph_selector_div" class="selector">selector1</div>*/
21
30
?>
22
31
<table width="100%" <?/*height="100%"*/?> cellspacing="0" cellpadding="0"><tr><td>
25
34
        <img id="graph_image" alt="Loading..."/>
26
35
        <?/* onMouseDown="zeus_graph.MouseStart(event)" onMouseUp="zeus_graph.MouseDone(event)" onMouseMove="zeus_graph.MouseVisualize(event)" onClick="zeus_graph.MouseStart()"/>*/?>
27
36
    </div>
 
37
<?
 
38
    if ($ADEI_MODE == "iAdei") {
 
39
?>
 
40
        <div class="show_controls_div" id="show_controls_div">
 
41
        </div>
 
42
        <div id="shadow">
 
43
                <table>
 
44
                        <tr><td></td><td><button onclick="graph_control.UseWindow('moveup');">Move Up</button></td><td></td></tr>
 
45
                        <tr><td><button onclick="graph_control.UseWindow('moveleft');">Move Left</button></td><td><button onclick="graph_control.UseWindow('movedown');">Move Down</button></td><td><button onclick="graph_control.UseWindow('moveright');">Move Right</button></td></tr>
 
46
                </table>
 
47
                <table>
 
48
                        <tr><td><button onclick="graph_control.UseWindow('centerzoomin');">Zoom in</button></td></tr>
 
49
                        <tr><td><button onclick="graph_control.UseWindow('centerzoomout');">Zoom out</button></td></tr>
 
50
                        <tr><td><button onclick="graph_control.genIMG();">Send Graph as email </button></td></tr>
 
51
                        <tr><td><button onclick="graph_control.getSensors();">Show Legend </button></td></tr>
 
52
                </table>
 
53
                <button onclick="adei.updater.Update();">Reload graph </button>
 
54
        </div>
 
55
        <div id="imgdiv">
 
56
                <button onclick="graph_control.openMailForm();">Send as email</button>
 
57
                <button onclick="graph_control.closediv('imgdiv');">Close</button>
 
58
                <img src="images/blank.png" id="graphimg"/>
 
59
        </div>
 
60
        <div id="emailform">
 
61
        </div>
 
62
        <div id="sensorlist">
 
63
        </div>
 
64
<?
 
65
    }
 
66
?>
28
67
</td></tr></table>
 
68
 
29
69
<?}?>
 
 
b'\\ No newline at end of file'