Fossil SCM

Improved linkages between the various status pages.

drh 2016-05-29 20:58 trunk
Commit ba4a9ca84dc1958bb9105fba97feb08ba6ea0f84
2 files changed +10 -1 +2
+10 -1
--- src/stat.c
+++ src/stat.c
@@ -81,10 +81,13 @@
8181
style_submenu_element("Activity Reports", 0, "reports");
8282
style_submenu_element("SHA1 Collisions", 0, "hash-collisions");
8383
if( sqlite3_compileoption_used("ENABLE_DBSTAT_VTAB") ){
8484
style_submenu_element("Table Sizes", 0, "repo-tabsize");
8585
}
86
+ if( g.perm.Admin || g.perm.Setup || db_get_boolean("test_env_enable",0) ){
87
+ style_submenu_element("Environment", 0, "test_env");
88
+ }
8689
@ <table class="label-value">
8790
@ <tr><th>Repository&nbsp;Size:</th><td>
8891
fsize = file_size(g.zRepositoryName);
8992
bigSizeName(sizeof(zBuf), zBuf, fsize);
9093
@ %s(zBuf)
@@ -363,10 +366,13 @@
363366
364367
style_header("Repository Schema");
365368
style_adunit_config(ADUNIT_RIGHT_OK);
366369
style_submenu_element("Stat", "Repository Stats", "stat");
367370
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
+ }
368374
db_prepare(&q, "SELECT sql FROM %s.sqlite_master WHERE sql IS NOT NULL",
369375
db_name("repository"));
370376
@ <pre>
371377
while( db_step(&q)==SQLITE_ROW ){
372378
@ %h(db_column_text(&q, 0));
@@ -389,13 +395,16 @@
389395
login_check_credentials();
390396
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
391397
style_header("Repository Table Sizes");
392398
style_adunit_config(ADUNIT_RIGHT_OK);
393399
style_submenu_element("Stat", "Repository Stats", "stat");
400
+ if( g.perm.Admin ){
401
+ style_submenu_element("Schema", "Repository Schema", "repo_schema");
402
+ }
394403
db_multi_exec(
395404
"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;"
397406
"INSERT INTO trans(name,tabname)"
398407
" SELECT name, tbl_name FROM %s.sqlite_master;"
399408
"CREATE TEMP TABLE piechart(amt REAL, label TEXT);"
400409
"INSERT INTO piechart(amt,label)"
401410
" SELECT count(*), "
402411
--- 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&nbsp;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&nbsp;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
--- src/style.c
+++ src/style.c
@@ -1577,10 +1577,12 @@
15771577
if( !showAll ){
15781578
style_submenu_element("Show Cookies", 0, "%R/test_env?showall=1");
15791579
}else{
15801580
style_submenu_element("Hide Cookies", 0, "%R/test_env");
15811581
}
1582
+ style_submenu_element("Stats", 0, "%R/stat");
1583
+
15821584
#if !defined(_WIN32)
15831585
@ uid=%d(getuid()), gid=%d(getgid())<br />
15841586
#endif
15851587
@ g.zBaseURL = %h(g.zBaseURL)<br />
15861588
@ g.zHttpsURL = %h(g.zHttpsURL)<br />
15871589
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button