projects
/
APKPM.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
92c0a13
)
return simple table dump sa json
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 9 Jul 2011 20:18:15 +0000
(22:18 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 9 Jul 2011 20:18:15 +0000
(22:18 +0200)
web_ui.pl
patch
|
blob
|
history
diff --git
a/web_ui.pl
b/web_ui.pl
index
0331d68
..
7fef2fc
100755
(executable)
--- a/
web_ui.pl
+++ b/
web_ui.pl
@@
-60,6
+60,13
@@
get '/g/:call/:args' => [ args => qr/.*/ ] => sub {
_render_jsonp( $self, $ret );
};
_render_jsonp( $self, $ret );
};
+get '/table/:table' => sub {
+ my $self = shift;
+ my $sql = "select * from " . $self->param('table') . " limit " . ( $self->param('limit') || 1 );
+ my $ret = $gearman->req( 'SUBMIT_JOB', 'Store_sql', '', $sql );
+ _render_jsonp( $self, $ret );
+};
+
get '/_g/status' => sub {
my $self = shift;
get '/_g/status' => sub {
my $self = shift;