Fossil

Check-in [f174bfa1]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment: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.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | fix-timeline-view
Files: files | file ages | folders
SHA3-256: f174bfa157d99f91f75427371520a83e7fb6699b96a53e1c5d22ff9ac2cb4f39
User & Date: florian 2018-12-24 12:44:00
References
2018-12-24
20:54
Revise and partially revert [d28f9e99a0] and [f174bfa157]: no need to remove the parents, TIMELINE_DISJOINT already does the magic. Related nodes now again have connecting rails for the /leaves, /brtimeline, and /tagtimeline web pages. check-in: 8f4b7e1f user: florian tags: fix-timeline-view
Context
2018-12-24
20:54
Revise and partially revert [d28f9e99a0] and [f174bfa157]: no need to remove the parents, TIMELINE_DISJOINT already does the magic. Related nodes now again have connecting rails for the /leaves, /brtimeline, and /tagtimeline web pages. check-in: 8f4b7e1f user: florian tags: fix-timeline-view
12:44
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. check-in: f174bfa1 user: florian tags: fix-timeline-view
12:11
Add timeline query parameters 'ng', 'brbg' and 'ubg' for the Leaves web page. check-in: 2ac6b507 user: florian tags: fix-timeline-view
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/branch.c.

611
612
613
614
615
616
617






618
619
620

621
622
623
624
625
626
627


628
629
630
631
632
633
634







635
636
637
638
  db_finalize(&q);
}

/*
** WEBPAGE: brtimeline
**
** Show a timeline of all branches






*/
void brtimeline_page(void){
  Stmt q;


  login_check_credentials();
  if( !g.perm.Read ){ login_needed(g.anon.Read); return; }

  style_header("Branches");
  style_submenu_element("List", "brlist");
  login_anonymous_available();


  @ <h2>The initial check-in for each branch:</h2>
  db_prepare(&q,
    "%s AND blob.rid IN (SELECT rid FROM tagxref"
    "                     WHERE tagtype>0 AND tagid=%d AND srcid!=0)"
    " ORDER BY event.mtime DESC",
    timeline_query_for_www(), TAG_BRANCH
  );







  www_print_timeline(&q, 0, 0, 0, 0, brtimeline_extra);
  db_finalize(&q);
  style_footer();
}







>
>
>
>
>
>



>







>
>







>
>
>
>
>
>
>
|



611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
  db_finalize(&q);
}

/*
** WEBPAGE: brtimeline
**
** Show a timeline of all branches
**
** Query parameters:
**
**     ng            No graph
**     brbg          Background color by branch name
**     ubg           Background color by user name
*/
void brtimeline_page(void){
  Stmt q;
  int tmFlags; /* Timeline display flags */

  login_check_credentials();
  if( !g.perm.Read ){ login_needed(g.anon.Read); return; }

  style_header("Branches");
  style_submenu_element("List", "brlist");
  login_anonymous_available();
  timeline_ss_submenu();
  cookie_render();
  @ <h2>The initial check-in for each branch:</h2>
  db_prepare(&q,
    "%s AND blob.rid IN (SELECT rid FROM tagxref"
    "                     WHERE tagtype>0 AND tagid=%d AND srcid!=0)"
    " ORDER BY event.mtime DESC",
    timeline_query_for_www(), TAG_BRANCH
  );
  /* With TIMELINE_LEAFONLY (which also implies TIMELINE_DISJOINT), the branch
  ** background colors are shown, and the timeline nodes are drawn, but the
  ** connecting rails are omitted. */
  tmFlags = TIMELINE_LEAFONLY | TIMELINE_NOSCROLL;
  if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH;
  if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
  if( P("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
  www_print_timeline(&q, tmFlags, 0, 0, 0, brtimeline_extra);
  db_finalize(&q);
  style_footer();
}

Changes to src/tag.c.

683
684
685
686
687
688
689






690
691
692

693
694
695
696
697
698
699


700
701
702
703
704
705
706
707
708







709
710
711
712
713
}

/*
** WEBPAGE: /tagtimeline
**
** Render a timeline with all check-ins that contain non-propagating
** symbolic tags.






*/
void tagtimeline_page(void){
  Stmt q;


  login_check_credentials();
  if( !g.perm.Read ){ login_needed(g.anon.Read); return; }

  style_header("Tagged Check-ins");
  style_submenu_element("List", "taglist");
  login_anonymous_available();


  @ <h2>Check-ins with non-propagating tags:</h2>
  db_prepare(&q,
    "%s AND blob.rid IN (SELECT rid FROM tagxref"
    "                     WHERE tagtype=1 AND srcid>0"
    "                       AND tagid IN (SELECT tagid FROM tag "
    "                                      WHERE tagname GLOB 'sym-*'))"
    " ORDER BY event.mtime DESC /*sort*/",
    timeline_query_for_www()
  );







  www_print_timeline(&q, 0, 0, 0, 0, 0);
  db_finalize(&q);
  @ <br />
  style_footer();
}







>
>
>
>
>
>



>







>
>









>
>
>
>
>
>
>
|




683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
}

/*
** WEBPAGE: /tagtimeline
**
** Render a timeline with all check-ins that contain non-propagating
** symbolic tags.
**
** Query parameters:
**
**     ng            No graph
**     brbg          Background color by branch name
**     ubg           Background color by user name
*/
void tagtimeline_page(void){
  Stmt q;
  int tmFlags; /* Timeline display flags */

  login_check_credentials();
  if( !g.perm.Read ){ login_needed(g.anon.Read); return; }

  style_header("Tagged Check-ins");
  style_submenu_element("List", "taglist");
  login_anonymous_available();
  timeline_ss_submenu();
  cookie_render();
  @ <h2>Check-ins with non-propagating tags:</h2>
  db_prepare(&q,
    "%s AND blob.rid IN (SELECT rid FROM tagxref"
    "                     WHERE tagtype=1 AND srcid>0"
    "                       AND tagid IN (SELECT tagid FROM tag "
    "                                      WHERE tagname GLOB 'sym-*'))"
    " ORDER BY event.mtime DESC /*sort*/",
    timeline_query_for_www()
  );
  /* With TIMELINE_LEAFONLY (which also implies TIMELINE_DISJOINT), the branch
  ** background colors are shown, and the timeline nodes are drawn, but the
  ** connecting rails are omitted. */
  tmFlags = TIMELINE_LEAFONLY | TIMELINE_NOSCROLL;
  if( P("ng")==0 ) tmFlags |= TIMELINE_GRAPH;
  if( P("brbg")!=0 ) tmFlags |= TIMELINE_BRCOLOR;
  if( P("ubg")!=0 ) tmFlags |= TIMELINE_UCOLOR;
  www_print_timeline(&q, tmFlags, 0, 0, 0, 0);
  db_finalize(&q);
  @ <br />
  style_footer();
}