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.

florian 2018-12-24 12:44 UTC fix-timeline-view
Commit f174bfa157d99f91f75427371520a83e7fb6699b96a53e1c5d22ff9ac2cb4f39
2 files changed +17 -1 +17 -1
+17 -1
--- src/branch.c
+++ src/branch.c
@@ -613,26 +613,42 @@
613613
614614
/*
615615
** WEBPAGE: brtimeline
616616
**
617617
** 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
618624
*/
619625
void brtimeline_page(void){
620626
Stmt q;
627
+ int tmFlags; /* Timeline display flags */
621628
622629
login_check_credentials();
623630
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
624631
625632
style_header("Branches");
626633
style_submenu_element("List", "brlist");
627634
login_anonymous_available();
635
+ timeline_ss_submenu();
636
+ cookie_render();
628637
@ <h2>The initial check-in for each branch:</h2>
629638
db_prepare(&q,
630639
"%s AND blob.rid IN (SELECT rid FROM tagxref"
631640
" WHERE tagtype>0 AND tagid=%d AND srcid!=0)"
632641
" ORDER BY event.mtime DESC",
633642
timeline_query_for_www(), TAG_BRANCH
634643
);
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);
636652
db_finalize(&q);
637653
style_footer();
638654
}
639655
--- 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 @@
685685
/*
686686
** WEBPAGE: /tagtimeline
687687
**
688688
** Render a timeline with all check-ins that contain non-propagating
689689
** 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
690696
*/
691697
void tagtimeline_page(void){
692698
Stmt q;
699
+ int tmFlags; /* Timeline display flags */
693700
694701
login_check_credentials();
695702
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
696703
697704
style_header("Tagged Check-ins");
698705
style_submenu_element("List", "taglist");
699706
login_anonymous_available();
707
+ timeline_ss_submenu();
708
+ cookie_render();
700709
@ <h2>Check-ins with non-propagating tags:</h2>
701710
db_prepare(&q,
702711
"%s AND blob.rid IN (SELECT rid FROM tagxref"
703712
" WHERE tagtype=1 AND srcid>0"
704713
" AND tagid IN (SELECT tagid FROM tag "
705714
" WHERE tagname GLOB 'sym-*'))"
706715
" ORDER BY event.mtime DESC /*sort*/",
707716
timeline_query_for_www()
708717
);
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);
710726
db_finalize(&q);
711727
@ <br />
712728
style_footer();
713729
}
714730
--- 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

Keyboard Shortcuts

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