source: ccsweb/trunk/ccs_mods/graphs/config-part-div.tpl @ 1342

Last change on this file since 1342 was 1342, checked in by ckb6, 7 years ago

Added validation for graph parts and added some memory to the form so that a failed send causes the data not to be lost

  • Property svn:keywords set to Id
File size: 6.8 KB
Line 
1{* Copyright (C) 2006  The University of Waikato
2 *
3 * This file is part of ccsweb - CRCnet Configuration System Web Interface
4 *
5 * Graph manipulation interface
6 *
7 * Author:       Chris Browning <ckb6@cs.waikato.ac.nz>
8 * Version:      $Id$
9 *
10 * ccsweb is free software; you can redistribute it and/or modify it under the
11 * terms of the GNU General Public License version 2 as published by the Free
12 * Software Foundation.
13 *
14 * ccsweb is distributed in the hope that it will be useful, but WITHOUT ANY
15 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17 * details.
18 *
19 * You should have received a copy of the GNU General Public License along with
20 * ccsweb; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22 *}
23
24<tr> 
25    <th width="200">Type</th><td>
26        <select id="type" name="type" />
27            <option value="DEF" {if $part.type == "DEF"}selected="selected"{/if}>DEF</option>
28            <option value="CDEF" {if $part.type == "CDEF"}selected="selected"{/if}>CDEF</option>
29            <option value="PRINT" {if $part.type == "PRINT"}selected="selected"{/if}>PRINT</option>
30            <option value="GPRINT" {if $part.type == "GPRINT"}selected="selected"{/if}>GPRINT</option>
31            <option value="COMMENT" {if $part.type == "COMMENT"}selected="selected"{/if}>COMMENT</option>
32            <option value="VRULE" {if $part.type == "VRULE"}selected="selected"{/if}>VRULE</option>
33            <option value="HRULE" {if $part.type == "HRULE"}selected="selected"{/if}>HRULE</option>
34            <option value="LINE1" {if $part.type == "LINE1"}selected="selected"{/if}>LINE1</option>
35            <option value="LINE2" {if $part.type == "LINE2"}selected="selected"{/if}>LINE2</option>
36            <option value="LINE3" {if $part.type == "LINE3"}selected="selected"{/if}>LINE3</option>
37            <option value="STACK" {if $part.type == "STACK"}selected="selected"{/if}>STACK</option>
38            <option value="AREA" {if $part.type == "AREA"}selected="selected"{/if}>AREA</option>
39        </select></td>   
40</tr>
41<tr>    
42    <th width="200" id="order-header">Order</th>
43    <td><input type="text" name="graph_order" id="graph_order" value="{$part.graph_order}"/>This field controls the order in which they are used during rendering. If two numbers are the same it is undefined what order they will be used.</td>
44</tr>
45{if $part.type == "LINE1" || $part.type == "LINE2" || $part.type == "LINE3" || $part.type == "AREA" || $part.type == "STACK"}
46<tr>    
47    <th width="200" id="varname-header">Variable</th><td>
48        <select name="varname" id="varname">
49        {foreach from=$vars item=var}
50            <option value="{$var.varname}" {if $var.varname == $part.varname}selected="selected"{/if}>{$var.varname}</option>
51        {/foreach}
52        </select>
53</td></tr>
54<tr>    
55    <th width="200" id="colour-header">Colour</th>
56    <td><input type="text" name="colour" id="colour" value="{$part.colour}"/>The draw colour in hex (RRGGBB eg FF0000 is red)</td>
57</tr>
58<tr>    
59    <th width="200">Legend</th>
60    <td><input type="text" name="text" id="text" value="{$part.text}"/></td>
61</tr>
62
63{/if}
64{if $part.type == "HRULE"}
65<tr>    
66    <th width="200" id="varname-header">Value</th>
67    <td><input type="text" name="varname" id="varname" value="{$part.varname}"/></td>
68</tr>
69<tr>    
70    <th width="200" id="colour-header">Colour</th>
71    <td><input type="text" name="colour" id="colour" value="{$part.colour}"/>The draw colour in hex (RRGGBB eg FF0000 is red)</td>
72</tr>
73<tr>    
74    <th width="200">Legend</th>
75    <td><input type="text" name="text" id="text" value="{$part.text}"/></td>
76</tr>
77{/if}
78{if $part.type == "VRULE"}
79<tr>    
80    <th width="200" id="varname-header">Time</th>
81    <td><input type="text" name="varname" id="varname" value="{$part.varname}"/>In seconds since 1 Jan 1970</td>
82</tr>
83<tr>    
84    <th width="200" id="colour-header">Colour</th>
85    <td><input type="text" name="colour" id="colour" value="{$part.colour}"/>The draw colour in hex (RRGGBB eg FF0000 is red)</td>
86</tr>
87<tr>    
88    <th width="200">Legend</th>
89    <td><input type="text" name="text" id="text" value="{$part.text}"/></td>
90</tr>
91
92{/if}
93{if $part.type == "PRINT" || $part.type == "GPRINT"}
94<tr>    
95    <th width="200" id="varname-header">Variable</th><td>
96        <select name="varname" id="varname">
97        {foreach from=$vars item=var}
98            <option value="{$var.varname}" {if $var.varname == $part.varname}selected="selected"{/if}>{$var.varname}</option>
99        {/foreach}
100        </select>
101</td></tr>
102<tr>    
103    <th width="200">CF</th><td>
104        <select id="cf" name="cf" />
105            <option value="AVERAGE" {if $part.cf == "AVERAGE"}selected="selected"{/if}>AVERAGE</option>
106            <option value="LAST" {if $part.cf == "LAST"}selected="selected"{/if}>LAST</option>
107            <option value="MAX" {if $part.cf == "MAX"}selected="selected"{/if}>MAX</option>
108            <option value="MIN" {if $part.cf == "MIN"}selected="selected"{/if}>MIN</option>
109        </select></td>       
110</tr>
111<tr>    
112    <th width="200" id="text-header">Statement</th>
113    <td><input type="text" name="text" id="text" value="{$part.text}"/></td>
114</tr>
115{/if}
116{if $part.type == "COMMENT"}
117<tr>    
118    <th width="200" id="text-header">Comment</th>
119    <td><input type="text" name="text" id="text" value="{$part.text}"/></td>
120</tr>
121{/if}
122{if $part.type == "DEF"}
123<tr>    
124    <th width="200" id="varname-header">Variable</th>
125    <td><input type="text" name="varname" id="varname" value="{$part.varname}"/>The variable name</td>
126</tr>
127<tr>    
128    <th width="200">RRD Item</th><td>
129        <select name="text" id="text">
130        {foreach from=$items item=item}
131            <option value="{$item.name}" {if $part.text == $item.name}selected="selected"{/if}>{$item.name}</option>
132        {/foreach}
133        </select>
134</td></tr>   
135<tr>    
136    <th width="200">CF</th><td>
137        <select id="cf" name="cf" />
138            <option value="AVERAGE" {if $part.cf == "AVERAGE"}selected="selected"{/if}>AVERAGE</option>
139            <option value="LAST" {if $part.cf == "LAST"}selected="selected"{/if}>LAST</option>
140            <option value="MAX" {if $part.cf == "MAX"}selected="selected"{/if}>MAX</option>
141            <option value="MIN" {if $part.cf == "MIN"}selected="selected"{/if}>MIN</option>
142        </select></td>       
143</tr>
144
145{/if}
146{if $part.type == "CDEF"}
147<tr>    
148    <th width="200" id="varname-header">Variable</th>
149    <td><input type="text" name="varname" id="varname" value="{$part.varname}"/>The variable name</td>
150</tr>
151<tr>    
152    <th width="200" id="text-header">Chain</th>
153    <td><input type="text" name="text" id="text" value="{$part.text}"/></td>
154</td></tr> 
155{/if}
156<tr>    
157    <td colspan=2>
158    <input type="submit" name="submit" id="submit" value="Update Part Type &gt;&gt;">
159    </td>
160</tr>
Note: See TracBrowser for help on using the repository browser.