var Exrep = {};
Exrep.Configuration = {
    builtin_fields: { type: true, id: true, ts: true, message: true, uri: true, error_info: true}
};


(function($) {
    Exrep.app = $.sammy((function(){
        var renderReportList = function(context){
            $.ajax({
                url: "./api.php/exceptions",
                dataType: "json",
                success: function(reports){
                    context.partial('templates/report_list.template', {reports: reports});
                    $('#showpage').hide();
                }
            })
        }

        return function(){
            this.element_selector = '#main';
            this.use(Sammy.Template);

            this.get('#/', function(context){
                renderReportList(context);
            });

            this.get('#/report/:id', function(context){
                if ($('#exceptions > h1').length === 0)
                    renderReportList(context);
                $.ajax({
                    url: "./api.php/exceptions/"+ encodeURI(this.params['id']),
                    dataType: "json",
                    success: function(report){
                        context.partial('templates/report_detail.template', {report: report}, function(r){
                            $('#showpage').html(r).show();
                        });
                    }
                })
            });
        };
    })());
    $(function() {
        Exrep.app.run('#/');
    });
})(jQuery);
@@ -227,34 +227,64 @@
 function(context
-)%7B
+, ps)%7B%0A            ps = ps %7C%7C10;
 %0A            $.a
@@ -331,17 +331,41 @@
 ceptions
-%22
+?pagesize=%22+encodeURI(ps)
 ,%0A      
@@ -763,32 +763,88 @@
 ction(context)%7B%0A
+                var pagesize = context.params.ps %7C%7C 10;%0A
                 
@@ -859,32 +859,42 @@
 portList(context
+, pagesize
 );%0A            %7D
@@ -945,32 +945,88 @@
 ction(context)%7B%0A
+                var pagesize = context.params.ps %7C%7C 10;%0A
                 
@@ -1109,16 +1109,26 @@
 (context
+, pagesize
 );%0A     

allow setting of pagesize for reports