# HG changeset patch # User Marcin Kuzminski # Date 1355351890 -3600 # Node ID a797ada9d2ad041e18bd55f4f4a8579802a3ce90 # Parent f9c44f3ed4c690ace3f16442feeb8a4317879cb1 added option to ini file to define lightweight dashboard items per page before pagination diff -r f9c44f3ed4c6 -r a797ada9d2ad development.ini --- a/development.ini Wed Dec 12 23:26:30 2012 +0100 +++ b/development.ini Wed Dec 12 23:38:10 2012 +0100 @@ -29,6 +29,7 @@ #smtp_auth = [server:main] +## PASTE ##nr of threads to spawn #threadpool_workers = 5 @@ -39,7 +40,11 @@ #use_threadpool = true #use = egg:Paste#http + +#WAITRESS +threads = 5 use = egg:waitress#main + host = 0.0.0.0 port = 5000 @@ -54,7 +59,7 @@ full_stack = true static_files = true # Optional Languages -# en, fr, ja, pt_BR, zh_CN, zh_TW +# en, fr, ja, pt_BR, zh_CN, zh_TW, pl lang = en cache_dir = %(here)s/data index_dir = %(here)s/data/index @@ -63,6 +68,8 @@ vcs_full_cache = True force_https = false commit_parse_limit = 25 +# number of items displayed in lightweight dashboard before paginating +dashboard_items = 100 use_gravatar = true ## RSS feed options diff -r f9c44f3ed4c6 -r a797ada9d2ad production.ini --- a/production.ini Wed Dec 12 23:26:30 2012 +0100 +++ b/production.ini Wed Dec 12 23:38:10 2012 +0100 @@ -29,6 +29,7 @@ #smtp_auth = [server:main] +## PASTE ##nr of threads to spawn #threadpool_workers = 5 @@ -39,7 +40,11 @@ #use_threadpool = true #use = egg:Paste#http + +#WAITRESS +threads = 5 use = egg:waitress#main + host = 127.0.0.1 port = 8001 @@ -54,7 +59,7 @@ full_stack = true static_files = true # Optional Languages -# en, fr, ja, pt_BR, zh_CN, zh_TW +# en, fr, ja, pt_BR, zh_CN, zh_TW, pl lang = en cache_dir = %(here)s/data index_dir = %(here)s/data/index @@ -63,6 +68,8 @@ vcs_full_cache = True force_https = false commit_parse_limit = 50 +# number of items displayed in lightweight dashboard before paginating +dashboard_items = 100 use_gravatar = true ## RSS feed options diff -r f9c44f3ed4c6 -r a797ada9d2ad rhodecode/config/deployment.ini_tmpl --- a/rhodecode/config/deployment.ini_tmpl Wed Dec 12 23:26:30 2012 +0100 +++ b/rhodecode/config/deployment.ini_tmpl Wed Dec 12 23:38:10 2012 +0100 @@ -29,6 +29,7 @@ #smtp_auth = [server:main] +## PASTE ##nr of threads to spawn #threadpool_workers = 5 @@ -39,7 +40,11 @@ #use_threadpool = true #use = egg:Paste#http + +#WAITRESS +threads = 5 use = egg:waitress#main + host = 127.0.0.1 port = 5000 @@ -63,6 +68,8 @@ vcs_full_cache = True force_https = false commit_parse_limit = 50 +# number of items displayed in lightweight dashboard before paginating +dashboard_items = 100 use_gravatar = true ## RSS feed options diff -r f9c44f3ed4c6 -r a797ada9d2ad rhodecode/lib/base.py --- a/rhodecode/lib/base.py Wed Dec 12 23:26:30 2012 +0100 +++ b/rhodecode/lib/base.py Wed Dec 12 23:38:10 2012 +0100 @@ -18,7 +18,7 @@ from rhodecode import __version__, BACKENDS from rhodecode.lib.utils2 import str2bool, safe_unicode, AttributeDict,\ - safe_str + safe_str, safe_int from rhodecode.lib.auth import AuthUser, get_container_username, authfunc,\ HasPermissionAnyMiddleware, CookieStoreWrapper from rhodecode.lib.utils import get_repo_slug, invalidate_cache @@ -248,6 +248,7 @@ c.visual.show_private_icon = str2bool(rc_config.get('rhodecode_show_private_icon')) c.visual.stylify_metatags = str2bool(rc_config.get('rhodecode_stylify_metatags')) c.visual.lightweight_dashboard = str2bool(rc_config.get('rhodecode_lightweight_dashboard')) + c.visual.lightweight_dashboard_items = safe_int(config.get('dashboard_items', 100)) c.repo_name = get_repo_slug(request) c.backends = BACKENDS.keys() diff -r f9c44f3ed4c6 -r a797ada9d2ad rhodecode/templates/index_base.html --- a/rhodecode/templates/index_base.html Wed Dec 12 23:26:30 2012 +0100 +++ b/rhodecode/templates/index_base.html Wed Dec 12 23:38:10 2012 +0100 @@ -274,7 +274,7 @@ var myDataTable = new YAHOO.widget.DataTable("repos_list_wrap", myColumnDefs, myDataSource,{ sortedBy:{key:"name",dir:"asc"}, paginator: new YAHOO.widget.Paginator({ - rowsPerPage: 15, + rowsPerPage: ${c.visual.lightweight_dashboard_items}, alwaysVisible: false, template : "{PreviousPageLink} {FirstPageLink} {PageLinks} {LastPageLink} {NextPageLink}", pageLinks: 5,