set default pagesize on all views to 999
[monitor.git] / web / MonitorWeb / monitorweb / templates / nodelist.kid
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <?python
3 layout_params['page_title'] = "MyOps Node List"
4 from monitor.util import diff_time
5 from time import mktime
6 from links import *
7
8 ?>
9 <html py:layout="'sitemenu.kid'"
10       xmlns:py="http://purl.org/kid/ns#"
11           xmlns:mochi="http://www.mochi.org">
12
13 <div py:match="item.tag == 'content'">
14
15   <script type="text/javascript">
16     function nodelist_paginator(opts) { plekit_table_paginator(opts, "nodelist"); }
17   </script>
18
19   <center>
20   <!-- NOTE: agg.node is a FindbadNodeRecord not a HistoryNodeRecord, so there is not 'status' attribute -->
21   <!--b py:content="'UP: %d' % len([agg for agg in query if agg.node.status in ('online', 'good')])"></b> | 
22   <b py:content="'DOWN: %d' % len([agg for agg in query if agg.node.status not in ('online', 'good')])"></b><br/-->
23   </center>
24
25 <table id="nodelist" cellpadding="0" border="0" class="plekit_table sortable-onload-2 colstyle-alt no-arrow paginationcallback-nodelist_paginator max-pages-10 paginate-999">
26   <thead>
27
28     <tr class='pagesize_area'><td class='pagesize_area' colspan='10'>
29         <form class='pagesize' action='satisfy_xhtml_validator'><fieldset>
30             <input class='pagesize_input' type='text' id="nodelist_pagesize" value='25'
31                    onkeyup='plekit_pagesize_set("nodelist","nodelist_pagesize", 25);' 
32                    size='3' maxlength='3' />                                                          
33             <label class='pagesize_label'> items/page </label>                                     
34             <img class='reset' src="/planetlab/icons/clear.png" alt="reset visible size"           
35                  onmousedown='plekit_pagesize_reset("nodelist","nodelist_pagesize", 999);' />
36     </fieldset></form></td></tr>                                                                        
37     
38     <tr class='search_area'><td class='search_area' colspan='10'>
39         <div class='search'><fieldset>
40             <label class='search_label'> Refine List</label>                 
41             <input class='search_input' type='text' id='nodelist_search' 
42                    onkeyup='plekit_table_filter("nodelist","nodelist_search","nodelist_search_and");'
43                    size='self.search_width' maxlength='256' />                                            
44             <label>and</label>                                                                        
45             <input id='nodelist_search_and' class='search_and'                                        
46                    type='checkbox' checked='checked'                                                      
47                    onchange='plekit_table_filter("nodelist","nodelist_search","nodelist_search_and");' />
48             <img class='reset' src="/planetlab/icons/clear.png" alt="reset search"
49                  onmousedown='plekit_table_filter_reset("nodelist","nodelist_search","nodelist_search_and");' />
50     </fieldset></div></td></tr>
51     
52     <tr>
53       ${nodewidget.display(node=None, header=True)}
54   </tr>
55   </thead>
56   <tbody>
57     <tr py:for="i,node in enumerate(query)">
58       ${nodewidget.display(node=node, header=None)}
59     </tr>
60
61   </tbody>  
62 </table>
63
64 </div>
65
66 </html>