Fossil SCM
Also add background colors, clickable nodes, the option box to select the viewing mode, and timeline query parameters 'ng', 'brbg' and 'ubg' for the /brtimeline and /tagtimeline web pages.
Commit
f174bfa157d99f91f75427371520a83e7fb6699b96a53e1c5d22ff9ac2cb4f39
Parent
2ac6b5077656c35…
2 files changed
+17
-1
+17
-1
+17
-1
| --- src/branch.c | ||
| +++ src/branch.c | ||
| @@ -613,26 +613,42 @@ | ||
| 613 | 613 | |
| 614 | 614 | /* |
| 615 | 615 | ** WEBPAGE: brtimeline |
| 616 | 616 | ** |
| 617 | 617 | ** Show a timeline of all branches |
| 618 | +** | |
| 619 | +** Query parameters: | |
| 620 | +** | |
| 621 | +** ng No graph | |
| 622 | +** brbg Background color by branch name | |
| 623 | +** ubg Background color by user name | |
| 618 | 624 | */ |
| 619 | 625 | void brtimeline_page(void){ |
| 620 | 626 | Stmt q; |
| 627 | + int tmFlags; /* Timeline display flags */ | |
| 621 | 628 | |
| 622 | 629 | login_check_credentials(); |
| 623 | 630 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 624 | 631 | |
| 625 | 632 | style_header("Branches"); |
| 626 | 633 | style_submenu_element("List", "brlist"); |
| 627 | 634 | login_anonymous_available(); |
| 635 | + timeline_ss_submenu(); | |
| 636 | + cookie_render(); | |
| 628 | 637 | @ <h2>The initial check-in for each branch:</h2> |
| 629 | 638 | db_prepare(&q, |
| 630 | 639 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 631 | 640 | " WHERE tagtype>0 AND tagid=%d AND srcid!=0)" |
| 632 | 641 | " ORDER BY event.mtime DESC", |
| 633 | 642 | timeline_query_for_www(), TAG_BRANCH |
| 634 | 643 | ); |
| 635 | - www_print_timeline(&q, 0, 0, 0, 0, brtimeline_extra); | |
| 644 | + /* With TIMELINE_LEAFONLY (which also implies TIMELINE_DISJOINT), the branch | |
| 645 | + ** background colors are shown, and the timeline nodes are drawn, but the | |
| 646 | + ** connecting rails are omitted. */ | |
| 647 | + tmFlags = TIMELINE_LEAFONLY | TIMELINE_NOSCROLL; | |
| 648 | + if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH; | |
| 649 | + if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; | |
| 650 | + if( P("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; | |
| 651 | + www_print_timeline(&q, tmFlags, 0, 0, 0, brtimeline_extra); | |
| 636 | 652 | db_finalize(&q); |
| 637 | 653 | style_footer(); |
| 638 | 654 | } |
| 639 | 655 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -613,26 +613,42 @@ | |
| 613 | |
| 614 | /* |
| 615 | ** WEBPAGE: brtimeline |
| 616 | ** |
| 617 | ** Show a timeline of all branches |
| 618 | */ |
| 619 | void brtimeline_page(void){ |
| 620 | Stmt q; |
| 621 | |
| 622 | login_check_credentials(); |
| 623 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 624 | |
| 625 | style_header("Branches"); |
| 626 | style_submenu_element("List", "brlist"); |
| 627 | login_anonymous_available(); |
| 628 | @ <h2>The initial check-in for each branch:</h2> |
| 629 | db_prepare(&q, |
| 630 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 631 | " WHERE tagtype>0 AND tagid=%d AND srcid!=0)" |
| 632 | " ORDER BY event.mtime DESC", |
| 633 | timeline_query_for_www(), TAG_BRANCH |
| 634 | ); |
| 635 | www_print_timeline(&q, 0, 0, 0, 0, brtimeline_extra); |
| 636 | db_finalize(&q); |
| 637 | style_footer(); |
| 638 | } |
| 639 |
| --- src/branch.c | |
| +++ src/branch.c | |
| @@ -613,26 +613,42 @@ | |
| 613 | |
| 614 | /* |
| 615 | ** WEBPAGE: brtimeline |
| 616 | ** |
| 617 | ** Show a timeline of all branches |
| 618 | ** |
| 619 | ** Query parameters: |
| 620 | ** |
| 621 | ** ng No graph |
| 622 | ** brbg Background color by branch name |
| 623 | ** ubg Background color by user name |
| 624 | */ |
| 625 | void brtimeline_page(void){ |
| 626 | Stmt q; |
| 627 | int tmFlags; /* Timeline display flags */ |
| 628 | |
| 629 | login_check_credentials(); |
| 630 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 631 | |
| 632 | style_header("Branches"); |
| 633 | style_submenu_element("List", "brlist"); |
| 634 | login_anonymous_available(); |
| 635 | timeline_ss_submenu(); |
| 636 | cookie_render(); |
| 637 | @ <h2>The initial check-in for each branch:</h2> |
| 638 | db_prepare(&q, |
| 639 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 640 | " WHERE tagtype>0 AND tagid=%d AND srcid!=0)" |
| 641 | " ORDER BY event.mtime DESC", |
| 642 | timeline_query_for_www(), TAG_BRANCH |
| 643 | ); |
| 644 | /* With TIMELINE_LEAFONLY (which also implies TIMELINE_DISJOINT), the branch |
| 645 | ** background colors are shown, and the timeline nodes are drawn, but the |
| 646 | ** connecting rails are omitted. */ |
| 647 | tmFlags = TIMELINE_LEAFONLY | TIMELINE_NOSCROLL; |
| 648 | if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 649 | if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 650 | if( P("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; |
| 651 | www_print_timeline(&q, tmFlags, 0, 0, 0, brtimeline_extra); |
| 652 | db_finalize(&q); |
| 653 | style_footer(); |
| 654 | } |
| 655 |
+17
-1
| --- src/tag.c | ||
| +++ src/tag.c | ||
| @@ -685,29 +685,45 @@ | ||
| 685 | 685 | /* |
| 686 | 686 | ** WEBPAGE: /tagtimeline |
| 687 | 687 | ** |
| 688 | 688 | ** Render a timeline with all check-ins that contain non-propagating |
| 689 | 689 | ** symbolic tags. |
| 690 | +** | |
| 691 | +** Query parameters: | |
| 692 | +** | |
| 693 | +** ng No graph | |
| 694 | +** brbg Background color by branch name | |
| 695 | +** ubg Background color by user name | |
| 690 | 696 | */ |
| 691 | 697 | void tagtimeline_page(void){ |
| 692 | 698 | Stmt q; |
| 699 | + int tmFlags; /* Timeline display flags */ | |
| 693 | 700 | |
| 694 | 701 | login_check_credentials(); |
| 695 | 702 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 696 | 703 | |
| 697 | 704 | style_header("Tagged Check-ins"); |
| 698 | 705 | style_submenu_element("List", "taglist"); |
| 699 | 706 | login_anonymous_available(); |
| 707 | + timeline_ss_submenu(); | |
| 708 | + cookie_render(); | |
| 700 | 709 | @ <h2>Check-ins with non-propagating tags:</h2> |
| 701 | 710 | db_prepare(&q, |
| 702 | 711 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 703 | 712 | " WHERE tagtype=1 AND srcid>0" |
| 704 | 713 | " AND tagid IN (SELECT tagid FROM tag " |
| 705 | 714 | " WHERE tagname GLOB 'sym-*'))" |
| 706 | 715 | " ORDER BY event.mtime DESC /*sort*/", |
| 707 | 716 | timeline_query_for_www() |
| 708 | 717 | ); |
| 709 | - www_print_timeline(&q, 0, 0, 0, 0, 0); | |
| 718 | + /* With TIMELINE_LEAFONLY (which also implies TIMELINE_DISJOINT), the branch | |
| 719 | + ** background colors are shown, and the timeline nodes are drawn, but the | |
| 720 | + ** connecting rails are omitted. */ | |
| 721 | + tmFlags = TIMELINE_LEAFONLY | TIMELINE_NOSCROLL; | |
| 722 | + if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH; | |
| 723 | + if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; | |
| 724 | + if( P("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; | |
| 725 | + www_print_timeline(&q, tmFlags, 0, 0, 0, 0); | |
| 710 | 726 | db_finalize(&q); |
| 711 | 727 | @ <br /> |
| 712 | 728 | style_footer(); |
| 713 | 729 | } |
| 714 | 730 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -685,29 +685,45 @@ | |
| 685 | /* |
| 686 | ** WEBPAGE: /tagtimeline |
| 687 | ** |
| 688 | ** Render a timeline with all check-ins that contain non-propagating |
| 689 | ** symbolic tags. |
| 690 | */ |
| 691 | void tagtimeline_page(void){ |
| 692 | Stmt q; |
| 693 | |
| 694 | login_check_credentials(); |
| 695 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 696 | |
| 697 | style_header("Tagged Check-ins"); |
| 698 | style_submenu_element("List", "taglist"); |
| 699 | login_anonymous_available(); |
| 700 | @ <h2>Check-ins with non-propagating tags:</h2> |
| 701 | db_prepare(&q, |
| 702 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 703 | " WHERE tagtype=1 AND srcid>0" |
| 704 | " AND tagid IN (SELECT tagid FROM tag " |
| 705 | " WHERE tagname GLOB 'sym-*'))" |
| 706 | " ORDER BY event.mtime DESC /*sort*/", |
| 707 | timeline_query_for_www() |
| 708 | ); |
| 709 | www_print_timeline(&q, 0, 0, 0, 0, 0); |
| 710 | db_finalize(&q); |
| 711 | @ <br /> |
| 712 | style_footer(); |
| 713 | } |
| 714 |
| --- src/tag.c | |
| +++ src/tag.c | |
| @@ -685,29 +685,45 @@ | |
| 685 | /* |
| 686 | ** WEBPAGE: /tagtimeline |
| 687 | ** |
| 688 | ** Render a timeline with all check-ins that contain non-propagating |
| 689 | ** symbolic tags. |
| 690 | ** |
| 691 | ** Query parameters: |
| 692 | ** |
| 693 | ** ng No graph |
| 694 | ** brbg Background color by branch name |
| 695 | ** ubg Background color by user name |
| 696 | */ |
| 697 | void tagtimeline_page(void){ |
| 698 | Stmt q; |
| 699 | int tmFlags; /* Timeline display flags */ |
| 700 | |
| 701 | login_check_credentials(); |
| 702 | if( !g.perm.Read ){ login_needed(g.anon.Read); return; } |
| 703 | |
| 704 | style_header("Tagged Check-ins"); |
| 705 | style_submenu_element("List", "taglist"); |
| 706 | login_anonymous_available(); |
| 707 | timeline_ss_submenu(); |
| 708 | cookie_render(); |
| 709 | @ <h2>Check-ins with non-propagating tags:</h2> |
| 710 | db_prepare(&q, |
| 711 | "%s AND blob.rid IN (SELECT rid FROM tagxref" |
| 712 | " WHERE tagtype=1 AND srcid>0" |
| 713 | " AND tagid IN (SELECT tagid FROM tag " |
| 714 | " WHERE tagname GLOB 'sym-*'))" |
| 715 | " ORDER BY event.mtime DESC /*sort*/", |
| 716 | timeline_query_for_www() |
| 717 | ); |
| 718 | /* With TIMELINE_LEAFONLY (which also implies TIMELINE_DISJOINT), the branch |
| 719 | ** background colors are shown, and the timeline nodes are drawn, but the |
| 720 | ** connecting rails are omitted. */ |
| 721 | tmFlags = TIMELINE_LEAFONLY | TIMELINE_NOSCROLL; |
| 722 | if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH; |
| 723 | if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR; |
| 724 | if( P("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR; |
| 725 | www_print_timeline(&q, tmFlags, 0, 0, 0, 0); |
| 726 | db_finalize(&q); |
| 727 | @ <br /> |
| 728 | style_footer(); |
| 729 | } |
| 730 |