Fossil SCM
Improved linkages between the various status pages.
Commit
ba4a9ca84dc1958bb9105fba97feb08ba6ea0f84
Parent
6d1ef3c4fbcbd12…
2 files changed
+10
-1
+2
+10
-1
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -81,10 +81,13 @@ | ||
| 81 | 81 | style_submenu_element("Activity Reports", 0, "reports"); |
| 82 | 82 | style_submenu_element("SHA1 Collisions", 0, "hash-collisions"); |
| 83 | 83 | if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){ |
| 84 | 84 | style_submenu_element("Table Sizes", 0, "repo-tabsize"); |
| 85 | 85 | } |
| 86 | + if( g.perm.Admin || g.perm.Setup || db_get_boolean("test_env_enable",0) ){ | |
| 87 | + style_submenu_element("Environment", 0, "test_env"); | |
| 88 | + } | |
| 86 | 89 | @ <table class="label-value"> |
| 87 | 90 | @ <tr><th>Repository Size:</th><td> |
| 88 | 91 | fsize = file_size(g.zRepositoryName); |
| 89 | 92 | bigSizeName(sizeof(zBuf), zBuf, fsize); |
| 90 | 93 | @ %s(zBuf) |
| @@ -363,10 +366,13 @@ | ||
| 363 | 366 | |
| 364 | 367 | style_header("Repository Schema"); |
| 365 | 368 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 366 | 369 | style_submenu_element("Stat", "Repository Stats", "stat"); |
| 367 | 370 | style_submenu_element("URLs", "URLs and Checkouts", "urllist"); |
| 371 | + if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){ | |
| 372 | + style_submenu_element("Table Sizes", 0, "repo-tabsize"); | |
| 373 | + } | |
| 368 | 374 | db_prepare(&q, "SELECT sql FROM %s.sqlite_master WHERE sql IS NOT NULL", |
| 369 | 375 | db_name("repository")); |
| 370 | 376 | @ <pre> |
| 371 | 377 | while( db_step(&q)==SQLITE_ROW ){ |
| 372 | 378 | @ %h(db_column_text(&q, 0)); |
| @@ -389,13 +395,16 @@ | ||
| 389 | 395 | login_check_credentials(); |
| 390 | 396 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 391 | 397 | style_header("Repository Table Sizes"); |
| 392 | 398 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 393 | 399 | style_submenu_element("Stat", "Repository Stats", "stat"); |
| 400 | + if( g.perm.Admin ){ | |
| 401 | + style_submenu_element("Schema", "Repository Schema", "repo_schema"); | |
| 402 | + } | |
| 394 | 403 | db_multi_exec( |
| 395 | 404 | "CREATE VIRTUAL TABLE temp.dbx USING dbstat(%s);" |
| 396 | - "CREATE TEMP TABLE trans(name TEXT PRIMARY KEY, tabname TEXT)WITHOUT ROWID;" | |
| 405 | + "CREATE TEMP TABLE trans(name TEXT PRIMARY KEY,tabname TEXT)WITHOUT ROWID;" | |
| 397 | 406 | "INSERT INTO trans(name,tabname)" |
| 398 | 407 | " SELECT name, tbl_name FROM %s.sqlite_master;" |
| 399 | 408 | "CREATE TEMP TABLE piechart(amt REAL, label TEXT);" |
| 400 | 409 | "INSERT INTO piechart(amt,label)" |
| 401 | 410 | " SELECT count(*), " |
| 402 | 411 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -81,10 +81,13 @@ | |
| 81 | style_submenu_element("Activity Reports", 0, "reports"); |
| 82 | style_submenu_element("SHA1 Collisions", 0, "hash-collisions"); |
| 83 | if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){ |
| 84 | style_submenu_element("Table Sizes", 0, "repo-tabsize"); |
| 85 | } |
| 86 | @ <table class="label-value"> |
| 87 | @ <tr><th>Repository Size:</th><td> |
| 88 | fsize = file_size(g.zRepositoryName); |
| 89 | bigSizeName(sizeof(zBuf), zBuf, fsize); |
| 90 | @ %s(zBuf) |
| @@ -363,10 +366,13 @@ | |
| 363 | |
| 364 | style_header("Repository Schema"); |
| 365 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 366 | style_submenu_element("Stat", "Repository Stats", "stat"); |
| 367 | style_submenu_element("URLs", "URLs and Checkouts", "urllist"); |
| 368 | db_prepare(&q, "SELECT sql FROM %s.sqlite_master WHERE sql IS NOT NULL", |
| 369 | db_name("repository")); |
| 370 | @ <pre> |
| 371 | while( db_step(&q)==SQLITE_ROW ){ |
| 372 | @ %h(db_column_text(&q, 0)); |
| @@ -389,13 +395,16 @@ | |
| 389 | login_check_credentials(); |
| 390 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 391 | style_header("Repository Table Sizes"); |
| 392 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 393 | style_submenu_element("Stat", "Repository Stats", "stat"); |
| 394 | db_multi_exec( |
| 395 | "CREATE VIRTUAL TABLE temp.dbx USING dbstat(%s);" |
| 396 | "CREATE TEMP TABLE trans(name TEXT PRIMARY KEY, tabname TEXT)WITHOUT ROWID;" |
| 397 | "INSERT INTO trans(name,tabname)" |
| 398 | " SELECT name, tbl_name FROM %s.sqlite_master;" |
| 399 | "CREATE TEMP TABLE piechart(amt REAL, label TEXT);" |
| 400 | "INSERT INTO piechart(amt,label)" |
| 401 | " SELECT count(*), " |
| 402 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -81,10 +81,13 @@ | |
| 81 | style_submenu_element("Activity Reports", 0, "reports"); |
| 82 | style_submenu_element("SHA1 Collisions", 0, "hash-collisions"); |
| 83 | if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){ |
| 84 | style_submenu_element("Table Sizes", 0, "repo-tabsize"); |
| 85 | } |
| 86 | if( g.perm.Admin || g.perm.Setup || db_get_boolean("test_env_enable",0) ){ |
| 87 | style_submenu_element("Environment", 0, "test_env"); |
| 88 | } |
| 89 | @ <table class="label-value"> |
| 90 | @ <tr><th>Repository Size:</th><td> |
| 91 | fsize = file_size(g.zRepositoryName); |
| 92 | bigSizeName(sizeof(zBuf), zBuf, fsize); |
| 93 | @ %s(zBuf) |
| @@ -363,10 +366,13 @@ | |
| 366 | |
| 367 | style_header("Repository Schema"); |
| 368 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 369 | style_submenu_element("Stat", "Repository Stats", "stat"); |
| 370 | style_submenu_element("URLs", "URLs and Checkouts", "urllist"); |
| 371 | if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){ |
| 372 | style_submenu_element("Table Sizes", 0, "repo-tabsize"); |
| 373 | } |
| 374 | db_prepare(&q, "SELECT sql FROM %s.sqlite_master WHERE sql IS NOT NULL", |
| 375 | db_name("repository")); |
| 376 | @ <pre> |
| 377 | while( db_step(&q)==SQLITE_ROW ){ |
| 378 | @ %h(db_column_text(&q, 0)); |
| @@ -389,13 +395,16 @@ | |
| 395 | login_check_credentials(); |
| 396 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 397 | style_header("Repository Table Sizes"); |
| 398 | style_adunit_config(ADUNIT_RIGHT_OK); |
| 399 | style_submenu_element("Stat", "Repository Stats", "stat"); |
| 400 | if( g.perm.Admin ){ |
| 401 | style_submenu_element("Schema", "Repository Schema", "repo_schema"); |
| 402 | } |
| 403 | db_multi_exec( |
| 404 | "CREATE VIRTUAL TABLE temp.dbx USING dbstat(%s);" |
| 405 | "CREATE TEMP TABLE trans(name TEXT PRIMARY KEY,tabname TEXT)WITHOUT ROWID;" |
| 406 | "INSERT INTO trans(name,tabname)" |
| 407 | " SELECT name, tbl_name FROM %s.sqlite_master;" |
| 408 | "CREATE TEMP TABLE piechart(amt REAL, label TEXT);" |
| 409 | "INSERT INTO piechart(amt,label)" |
| 410 | " SELECT count(*), " |
| 411 |
+2
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -1577,10 +1577,12 @@ | ||
| 1577 | 1577 | if( !showAll ){ |
| 1578 | 1578 | style_submenu_element("Show Cookies", 0, "%R/test_env?showall=1"); |
| 1579 | 1579 | }else{ |
| 1580 | 1580 | style_submenu_element("Hide Cookies", 0, "%R/test_env"); |
| 1581 | 1581 | } |
| 1582 | + style_submenu_element("Stats", 0, "%R/stat"); | |
| 1583 | + | |
| 1582 | 1584 | #if !defined(_WIN32) |
| 1583 | 1585 | @ uid=%d(getuid()), gid=%d(getgid())<br /> |
| 1584 | 1586 | #endif |
| 1585 | 1587 | @ g.zBaseURL = %h(g.zBaseURL)<br /> |
| 1586 | 1588 | @ g.zHttpsURL = %h(g.zHttpsURL)<br /> |
| 1587 | 1589 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -1577,10 +1577,12 @@ | |
| 1577 | if( !showAll ){ |
| 1578 | style_submenu_element("Show Cookies", 0, "%R/test_env?showall=1"); |
| 1579 | }else{ |
| 1580 | style_submenu_element("Hide Cookies", 0, "%R/test_env"); |
| 1581 | } |
| 1582 | #if !defined(_WIN32) |
| 1583 | @ uid=%d(getuid()), gid=%d(getgid())<br /> |
| 1584 | #endif |
| 1585 | @ g.zBaseURL = %h(g.zBaseURL)<br /> |
| 1586 | @ g.zHttpsURL = %h(g.zHttpsURL)<br /> |
| 1587 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -1577,10 +1577,12 @@ | |
| 1577 | if( !showAll ){ |
| 1578 | style_submenu_element("Show Cookies", 0, "%R/test_env?showall=1"); |
| 1579 | }else{ |
| 1580 | style_submenu_element("Hide Cookies", 0, "%R/test_env"); |
| 1581 | } |
| 1582 | style_submenu_element("Stats", 0, "%R/stat"); |
| 1583 | |
| 1584 | #if !defined(_WIN32) |
| 1585 | @ uid=%d(getuid()), gid=%d(getgid())<br /> |
| 1586 | #endif |
| 1587 | @ g.zBaseURL = %h(g.zBaseURL)<br /> |
| 1588 | @ g.zHttpsURL = %h(g.zHttpsURL)<br /> |
| 1589 |