Fossil SCM
Provide buttons to run ANALYZE with and without a limit on the /repo_stat1 page.
Commit
349fb1fa16e7875cefc4bbdef75d082567e6be006216c8d9c65d82f540ade983
Parent
3c68f7d44549d58…
1 file changed
+13
+13
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -773,10 +773,15 @@ | ||
| 773 | 773 | int bTabular; |
| 774 | 774 | login_check_credentials(); |
| 775 | 775 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 776 | 776 | bTabular = PB("tabular"); |
| 777 | 777 | |
| 778 | + if( P("analyze")!=0 ){ | |
| 779 | + db_multi_exec("ANALYZE"); | |
| 780 | + }else if( P("analyze200")!=0 ){ | |
| 781 | + db_multi_exec("PRAGMA analysis_limit=200; ANALYZE;"); | |
| 782 | + } | |
| 778 | 783 | style_set_current_feature("stat"); |
| 779 | 784 | style_header("Repository STAT1 Table"); |
| 780 | 785 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 781 | 786 | style_submenu_element("Stat", "stat"); |
| 782 | 787 | style_submenu_element("Schema", "repo_schema"); |
| @@ -809,10 +814,18 @@ | ||
| 809 | 814 | }else{ |
| 810 | 815 | @ </pre> |
| 811 | 816 | } |
| 812 | 817 | db_finalize(&q); |
| 813 | 818 | } |
| 819 | + @ <p><form method="POST"> | |
| 820 | + if( bTabular ){ | |
| 821 | + @ <input type="hidden" name="tabular" value="1"> | |
| 822 | + } | |
| 823 | + @ <input type="submit" name="analyze" value="Run ANALYZE"><br /> | |
| 824 | + @ <input type="submit" name="analyze200"\ | |
| 825 | + @ value="Run ANALYZE with limit=200"> | |
| 826 | + @ </form> | |
| 814 | 827 | style_finish_page(); |
| 815 | 828 | } |
| 816 | 829 | |
| 817 | 830 | /* |
| 818 | 831 | ** WEBPAGE: repo-tabsize |
| 819 | 832 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -773,10 +773,15 @@ | |
| 773 | int bTabular; |
| 774 | login_check_credentials(); |
| 775 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 776 | bTabular = PB("tabular"); |
| 777 | |
| 778 | style_set_current_feature("stat"); |
| 779 | style_header("Repository STAT1 Table"); |
| 780 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 781 | style_submenu_element("Stat", "stat"); |
| 782 | style_submenu_element("Schema", "repo_schema"); |
| @@ -809,10 +814,18 @@ | |
| 809 | }else{ |
| 810 | @ </pre> |
| 811 | } |
| 812 | db_finalize(&q); |
| 813 | } |
| 814 | style_finish_page(); |
| 815 | } |
| 816 | |
| 817 | /* |
| 818 | ** WEBPAGE: repo-tabsize |
| 819 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -773,10 +773,15 @@ | |
| 773 | int bTabular; |
| 774 | login_check_credentials(); |
| 775 | if( !g.perm.Admin ){ login_needed(0); return; } |
| 776 | bTabular = PB("tabular"); |
| 777 | |
| 778 | if( P("analyze")!=0 ){ |
| 779 | db_multi_exec("ANALYZE"); |
| 780 | }else if( P("analyze200")!=0 ){ |
| 781 | db_multi_exec("PRAGMA analysis_limit=200; ANALYZE;"); |
| 782 | } |
| 783 | style_set_current_feature("stat"); |
| 784 | style_header("Repository STAT1 Table"); |
| 785 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 786 | style_submenu_element("Stat", "stat"); |
| 787 | style_submenu_element("Schema", "repo_schema"); |
| @@ -809,10 +814,18 @@ | |
| 814 | }else{ |
| 815 | @ </pre> |
| 816 | } |
| 817 | db_finalize(&q); |
| 818 | } |
| 819 | @ <p><form method="POST"> |
| 820 | if( bTabular ){ |
| 821 | @ <input type="hidden" name="tabular" value="1"> |
| 822 | } |
| 823 | @ <input type="submit" name="analyze" value="Run ANALYZE"><br /> |
| 824 | @ <input type="submit" name="analyze200"\ |
| 825 | @ value="Run ANALYZE with limit=200"> |
| 826 | @ </form> |
| 827 | style_finish_page(); |
| 828 | } |
| 829 | |
| 830 | /* |
| 831 | ** WEBPAGE: repo-tabsize |
| 832 |