fixed divs in appamin.html, thanks Anthony
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 1.99.3 (2011-12-04 19:24:54) dev
|
Version 1.99.3 (2011-12-04 19:35:53) dev
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
{{extend 'layout.html'}}
|
{{extend 'layout.html'}}
|
||||||
<script><!--
|
<script><!--
|
||||||
jQuery(document).ready(function(){
|
jQuery(document).ready(function(){
|
||||||
jQuery("table.sortable tbody tr").mouseover( function() {
|
jQuery("table.sortable tbody tr").mouseover( function() {
|
||||||
jQuery(this).addClass("highlight"); }).mouseout( function() {
|
jQuery(this).addClass("highlight"); }).mouseout( function() {
|
||||||
jQuery(this).removeClass("highlight"); });
|
jQuery(this).removeClass("highlight"); });
|
||||||
jQuery('table.sortable tbody tr:odd').addClass('odd');
|
jQuery('table.sortable tbody tr:odd').addClass('odd');
|
||||||
jQuery('table.sortable tbody tr:even').addClass('even');
|
jQuery('table.sortable tbody tr:even').addClass('even');
|
||||||
});
|
});
|
||||||
//--></script>
|
//--></script>
|
||||||
|
|
||||||
{{if request.function=='index':}}
|
{{if request.function=='index':}}
|
||||||
<h1>{{=T("Available databases and tables")}}</h1>
|
<h2>{{=T("Available databases and tables")}}</h2>
|
||||||
{{if not databases:}}{{=T("No databases in this application")}}{{pass}}
|
{{if not databases:}}{{=T("No databases in this application")}}{{pass}}
|
||||||
{{for db in sorted(databases):}}
|
{{for db in sorted(databases):}}
|
||||||
{{for table in databases[db].tables:}}
|
{{for table in databases[db].tables:}}
|
||||||
@@ -28,28 +28,29 @@ jQuery(document).ready(function(){
|
|||||||
{{qry=''}}
|
{{qry=''}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<h2>{{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
|
<h3>
|
||||||
</h2>
|
{{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
|
||||||
|
</h3>
|
||||||
[ {{=A(str(T('insert new'))+' '+table,_href=URL('insert',args=[db,table]))}} ]
|
[ {{=A(str(T('insert new'))+' '+table,_href=URL('insert',args=[db,table]))}} ]
|
||||||
<br /><br />
|
<br /><br />
|
||||||
{{pass}}
|
{{pass}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
|
|
||||||
{{elif request.function=='select':}}
|
{{elif request.function=='select':}}
|
||||||
<h1>{{=XML(str(T("database %s select"))%A(request.args[0],_href=URL('index'))) }}
|
<h2>{{=XML(str(T("database %s select"))%A(request.args[0],_href=URL('index'))) }}
|
||||||
</h1>
|
</h2>
|
||||||
{{if table:}}
|
{{if table:}}
|
||||||
[ {{=A(str(T('insert new %s'))%table,_href=URL('insert',args=[request.args[0],table]))}} ]<br/><br/>
|
[ {{=A(str(T('insert new %s'))%table,_href=URL('insert',args=[request.args[0],table]))}} ]<br/><br/>
|
||||||
<h2>{{=T("Rows in table")}}</h2><br/>
|
<h3>{{=T("Rows in table")}}</h3><br/>
|
||||||
{{else:}}
|
{{else:}}
|
||||||
<h2>{{=T("Rows selected")}}</h2><br/>
|
<h3>{{=T("Rows selected")}}</h3><br/>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
{{=form}}
|
{{=form}}
|
||||||
<p>{{=T('The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.')}}<br/>
|
<p>{{=T('The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.')}}<br/>
|
||||||
{{=T('Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.')}}<br/>
|
{{=T('Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.')}}<br/>
|
||||||
{{=T('"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN')}}</p>
|
{{=T('"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN')}}</p>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<h3>{{=nrows}} {{=T("selected")}}</h3>
|
<h4>{{=nrows}} {{=T("selected")}}</h4>
|
||||||
{{if start>0:}}[ {{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)))}} ]{{pass}}
|
{{if start>0:}}[ {{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)))}} ]{{pass}}
|
||||||
{{if stop<nrows:}}[ {{=A(T('next 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start+100)))}} ]{{pass}}
|
{{if stop<nrows:}}[ {{=A(T('next 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start+100)))}} ]{{pass}}
|
||||||
{{if rows:}}
|
{{if rows:}}
|
||||||
@@ -59,7 +60,7 @@ jQuery(document).ready(function(){
|
|||||||
{{=SQLTABLE(rows,linkto,upload,orderby=True,_class='sortable')}}
|
{{=SQLTABLE(rows,linkto,upload,orderby=True,_class='sortable')}}
|
||||||
</div>
|
</div>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<br/><br/><h2>{{=T("Import/Export")}}</h2><br/>
|
<br/><br/><h3>{{=T("Import/Export")}}</h3><br/>
|
||||||
[ <a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}">{{=T("export as csv file")}}</a> ]
|
[ <a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}">{{=T("export as csv file")}}</a> ]
|
||||||
{{if table:}}
|
{{if table:}}
|
||||||
{{=FORM(str(T('or import from csv file'))+" ",INPUT(_type='file',_name='csvfile'),INPUT(_type='hidden',_value=table,_name='table'),INPUT(_type='submit',_value='import'))}}
|
{{=FORM(str(T('or import from csv file'))+" ",INPUT(_type='file',_name='csvfile'),INPUT(_type='hidden',_value=table,_name='table'),INPUT(_type='submit',_value='import'))}}
|
||||||
@@ -67,7 +68,7 @@ jQuery(document).ready(function(){
|
|||||||
|
|
||||||
|
|
||||||
{{elif request.function=='insert':}}
|
{{elif request.function=='insert':}}
|
||||||
<h1>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
|
<h2>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
|
||||||
{{if hasattr(table,'_primarykey'):}}
|
{{if hasattr(table,'_primarykey'):}}
|
||||||
{{fieldname=table._primarykey[0]}}
|
{{fieldname=table._primarykey[0]}}
|
||||||
{{dbname=request.args[0]}}
|
{{dbname=request.args[0]}}
|
||||||
@@ -77,14 +78,11 @@ jQuery(document).ready(function(){
|
|||||||
{{else:}}
|
{{else:}}
|
||||||
{{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
|
{{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
</h1>
|
</h2>
|
||||||
<h2>{{=T("New Record")}}</h2><br/>
|
<h3>{{=T("New Record")}}</h3><br/>
|
||||||
{{=form}}
|
{{=form}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{elif request.function=='update':}}
|
{{elif request.function=='update':}}
|
||||||
<h1>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
|
<h2>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
|
||||||
{{if hasattr(table,'_primarykey'):}}
|
{{if hasattr(table,'_primarykey'):}}
|
||||||
{{fieldname=request.vars.keys()[0]}}
|
{{fieldname=request.vars.keys()[0]}}
|
||||||
{{dbname=request.args[0]}}
|
{{dbname=request.args[0]}}
|
||||||
@@ -96,138 +94,139 @@ jQuery(document).ready(function(){
|
|||||||
{{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
|
{{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
|
||||||
{{=T("record id")}} {{=A(request.args[2],_href=URL('update',args=request.args[:3]))}}
|
{{=T("record id")}} {{=A(request.args[2],_href=URL('update',args=request.args[:3]))}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
</h1>
|
</h2>
|
||||||
<h2>{{=T("Edit current record")}}</h2><br/><br/>{{=form}}
|
<h3>{{=T("Edit current record")}}</h3><br/><br/>{{=form}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{elif request.function=='state':}}
|
{{elif request.function=='state':}}
|
||||||
<h1>{{=T("Internal State")}}</h1>
|
<h2>{{=T("Internal State")}}</h2>
|
||||||
<h2>{{=T("Current request")}}</h2>
|
<h3>{{=T("Current request")}}</h3>
|
||||||
{{=BEAUTIFY(request)}}
|
{{=BEAUTIFY(request)}}
|
||||||
<br/><h2>{{=T("Current response")}}</h2>
|
<br/><h3>{{=T("Current response")}}</h3>
|
||||||
{{=BEAUTIFY(response)}}
|
{{=BEAUTIFY(response)}}
|
||||||
<br/><h2>{{=T("Current session")}}</h2>
|
<br/><h3>{{=T("Current session")}}</h3>
|
||||||
{{=BEAUTIFY(session)}}
|
{{=BEAUTIFY(session)}}
|
||||||
|
|
||||||
|
|
||||||
{{elif request.function == 'ccache':}}
|
{{elif request.function == 'ccache':}}
|
||||||
<h1>Cache</h1>
|
<h2>Cache</h2>
|
||||||
<div class="wrapper">
|
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<div class="list-header">
|
|
||||||
<h2>Statistics</h2>
|
<div class="list-header">
|
||||||
</div>
|
<h3>Statistics</h3>
|
||||||
<div class="content">
|
</div>
|
||||||
<h3>Overview</h3>
|
|
||||||
<p>Number of entries: <strong>{{=total['entries']}}</strong>
|
<div class="content">
|
||||||
{{if total['entries'] > 0:}}
|
<h4>Overview</h4>
|
||||||
<p>
|
<p>Number of entries: <strong>{{=total['entries']}}</strong>
|
||||||
Hit Ratio:
|
{{if total['entries'] > 0:}}
|
||||||
<strong>{{=total['ratio']}}%</strong>
|
|
||||||
(<strong>{{=total['hits']}}</strong> hits
|
|
||||||
and <strong>{{=total['misses']}}</strong> misses)
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Size of cache:
|
|
||||||
{{if object_stats:}}
|
|
||||||
<strong>{{=total['objects']}}</strong> items,
|
|
||||||
<strong>{{=total['bytes']}}</strong> bytes
|
|
||||||
{{if total['bytes'] > 524287:}}
|
|
||||||
(<strong>{{="%.0d" % (total['bytes'] / 1048576)}} MB</strong>)
|
|
||||||
{{pass}}
|
|
||||||
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
|
||||||
{{pass}}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Cache contains items up to
|
|
||||||
<strong>{{="%02d" % total['oldest'][0]}}</strong> hours
|
|
||||||
<strong>{{="%02d" % total['oldest'][1]}}</strong> minutes
|
|
||||||
<strong>{{="%02d" % total['oldest'][2]}}</strong> seconds old.
|
|
||||||
</p>
|
|
||||||
{{=BUTTON(T('Cache Keys'), _onclick='jQuery("#all_keys").toggle();')}}
|
|
||||||
<div class="hidden" id="all_keys">
|
|
||||||
{{=total['keys']}}
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
{{pass}}
|
|
||||||
|
|
||||||
<h3>RAM</h3>
|
|
||||||
<p>Number of entries: <strong>{{=ram['entries']}}</strong>
|
|
||||||
{{if ram['entries'] > 0:}}
|
|
||||||
<p>
|
|
||||||
Hit Ratio:
|
|
||||||
<strong>{{=ram['ratio']}}%</strong>
|
|
||||||
(<strong>{{=ram['hits']}}</strong> hits
|
|
||||||
and <strong>{{=ram['misses']}}</strong> misses)
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Size of cache:
|
|
||||||
{{if object_stats:}}
|
|
||||||
<strong>{{=ram['objects']}}</strong> items,
|
|
||||||
<strong>{{=ram['bytes']}}</strong> bytes
|
|
||||||
{{if ram['bytes'] > 524287:}}
|
|
||||||
(<strong>{{=ram['bytes'] / 1048576}} MB</strong>)
|
|
||||||
{{pass}}
|
|
||||||
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
|
||||||
{{pass}}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
RAM contains items up to
|
|
||||||
<strong>{{="%02d" % ram['oldest'][0]}}</strong> hours
|
|
||||||
<strong>{{="%02d" % ram['oldest'][1]}}</strong> minutes
|
|
||||||
<strong>{{="%02d" % ram['oldest'][2]}}</strong> seconds old.
|
|
||||||
</p>
|
|
||||||
{{=BUTTON(T('RAM Cache Keys'), _onclick='jQuery("#ram_keys").toggle();')}}
|
|
||||||
<div class="hidden" id="ram_keys">
|
|
||||||
{{=ram['keys']}}
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
{{pass}}
|
|
||||||
|
|
||||||
<h3>DISK</h3>
|
|
||||||
<p>Number of entries: <strong>{{=disk['entries']}}</strong>
|
|
||||||
{{if disk['entries'] > 0:}}
|
|
||||||
<p>
|
|
||||||
Hit Ratio:
|
|
||||||
<strong>{{=disk['ratio']}}%</strong>
|
|
||||||
(<strong>{{=disk['hits']}}</strong> hits
|
|
||||||
and <strong>{{=disk['misses']}}</strong> misses)
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Size of cache:
|
|
||||||
{{if object_stats:}}
|
|
||||||
<strong>{{=disk['objects']}}</strong> items,
|
|
||||||
<strong>{{=disk['bytes']}}</strong> bytes
|
|
||||||
{{if disk['bytes'] > 524287:}}
|
|
||||||
(<strong>{{=disk['bytes'] / 1048576}} MB</strong>)
|
|
||||||
{{pass}}
|
|
||||||
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
|
||||||
{{pass}}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
DISK contains items up to
|
|
||||||
<strong>{{="%02d" % disk['oldest'][0]}}</strong> hours
|
|
||||||
<strong>{{="%02d" % disk['oldest'][1]}}</strong> minutes
|
|
||||||
<strong>{{="%02d" % disk['oldest'][2]}}</strong> seconds old.
|
|
||||||
</p>
|
|
||||||
{{=BUTTON(T('Disk Cache Keys'), _onclick='jQuery("#disk_keys").toggle();')}}
|
|
||||||
<div class="hidden" id="disk_keys">
|
|
||||||
{{=disk['keys']}}
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
{{pass}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="list-header">
|
|
||||||
<h2>Manage Cache</h2>
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
|
||||||
<p>
|
|
||||||
{{=form}}
|
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
Hit Ratio:
|
||||||
|
<strong>{{=total['ratio']}}%</strong>
|
||||||
|
(<strong>{{=total['hits']}}</strong> hits
|
||||||
|
and <strong>{{=total['misses']}}</strong> misses)
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Size of cache:
|
||||||
|
{{if object_stats:}}
|
||||||
|
<strong>{{=total['objects']}}</strong> items,
|
||||||
|
<strong>{{=total['bytes']}}</strong> bytes
|
||||||
|
{{if total['bytes'] > 524287:}}
|
||||||
|
(<strong>{{="%.0d" % (total['bytes'] / 1048576)}} MB</strong>)
|
||||||
|
{{pass}}
|
||||||
|
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
||||||
|
{{pass}}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Cache contains items up to
|
||||||
|
<strong>{{="%02d" % total['oldest'][0]}}</strong> hours
|
||||||
|
<strong>{{="%02d" % total['oldest'][1]}}</strong> minutes
|
||||||
|
<strong>{{="%02d" % total['oldest'][2]}}</strong> seconds old.
|
||||||
|
</p>
|
||||||
|
{{=BUTTON(T('Cache Keys'), _onclick='jQuery("#all_keys").toggle();')}}
|
||||||
|
<div class="hidden" id="all_keys">
|
||||||
|
{{=total['keys']}}
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
|
{{pass}}
|
||||||
|
|
||||||
|
<h4>RAM</h4>
|
||||||
|
<p>Number of entries: <strong>{{=ram['entries']}}</strong>
|
||||||
|
{{if ram['entries'] > 0:}}</p>
|
||||||
|
<p>
|
||||||
|
Hit Ratio:
|
||||||
|
<strong>{{=ram['ratio']}}%</strong>
|
||||||
|
(<strong>{{=ram['hits']}}</strong> hits
|
||||||
|
and <strong>{{=ram['misses']}}</strong> misses)
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Size of cache:
|
||||||
|
{{if object_stats:}}
|
||||||
|
<strong>{{=ram['objects']}}</strong> items,
|
||||||
|
<strong>{{=ram['bytes']}}</strong> bytes
|
||||||
|
{{if ram['bytes'] > 524287:}}
|
||||||
|
(<strong>{{=ram['bytes'] / 1048576}} MB</strong>)
|
||||||
|
{{pass}}
|
||||||
|
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
||||||
|
{{pass}}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
RAM contains items up to
|
||||||
|
<strong>{{="%02d" % ram['oldest'][0]}}</strong> hours
|
||||||
|
<strong>{{="%02d" % ram['oldest'][1]}}</strong> minutes
|
||||||
|
<strong>{{="%02d" % ram['oldest'][2]}}</strong> seconds old.
|
||||||
|
</p>
|
||||||
|
{{=BUTTON(T('RAM Cache Keys'), _onclick='jQuery("#ram_keys").toggle();')}}
|
||||||
|
<div class="hidden" id="ram_keys">
|
||||||
|
{{=ram['keys']}}
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
{{pass}}
|
||||||
|
|
||||||
|
<h4>DISK</h4>
|
||||||
|
<p>Number of entries: <strong>{{=disk['entries']}}</strong>
|
||||||
|
{{if disk['entries'] > 0:}}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Hit Ratio:
|
||||||
|
<strong>{{=disk['ratio']}}%</strong>
|
||||||
|
(<strong>{{=disk['hits']}}</strong> hits
|
||||||
|
and <strong>{{=disk['misses']}}</strong> misses)
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Size of cache:
|
||||||
|
{{if object_stats:}}
|
||||||
|
<strong>{{=disk['objects']}}</strong> items,
|
||||||
|
<strong>{{=disk['bytes']}}</strong> bytes
|
||||||
|
{{if disk['bytes'] > 524287:}}
|
||||||
|
(<strong>{{=disk['bytes'] / 1048576}} MB</strong>)
|
||||||
|
{{pass}}
|
||||||
|
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
||||||
|
{{pass}}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
DISK contains items up to
|
||||||
|
<strong>{{="%02d" % disk['oldest'][0]}}</strong> hours
|
||||||
|
<strong>{{="%02d" % disk['oldest'][1]}}</strong> minutes
|
||||||
|
<strong>{{="%02d" % disk['oldest'][2]}}</strong> seconds old.
|
||||||
|
</p>
|
||||||
|
{{=BUTTON(T('Disk Cache Keys'), _onclick='jQuery("#disk_keys").toggle();')}}
|
||||||
|
<div class="hidden" id="disk_keys">
|
||||||
|
{{=disk['keys']}}
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
{{pass}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="list-header">
|
||||||
|
<h3>Manage Cache</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<p>
|
||||||
|
{{=form}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
|
||||||
{{pass}}
|
{{pass}}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
{{extend 'layout.html'}}
|
{{extend 'layout.html'}}
|
||||||
<script><!--
|
<script><!--
|
||||||
jQuery(document).ready(function(){
|
jQuery(document).ready(function(){
|
||||||
jQuery("table.sortable tbody tr").mouseover( function() {
|
jQuery("table.sortable tbody tr").mouseover( function() {
|
||||||
jQuery(this).addClass("highlight"); }).mouseout( function() {
|
jQuery(this).addClass("highlight"); }).mouseout( function() {
|
||||||
jQuery(this).removeClass("highlight"); });
|
jQuery(this).removeClass("highlight"); });
|
||||||
jQuery('table.sortable tbody tr:odd').addClass('odd');
|
jQuery('table.sortable tbody tr:odd').addClass('odd');
|
||||||
jQuery('table.sortable tbody tr:even').addClass('even');
|
jQuery('table.sortable tbody tr:even').addClass('even');
|
||||||
});
|
});
|
||||||
//--></script>
|
//--></script>
|
||||||
|
|
||||||
{{if request.function=='index':}}
|
{{if request.function=='index':}}
|
||||||
<h1>{{=T("Available databases and tables")}}</h1>
|
<h2>{{=T("Available databases and tables")}}</h2>
|
||||||
{{if not databases:}}{{=T("No databases in this application")}}{{pass}}
|
{{if not databases:}}{{=T("No databases in this application")}}{{pass}}
|
||||||
{{for db in sorted(databases):}}
|
{{for db in sorted(databases):}}
|
||||||
{{for table in databases[db].tables:}}
|
{{for table in databases[db].tables:}}
|
||||||
@@ -28,28 +28,29 @@ jQuery(document).ready(function(){
|
|||||||
{{qry=''}}
|
{{qry=''}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<h2>{{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
|
<h3>
|
||||||
</h2>
|
{{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
|
||||||
|
</h3>
|
||||||
[ {{=A(str(T('insert new'))+' '+table,_href=URL('insert',args=[db,table]))}} ]
|
[ {{=A(str(T('insert new'))+' '+table,_href=URL('insert',args=[db,table]))}} ]
|
||||||
<br /><br />
|
<br /><br />
|
||||||
{{pass}}
|
{{pass}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
|
|
||||||
{{elif request.function=='select':}}
|
{{elif request.function=='select':}}
|
||||||
<h1>{{=XML(str(T("database %s select"))%A(request.args[0],_href=URL('index'))) }}
|
<h2>{{=XML(str(T("database %s select"))%A(request.args[0],_href=URL('index'))) }}
|
||||||
</h1>
|
</h2>
|
||||||
{{if table:}}
|
{{if table:}}
|
||||||
[ {{=A(str(T('insert new %s'))%table,_href=URL('insert',args=[request.args[0],table]))}} ]<br/><br/>
|
[ {{=A(str(T('insert new %s'))%table,_href=URL('insert',args=[request.args[0],table]))}} ]<br/><br/>
|
||||||
<h2>{{=T("Rows in table")}}</h2><br/>
|
<h3>{{=T("Rows in table")}}</h3><br/>
|
||||||
{{else:}}
|
{{else:}}
|
||||||
<h2>{{=T("Rows selected")}}</h2><br/>
|
<h3>{{=T("Rows selected")}}</h3><br/>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
{{=form}}
|
{{=form}}
|
||||||
<p>{{=T('The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.')}}<br/>
|
<p>{{=T('The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.')}}<br/>
|
||||||
{{=T('Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.')}}<br/>
|
{{=T('Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.')}}<br/>
|
||||||
{{=T('"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN')}}</p>
|
{{=T('"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN')}}</p>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<h3>{{=nrows}} {{=T("selected")}}</h3>
|
<h4>{{=nrows}} {{=T("selected")}}</h4>
|
||||||
{{if start>0:}}[ {{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)))}} ]{{pass}}
|
{{if start>0:}}[ {{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)))}} ]{{pass}}
|
||||||
{{if stop<nrows:}}[ {{=A(T('next 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start+100)))}} ]{{pass}}
|
{{if stop<nrows:}}[ {{=A(T('next 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start+100)))}} ]{{pass}}
|
||||||
{{if rows:}}
|
{{if rows:}}
|
||||||
@@ -59,7 +60,7 @@ jQuery(document).ready(function(){
|
|||||||
{{=SQLTABLE(rows,linkto,upload,orderby=True,_class='sortable')}}
|
{{=SQLTABLE(rows,linkto,upload,orderby=True,_class='sortable')}}
|
||||||
</div>
|
</div>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<br/><br/><h2>{{=T("Import/Export")}}</h2><br/>
|
<br/><br/><h3>{{=T("Import/Export")}}</h3><br/>
|
||||||
[ <a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}">{{=T("export as csv file")}}</a> ]
|
[ <a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}">{{=T("export as csv file")}}</a> ]
|
||||||
{{if table:}}
|
{{if table:}}
|
||||||
{{=FORM(str(T('or import from csv file'))+" ",INPUT(_type='file',_name='csvfile'),INPUT(_type='hidden',_value=table,_name='table'),INPUT(_type='submit',_value='import'))}}
|
{{=FORM(str(T('or import from csv file'))+" ",INPUT(_type='file',_name='csvfile'),INPUT(_type='hidden',_value=table,_name='table'),INPUT(_type='submit',_value='import'))}}
|
||||||
@@ -67,7 +68,7 @@ jQuery(document).ready(function(){
|
|||||||
|
|
||||||
|
|
||||||
{{elif request.function=='insert':}}
|
{{elif request.function=='insert':}}
|
||||||
<h1>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
|
<h2>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
|
||||||
{{if hasattr(table,'_primarykey'):}}
|
{{if hasattr(table,'_primarykey'):}}
|
||||||
{{fieldname=table._primarykey[0]}}
|
{{fieldname=table._primarykey[0]}}
|
||||||
{{dbname=request.args[0]}}
|
{{dbname=request.args[0]}}
|
||||||
@@ -77,14 +78,11 @@ jQuery(document).ready(function(){
|
|||||||
{{else:}}
|
{{else:}}
|
||||||
{{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
|
{{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
</h1>
|
</h2>
|
||||||
<h2>{{=T("New Record")}}</h2><br/>
|
<h3>{{=T("New Record")}}</h3><br/>
|
||||||
{{=form}}
|
{{=form}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{elif request.function=='update':}}
|
{{elif request.function=='update':}}
|
||||||
<h1>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
|
<h2>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
|
||||||
{{if hasattr(table,'_primarykey'):}}
|
{{if hasattr(table,'_primarykey'):}}
|
||||||
{{fieldname=request.vars.keys()[0]}}
|
{{fieldname=request.vars.keys()[0]}}
|
||||||
{{dbname=request.args[0]}}
|
{{dbname=request.args[0]}}
|
||||||
@@ -96,138 +94,139 @@ jQuery(document).ready(function(){
|
|||||||
{{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
|
{{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
|
||||||
{{=T("record id")}} {{=A(request.args[2],_href=URL('update',args=request.args[:3]))}}
|
{{=T("record id")}} {{=A(request.args[2],_href=URL('update',args=request.args[:3]))}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
</h1>
|
</h2>
|
||||||
<h2>{{=T("Edit current record")}}</h2><br/><br/>{{=form}}
|
<h3>{{=T("Edit current record")}}</h3><br/><br/>{{=form}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{elif request.function=='state':}}
|
{{elif request.function=='state':}}
|
||||||
<h1>{{=T("Internal State")}}</h1>
|
<h2>{{=T("Internal State")}}</h2>
|
||||||
<h2>{{=T("Current request")}}</h2>
|
<h3>{{=T("Current request")}}</h3>
|
||||||
{{=BEAUTIFY(request)}}
|
{{=BEAUTIFY(request)}}
|
||||||
<br/><h2>{{=T("Current response")}}</h2>
|
<br/><h3>{{=T("Current response")}}</h3>
|
||||||
{{=BEAUTIFY(response)}}
|
{{=BEAUTIFY(response)}}
|
||||||
<br/><h2>{{=T("Current session")}}</h2>
|
<br/><h3>{{=T("Current session")}}</h3>
|
||||||
{{=BEAUTIFY(session)}}
|
{{=BEAUTIFY(session)}}
|
||||||
|
|
||||||
|
|
||||||
{{elif request.function == 'ccache':}}
|
{{elif request.function == 'ccache':}}
|
||||||
<h1>Cache</h1>
|
<h2>Cache</h2>
|
||||||
<div class="wrapper">
|
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<div class="list-header">
|
|
||||||
<h2>Statistics</h2>
|
<div class="list-header">
|
||||||
</div>
|
<h3>Statistics</h3>
|
||||||
<div class="content">
|
</div>
|
||||||
<h3>Overview</h3>
|
|
||||||
<p>Number of entries: <strong>{{=total['entries']}}</strong>
|
<div class="content">
|
||||||
{{if total['entries'] > 0:}}
|
<h4>Overview</h4>
|
||||||
<p>
|
<p>Number of entries: <strong>{{=total['entries']}}</strong>
|
||||||
Hit Ratio:
|
{{if total['entries'] > 0:}}
|
||||||
<strong>{{=total['ratio']}}%</strong>
|
|
||||||
(<strong>{{=total['hits']}}</strong> hits
|
|
||||||
and <strong>{{=total['misses']}}</strong> misses)
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Size of cache:
|
|
||||||
{{if object_stats:}}
|
|
||||||
<strong>{{=total['objects']}}</strong> items,
|
|
||||||
<strong>{{=total['bytes']}}</strong> bytes
|
|
||||||
{{if total['bytes'] > 524287:}}
|
|
||||||
(<strong>{{="%.0d" % (total['bytes'] / 1048576)}} MB</strong>)
|
|
||||||
{{pass}}
|
|
||||||
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
|
||||||
{{pass}}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Cache contains items up to
|
|
||||||
<strong>{{="%02d" % total['oldest'][0]}}</strong> hours
|
|
||||||
<strong>{{="%02d" % total['oldest'][1]}}</strong> minutes
|
|
||||||
<strong>{{="%02d" % total['oldest'][2]}}</strong> seconds old.
|
|
||||||
</p>
|
|
||||||
{{=BUTTON(T('Cache Keys'), _onclick='jQuery("#all_keys").toggle();')}}
|
|
||||||
<div class="hidden" id="all_keys">
|
|
||||||
{{=total['keys']}}
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
{{pass}}
|
|
||||||
|
|
||||||
<h3>RAM</h3>
|
|
||||||
<p>Number of entries: <strong>{{=ram['entries']}}</strong>
|
|
||||||
{{if ram['entries'] > 0:}}
|
|
||||||
<p>
|
|
||||||
Hit Ratio:
|
|
||||||
<strong>{{=ram['ratio']}}%</strong>
|
|
||||||
(<strong>{{=ram['hits']}}</strong> hits
|
|
||||||
and <strong>{{=ram['misses']}}</strong> misses)
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Size of cache:
|
|
||||||
{{if object_stats:}}
|
|
||||||
<strong>{{=ram['objects']}}</strong> items,
|
|
||||||
<strong>{{=ram['bytes']}}</strong> bytes
|
|
||||||
{{if ram['bytes'] > 524287:}}
|
|
||||||
(<strong>{{=ram['bytes'] / 1048576}} MB</strong>)
|
|
||||||
{{pass}}
|
|
||||||
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
|
||||||
{{pass}}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
RAM contains items up to
|
|
||||||
<strong>{{="%02d" % ram['oldest'][0]}}</strong> hours
|
|
||||||
<strong>{{="%02d" % ram['oldest'][1]}}</strong> minutes
|
|
||||||
<strong>{{="%02d" % ram['oldest'][2]}}</strong> seconds old.
|
|
||||||
</p>
|
|
||||||
{{=BUTTON(T('RAM Cache Keys'), _onclick='jQuery("#ram_keys").toggle();')}}
|
|
||||||
<div class="hidden" id="ram_keys">
|
|
||||||
{{=ram['keys']}}
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
{{pass}}
|
|
||||||
|
|
||||||
<h3>DISK</h3>
|
|
||||||
<p>Number of entries: <strong>{{=disk['entries']}}</strong>
|
|
||||||
{{if disk['entries'] > 0:}}
|
|
||||||
<p>
|
|
||||||
Hit Ratio:
|
|
||||||
<strong>{{=disk['ratio']}}%</strong>
|
|
||||||
(<strong>{{=disk['hits']}}</strong> hits
|
|
||||||
and <strong>{{=disk['misses']}}</strong> misses)
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Size of cache:
|
|
||||||
{{if object_stats:}}
|
|
||||||
<strong>{{=disk['objects']}}</strong> items,
|
|
||||||
<strong>{{=disk['bytes']}}</strong> bytes
|
|
||||||
{{if disk['bytes'] > 524287:}}
|
|
||||||
(<strong>{{=disk['bytes'] / 1048576}} MB</strong>)
|
|
||||||
{{pass}}
|
|
||||||
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
|
||||||
{{pass}}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
DISK contains items up to
|
|
||||||
<strong>{{="%02d" % disk['oldest'][0]}}</strong> hours
|
|
||||||
<strong>{{="%02d" % disk['oldest'][1]}}</strong> minutes
|
|
||||||
<strong>{{="%02d" % disk['oldest'][2]}}</strong> seconds old.
|
|
||||||
</p>
|
|
||||||
{{=BUTTON(T('Disk Cache Keys'), _onclick='jQuery("#disk_keys").toggle();')}}
|
|
||||||
<div class="hidden" id="disk_keys">
|
|
||||||
{{=disk['keys']}}
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
{{pass}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="list-header">
|
|
||||||
<h2>Manage Cache</h2>
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
|
||||||
<p>
|
|
||||||
{{=form}}
|
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
Hit Ratio:
|
||||||
|
<strong>{{=total['ratio']}}%</strong>
|
||||||
|
(<strong>{{=total['hits']}}</strong> hits
|
||||||
|
and <strong>{{=total['misses']}}</strong> misses)
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Size of cache:
|
||||||
|
{{if object_stats:}}
|
||||||
|
<strong>{{=total['objects']}}</strong> items,
|
||||||
|
<strong>{{=total['bytes']}}</strong> bytes
|
||||||
|
{{if total['bytes'] > 524287:}}
|
||||||
|
(<strong>{{="%.0d" % (total['bytes'] / 1048576)}} MB</strong>)
|
||||||
|
{{pass}}
|
||||||
|
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
||||||
|
{{pass}}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Cache contains items up to
|
||||||
|
<strong>{{="%02d" % total['oldest'][0]}}</strong> hours
|
||||||
|
<strong>{{="%02d" % total['oldest'][1]}}</strong> minutes
|
||||||
|
<strong>{{="%02d" % total['oldest'][2]}}</strong> seconds old.
|
||||||
|
</p>
|
||||||
|
{{=BUTTON(T('Cache Keys'), _onclick='jQuery("#all_keys").toggle();')}}
|
||||||
|
<div class="hidden" id="all_keys">
|
||||||
|
{{=total['keys']}}
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
|
{{pass}}
|
||||||
|
|
||||||
|
<h4>RAM</h4>
|
||||||
|
<p>Number of entries: <strong>{{=ram['entries']}}</strong>
|
||||||
|
{{if ram['entries'] > 0:}}</p>
|
||||||
|
<p>
|
||||||
|
Hit Ratio:
|
||||||
|
<strong>{{=ram['ratio']}}%</strong>
|
||||||
|
(<strong>{{=ram['hits']}}</strong> hits
|
||||||
|
and <strong>{{=ram['misses']}}</strong> misses)
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Size of cache:
|
||||||
|
{{if object_stats:}}
|
||||||
|
<strong>{{=ram['objects']}}</strong> items,
|
||||||
|
<strong>{{=ram['bytes']}}</strong> bytes
|
||||||
|
{{if ram['bytes'] > 524287:}}
|
||||||
|
(<strong>{{=ram['bytes'] / 1048576}} MB</strong>)
|
||||||
|
{{pass}}
|
||||||
|
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
||||||
|
{{pass}}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
RAM contains items up to
|
||||||
|
<strong>{{="%02d" % ram['oldest'][0]}}</strong> hours
|
||||||
|
<strong>{{="%02d" % ram['oldest'][1]}}</strong> minutes
|
||||||
|
<strong>{{="%02d" % ram['oldest'][2]}}</strong> seconds old.
|
||||||
|
</p>
|
||||||
|
{{=BUTTON(T('RAM Cache Keys'), _onclick='jQuery("#ram_keys").toggle();')}}
|
||||||
|
<div class="hidden" id="ram_keys">
|
||||||
|
{{=ram['keys']}}
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
{{pass}}
|
||||||
|
|
||||||
|
<h4>DISK</h4>
|
||||||
|
<p>Number of entries: <strong>{{=disk['entries']}}</strong>
|
||||||
|
{{if disk['entries'] > 0:}}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Hit Ratio:
|
||||||
|
<strong>{{=disk['ratio']}}%</strong>
|
||||||
|
(<strong>{{=disk['hits']}}</strong> hits
|
||||||
|
and <strong>{{=disk['misses']}}</strong> misses)
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Size of cache:
|
||||||
|
{{if object_stats:}}
|
||||||
|
<strong>{{=disk['objects']}}</strong> items,
|
||||||
|
<strong>{{=disk['bytes']}}</strong> bytes
|
||||||
|
{{if disk['bytes'] > 524287:}}
|
||||||
|
(<strong>{{=disk['bytes'] / 1048576}} MB</strong>)
|
||||||
|
{{pass}}
|
||||||
|
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
||||||
|
{{pass}}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
DISK contains items up to
|
||||||
|
<strong>{{="%02d" % disk['oldest'][0]}}</strong> hours
|
||||||
|
<strong>{{="%02d" % disk['oldest'][1]}}</strong> minutes
|
||||||
|
<strong>{{="%02d" % disk['oldest'][2]}}</strong> seconds old.
|
||||||
|
</p>
|
||||||
|
{{=BUTTON(T('Disk Cache Keys'), _onclick='jQuery("#disk_keys").toggle();')}}
|
||||||
|
<div class="hidden" id="disk_keys">
|
||||||
|
{{=disk['keys']}}
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
{{pass}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="list-header">
|
||||||
|
<h3>Manage Cache</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<p>
|
||||||
|
{{=form}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
|
||||||
{{pass}}
|
{{pass}}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
{{extend 'layout.html'}}
|
{{extend 'layout.html'}}
|
||||||
<script><!--
|
<script><!--
|
||||||
jQuery(document).ready(function(){
|
jQuery(document).ready(function(){
|
||||||
jQuery("table.sortable tbody tr").mouseover( function() {
|
jQuery("table.sortable tbody tr").mouseover( function() {
|
||||||
jQuery(this).addClass("highlight"); }).mouseout( function() {
|
jQuery(this).addClass("highlight"); }).mouseout( function() {
|
||||||
jQuery(this).removeClass("highlight"); });
|
jQuery(this).removeClass("highlight"); });
|
||||||
jQuery('table.sortable tbody tr:odd').addClass('odd');
|
jQuery('table.sortable tbody tr:odd').addClass('odd');
|
||||||
jQuery('table.sortable tbody tr:even').addClass('even');
|
jQuery('table.sortable tbody tr:even').addClass('even');
|
||||||
});
|
});
|
||||||
//--></script>
|
//--></script>
|
||||||
|
|
||||||
{{if request.function=='index':}}
|
{{if request.function=='index':}}
|
||||||
<h1>{{=T("Available databases and tables")}}</h1>
|
<h2>{{=T("Available databases and tables")}}</h2>
|
||||||
{{if not databases:}}{{=T("No databases in this application")}}{{pass}}
|
{{if not databases:}}{{=T("No databases in this application")}}{{pass}}
|
||||||
{{for db in sorted(databases):}}
|
{{for db in sorted(databases):}}
|
||||||
{{for table in databases[db].tables:}}
|
{{for table in databases[db].tables:}}
|
||||||
@@ -28,28 +28,29 @@ jQuery(document).ready(function(){
|
|||||||
{{qry=''}}
|
{{qry=''}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<h2>{{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
|
<h3>
|
||||||
</h2>
|
{{=A("%s.%s" % (db,table),_href=URL('select',args=[db],vars=dict(query=qry)))}}
|
||||||
|
</h3>
|
||||||
[ {{=A(str(T('insert new'))+' '+table,_href=URL('insert',args=[db,table]))}} ]
|
[ {{=A(str(T('insert new'))+' '+table,_href=URL('insert',args=[db,table]))}} ]
|
||||||
<br /><br />
|
<br /><br />
|
||||||
{{pass}}
|
{{pass}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
|
|
||||||
{{elif request.function=='select':}}
|
{{elif request.function=='select':}}
|
||||||
<h1>{{=XML(str(T("database %s select"))%A(request.args[0],_href=URL('index'))) }}
|
<h2>{{=XML(str(T("database %s select"))%A(request.args[0],_href=URL('index'))) }}
|
||||||
</h1>
|
</h2>
|
||||||
{{if table:}}
|
{{if table:}}
|
||||||
[ {{=A(str(T('insert new %s'))%table,_href=URL('insert',args=[request.args[0],table]))}} ]<br/><br/>
|
[ {{=A(str(T('insert new %s'))%table,_href=URL('insert',args=[request.args[0],table]))}} ]<br/><br/>
|
||||||
<h2>{{=T("Rows in table")}}</h2><br/>
|
<h3>{{=T("Rows in table")}}</h3><br/>
|
||||||
{{else:}}
|
{{else:}}
|
||||||
<h2>{{=T("Rows selected")}}</h2><br/>
|
<h3>{{=T("Rows selected")}}</h3><br/>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
{{=form}}
|
{{=form}}
|
||||||
<p>{{=T('The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.')}}<br/>
|
<p>{{=T('The "query" is a condition like "db.table1.field1==\'value\'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.')}}<br/>
|
||||||
{{=T('Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.')}}<br/>
|
{{=T('Use (...)&(...) for AND, (...)|(...) for OR, and ~(...) for NOT to build more complex queries.')}}<br/>
|
||||||
{{=T('"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN')}}</p>
|
{{=T('"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN')}}</p>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
<h3>{{=nrows}} {{=T("selected")}}</h3>
|
<h4>{{=nrows}} {{=T("selected")}}</h4>
|
||||||
{{if start>0:}}[ {{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)))}} ]{{pass}}
|
{{if start>0:}}[ {{=A(T('previous 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start-100)))}} ]{{pass}}
|
||||||
{{if stop<nrows:}}[ {{=A(T('next 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start+100)))}} ]{{pass}}
|
{{if stop<nrows:}}[ {{=A(T('next 100 rows'),_href=URL('select',args=request.args[0],vars=dict(start=start+100)))}} ]{{pass}}
|
||||||
{{if rows:}}
|
{{if rows:}}
|
||||||
@@ -59,7 +60,7 @@ jQuery(document).ready(function(){
|
|||||||
{{=SQLTABLE(rows,linkto,upload,orderby=True,_class='sortable')}}
|
{{=SQLTABLE(rows,linkto,upload,orderby=True,_class='sortable')}}
|
||||||
</div>
|
</div>
|
||||||
{{pass}}
|
{{pass}}
|
||||||
<br/><br/><h2>{{=T("Import/Export")}}</h2><br/>
|
<br/><br/><h3>{{=T("Import/Export")}}</h3><br/>
|
||||||
[ <a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}">{{=T("export as csv file")}}</a> ]
|
[ <a href="{{=URL('csv',args=request.args[0],vars=dict(query=query))}}">{{=T("export as csv file")}}</a> ]
|
||||||
{{if table:}}
|
{{if table:}}
|
||||||
{{=FORM(str(T('or import from csv file'))+" ",INPUT(_type='file',_name='csvfile'),INPUT(_type='hidden',_value=table,_name='table'),INPUT(_type='submit',_value='import'))}}
|
{{=FORM(str(T('or import from csv file'))+" ",INPUT(_type='file',_name='csvfile'),INPUT(_type='hidden',_value=table,_name='table'),INPUT(_type='submit',_value='import'))}}
|
||||||
@@ -67,7 +68,7 @@ jQuery(document).ready(function(){
|
|||||||
|
|
||||||
|
|
||||||
{{elif request.function=='insert':}}
|
{{elif request.function=='insert':}}
|
||||||
<h1>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
|
<h2>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
|
||||||
{{if hasattr(table,'_primarykey'):}}
|
{{if hasattr(table,'_primarykey'):}}
|
||||||
{{fieldname=table._primarykey[0]}}
|
{{fieldname=table._primarykey[0]}}
|
||||||
{{dbname=request.args[0]}}
|
{{dbname=request.args[0]}}
|
||||||
@@ -77,14 +78,11 @@ jQuery(document).ready(function(){
|
|||||||
{{else:}}
|
{{else:}}
|
||||||
{{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
|
{{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
</h1>
|
</h2>
|
||||||
<h2>{{=T("New Record")}}</h2><br/>
|
<h3>{{=T("New Record")}}</h3><br/>
|
||||||
{{=form}}
|
{{=form}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{elif request.function=='update':}}
|
{{elif request.function=='update':}}
|
||||||
<h1>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
|
<h2>{{=T("database")}} {{=A(request.args[0],_href=URL('index'))}}
|
||||||
{{if hasattr(table,'_primarykey'):}}
|
{{if hasattr(table,'_primarykey'):}}
|
||||||
{{fieldname=request.vars.keys()[0]}}
|
{{fieldname=request.vars.keys()[0]}}
|
||||||
{{dbname=request.args[0]}}
|
{{dbname=request.args[0]}}
|
||||||
@@ -96,138 +94,139 @@ jQuery(document).ready(function(){
|
|||||||
{{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
|
{{=T("table")}} {{=A(request.args[1],_href=URL('select',args=request.args[0],vars=dict(query='%s.%s.id>0'%tuple(request.args[:2]))))}}
|
||||||
{{=T("record id")}} {{=A(request.args[2],_href=URL('update',args=request.args[:3]))}}
|
{{=T("record id")}} {{=A(request.args[2],_href=URL('update',args=request.args[:3]))}}
|
||||||
{{pass}}
|
{{pass}}
|
||||||
</h1>
|
</h2>
|
||||||
<h2>{{=T("Edit current record")}}</h2><br/><br/>{{=form}}
|
<h3>{{=T("Edit current record")}}</h3><br/><br/>{{=form}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{{elif request.function=='state':}}
|
{{elif request.function=='state':}}
|
||||||
<h1>{{=T("Internal State")}}</h1>
|
<h2>{{=T("Internal State")}}</h2>
|
||||||
<h2>{{=T("Current request")}}</h2>
|
<h3>{{=T("Current request")}}</h3>
|
||||||
{{=BEAUTIFY(request)}}
|
{{=BEAUTIFY(request)}}
|
||||||
<br/><h2>{{=T("Current response")}}</h2>
|
<br/><h3>{{=T("Current response")}}</h3>
|
||||||
{{=BEAUTIFY(response)}}
|
{{=BEAUTIFY(response)}}
|
||||||
<br/><h2>{{=T("Current session")}}</h2>
|
<br/><h3>{{=T("Current session")}}</h3>
|
||||||
{{=BEAUTIFY(session)}}
|
{{=BEAUTIFY(session)}}
|
||||||
|
|
||||||
|
|
||||||
{{elif request.function == 'ccache':}}
|
{{elif request.function == 'ccache':}}
|
||||||
<h1>Cache</h1>
|
<h2>Cache</h2>
|
||||||
<div class="wrapper">
|
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<div class="list-header">
|
|
||||||
<h2>Statistics</h2>
|
<div class="list-header">
|
||||||
</div>
|
<h3>Statistics</h3>
|
||||||
<div class="content">
|
</div>
|
||||||
<h3>Overview</h3>
|
|
||||||
<p>Number of entries: <strong>{{=total['entries']}}</strong>
|
<div class="content">
|
||||||
{{if total['entries'] > 0:}}
|
<h4>Overview</h4>
|
||||||
<p>
|
<p>Number of entries: <strong>{{=total['entries']}}</strong>
|
||||||
Hit Ratio:
|
{{if total['entries'] > 0:}}
|
||||||
<strong>{{=total['ratio']}}%</strong>
|
|
||||||
(<strong>{{=total['hits']}}</strong> hits
|
|
||||||
and <strong>{{=total['misses']}}</strong> misses)
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Size of cache:
|
|
||||||
{{if object_stats:}}
|
|
||||||
<strong>{{=total['objects']}}</strong> items,
|
|
||||||
<strong>{{=total['bytes']}}</strong> bytes
|
|
||||||
{{if total['bytes'] > 524287:}}
|
|
||||||
(<strong>{{="%.0d" % (total['bytes'] / 1048576)}} MB</strong>)
|
|
||||||
{{pass}}
|
|
||||||
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
|
||||||
{{pass}}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Cache contains items up to
|
|
||||||
<strong>{{="%02d" % total['oldest'][0]}}</strong> hours
|
|
||||||
<strong>{{="%02d" % total['oldest'][1]}}</strong> minutes
|
|
||||||
<strong>{{="%02d" % total['oldest'][2]}}</strong> seconds old.
|
|
||||||
</p>
|
|
||||||
{{=BUTTON(T('Cache Keys'), _onclick='jQuery("#all_keys").toggle();')}}
|
|
||||||
<div class="hidden" id="all_keys">
|
|
||||||
{{=total['keys']}}
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
{{pass}}
|
|
||||||
|
|
||||||
<h3>RAM</h3>
|
|
||||||
<p>Number of entries: <strong>{{=ram['entries']}}</strong>
|
|
||||||
{{if ram['entries'] > 0:}}
|
|
||||||
<p>
|
|
||||||
Hit Ratio:
|
|
||||||
<strong>{{=ram['ratio']}}%</strong>
|
|
||||||
(<strong>{{=ram['hits']}}</strong> hits
|
|
||||||
and <strong>{{=ram['misses']}}</strong> misses)
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Size of cache:
|
|
||||||
{{if object_stats:}}
|
|
||||||
<strong>{{=ram['objects']}}</strong> items,
|
|
||||||
<strong>{{=ram['bytes']}}</strong> bytes
|
|
||||||
{{if ram['bytes'] > 524287:}}
|
|
||||||
(<strong>{{=ram['bytes'] / 1048576}} MB</strong>)
|
|
||||||
{{pass}}
|
|
||||||
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
|
||||||
{{pass}}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
RAM contains items up to
|
|
||||||
<strong>{{="%02d" % ram['oldest'][0]}}</strong> hours
|
|
||||||
<strong>{{="%02d" % ram['oldest'][1]}}</strong> minutes
|
|
||||||
<strong>{{="%02d" % ram['oldest'][2]}}</strong> seconds old.
|
|
||||||
</p>
|
|
||||||
{{=BUTTON(T('RAM Cache Keys'), _onclick='jQuery("#ram_keys").toggle();')}}
|
|
||||||
<div class="hidden" id="ram_keys">
|
|
||||||
{{=ram['keys']}}
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
{{pass}}
|
|
||||||
|
|
||||||
<h3>DISK</h3>
|
|
||||||
<p>Number of entries: <strong>{{=disk['entries']}}</strong>
|
|
||||||
{{if disk['entries'] > 0:}}
|
|
||||||
<p>
|
|
||||||
Hit Ratio:
|
|
||||||
<strong>{{=disk['ratio']}}%</strong>
|
|
||||||
(<strong>{{=disk['hits']}}</strong> hits
|
|
||||||
and <strong>{{=disk['misses']}}</strong> misses)
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
Size of cache:
|
|
||||||
{{if object_stats:}}
|
|
||||||
<strong>{{=disk['objects']}}</strong> items,
|
|
||||||
<strong>{{=disk['bytes']}}</strong> bytes
|
|
||||||
{{if disk['bytes'] > 524287:}}
|
|
||||||
(<strong>{{=disk['bytes'] / 1048576}} MB</strong>)
|
|
||||||
{{pass}}
|
|
||||||
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
|
||||||
{{pass}}
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
DISK contains items up to
|
|
||||||
<strong>{{="%02d" % disk['oldest'][0]}}</strong> hours
|
|
||||||
<strong>{{="%02d" % disk['oldest'][1]}}</strong> minutes
|
|
||||||
<strong>{{="%02d" % disk['oldest'][2]}}</strong> seconds old.
|
|
||||||
</p>
|
|
||||||
{{=BUTTON(T('Disk Cache Keys'), _onclick='jQuery("#disk_keys").toggle();')}}
|
|
||||||
<div class="hidden" id="disk_keys">
|
|
||||||
{{=disk['keys']}}
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
{{pass}}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="list-header">
|
|
||||||
<h2>Manage Cache</h2>
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
|
||||||
<p>
|
|
||||||
{{=form}}
|
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
Hit Ratio:
|
||||||
|
<strong>{{=total['ratio']}}%</strong>
|
||||||
|
(<strong>{{=total['hits']}}</strong> hits
|
||||||
|
and <strong>{{=total['misses']}}</strong> misses)
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Size of cache:
|
||||||
|
{{if object_stats:}}
|
||||||
|
<strong>{{=total['objects']}}</strong> items,
|
||||||
|
<strong>{{=total['bytes']}}</strong> bytes
|
||||||
|
{{if total['bytes'] > 524287:}}
|
||||||
|
(<strong>{{="%.0d" % (total['bytes'] / 1048576)}} MB</strong>)
|
||||||
|
{{pass}}
|
||||||
|
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
||||||
|
{{pass}}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Cache contains items up to
|
||||||
|
<strong>{{="%02d" % total['oldest'][0]}}</strong> hours
|
||||||
|
<strong>{{="%02d" % total['oldest'][1]}}</strong> minutes
|
||||||
|
<strong>{{="%02d" % total['oldest'][2]}}</strong> seconds old.
|
||||||
|
</p>
|
||||||
|
{{=BUTTON(T('Cache Keys'), _onclick='jQuery("#all_keys").toggle();')}}
|
||||||
|
<div class="hidden" id="all_keys">
|
||||||
|
{{=total['keys']}}
|
||||||
</div>
|
</div>
|
||||||
|
<br />
|
||||||
|
{{pass}}
|
||||||
|
|
||||||
|
<h4>RAM</h4>
|
||||||
|
<p>Number of entries: <strong>{{=ram['entries']}}</strong>
|
||||||
|
{{if ram['entries'] > 0:}}</p>
|
||||||
|
<p>
|
||||||
|
Hit Ratio:
|
||||||
|
<strong>{{=ram['ratio']}}%</strong>
|
||||||
|
(<strong>{{=ram['hits']}}</strong> hits
|
||||||
|
and <strong>{{=ram['misses']}}</strong> misses)
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Size of cache:
|
||||||
|
{{if object_stats:}}
|
||||||
|
<strong>{{=ram['objects']}}</strong> items,
|
||||||
|
<strong>{{=ram['bytes']}}</strong> bytes
|
||||||
|
{{if ram['bytes'] > 524287:}}
|
||||||
|
(<strong>{{=ram['bytes'] / 1048576}} MB</strong>)
|
||||||
|
{{pass}}
|
||||||
|
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
||||||
|
{{pass}}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
RAM contains items up to
|
||||||
|
<strong>{{="%02d" % ram['oldest'][0]}}</strong> hours
|
||||||
|
<strong>{{="%02d" % ram['oldest'][1]}}</strong> minutes
|
||||||
|
<strong>{{="%02d" % ram['oldest'][2]}}</strong> seconds old.
|
||||||
|
</p>
|
||||||
|
{{=BUTTON(T('RAM Cache Keys'), _onclick='jQuery("#ram_keys").toggle();')}}
|
||||||
|
<div class="hidden" id="ram_keys">
|
||||||
|
{{=ram['keys']}}
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
{{pass}}
|
||||||
|
|
||||||
|
<h4>DISK</h4>
|
||||||
|
<p>Number of entries: <strong>{{=disk['entries']}}</strong>
|
||||||
|
{{if disk['entries'] > 0:}}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Hit Ratio:
|
||||||
|
<strong>{{=disk['ratio']}}%</strong>
|
||||||
|
(<strong>{{=disk['hits']}}</strong> hits
|
||||||
|
and <strong>{{=disk['misses']}}</strong> misses)
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
Size of cache:
|
||||||
|
{{if object_stats:}}
|
||||||
|
<strong>{{=disk['objects']}}</strong> items,
|
||||||
|
<strong>{{=disk['bytes']}}</strong> bytes
|
||||||
|
{{if disk['bytes'] > 524287:}}
|
||||||
|
(<strong>{{=disk['bytes'] / 1048576}} MB</strong>)
|
||||||
|
{{pass}}
|
||||||
|
{{else:}} <strong>not available</strong> (requires the Python <a href="http://pypi.python.org/pypi/guppy/" target="_blank">guppy</a> library)
|
||||||
|
{{pass}}
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
DISK contains items up to
|
||||||
|
<strong>{{="%02d" % disk['oldest'][0]}}</strong> hours
|
||||||
|
<strong>{{="%02d" % disk['oldest'][1]}}</strong> minutes
|
||||||
|
<strong>{{="%02d" % disk['oldest'][2]}}</strong> seconds old.
|
||||||
|
</p>
|
||||||
|
{{=BUTTON(T('Disk Cache Keys'), _onclick='jQuery("#disk_keys").toggle();')}}
|
||||||
|
<div class="hidden" id="disk_keys">
|
||||||
|
{{=disk['keys']}}
|
||||||
|
</div>
|
||||||
|
<br />
|
||||||
|
{{pass}}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="list-header">
|
||||||
|
<h3>Manage Cache</h3>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<p>
|
||||||
|
{{=form}}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
|
||||||
{{pass}}
|
{{pass}}
|
||||||
|
|||||||
Reference in New Issue
Block a user