Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Add the "unclustered" query parameter to /bloblist. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
9859eb0308cf63cfab44a95fde71d43a |
| User & Date: | drh 2024-12-20 19:07:09.673 |
Context
|
2024-12-20
| ||
| 19:44 | Edit pass on the www/ssl-server.md to cover some of the details brought up [forum:/forumpost/94c36cf8d2 | on the forum]. This also adds fragment IDs for section heads and improves the discussion generally. check-in: f374a46337 user: wyoung tags: trunk | |
| 19:07 | Add the "unclustered" query parameter to /bloblist. check-in: 9859eb0308 user: drh tags: trunk | |
| 18:55 | Add the "recent" query parameter to the /bloblist page, to show the 250 most recently acquired artifacts. check-in: 64ab7d7f28 user: drh tags: trunk | |
Changes
Changes to src/name.c.
| ︙ | ︙ | |||
1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 |
int s = atoi(PD("s","0"));
int n = atoi(PD("n","5000"));
int mx = db_int(0, "SELECT max(rid) FROM blob");
int privOnly = PB("priv");
int phantomOnly = PB("phan");
int hashClr = PB("hclr");
int bRecent = PB("recent");
char *zRange;
char *zSha1Bg;
char *zSha3Bg;
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
cgi_check_for_malice();
style_header("List Of Artifacts");
style_submenu_element("250 Largest", "bigbloblist");
if( bRecent==0 || n!=250 ){
style_submenu_element("Recent","bloblist?n=250&recent");
}
if( g.perm.Admin ){
style_submenu_element("Artifact Log", "rcvfromlist");
}
if( !phantomOnly ){
style_submenu_element("Phantoms", "bloblist?phan");
}
style_submenu_element("Clusters","clusterlist");
if( g.perm.Private || g.perm.Admin ){
if( !privOnly ){
style_submenu_element("Private", "bloblist?priv");
}
}else{
privOnly = 0;
}
if( g.perm.Write ){
style_submenu_element("Artifact Stats", "artifact_stats");
}
| > > > > | > > > > > > > | | 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 |
int s = atoi(PD("s","0"));
int n = atoi(PD("n","5000"));
int mx = db_int(0, "SELECT max(rid) FROM blob");
int privOnly = PB("priv");
int phantomOnly = PB("phan");
int hashClr = PB("hclr");
int bRecent = PB("recent");
int bUnclst = PB("unclustered");
char *zRange;
char *zSha1Bg;
char *zSha3Bg;
login_check_credentials();
if( !g.perm.Read ){ login_needed(g.anon.Read); return; }
cgi_check_for_malice();
style_header("List Of Artifacts");
style_submenu_element("250 Largest", "bigbloblist");
if( bRecent==0 || n!=250 ){
style_submenu_element("Recent","bloblist?n=250&recent");
}
if( bUnclst==0 ){
style_submenu_element("Unclustered","bloblist?unclustered");
}
if( g.perm.Admin ){
style_submenu_element("Artifact Log", "rcvfromlist");
}
if( !phantomOnly ){
style_submenu_element("Phantoms", "bloblist?phan");
}
style_submenu_element("Clusters","clusterlist");
if( g.perm.Private || g.perm.Admin ){
if( !privOnly ){
style_submenu_element("Private", "bloblist?priv");
}
}else{
privOnly = 0;
}
if( g.perm.Write ){
style_submenu_element("Artifact Stats", "artifact_stats");
}
if( !privOnly && !phantomOnly && mx>n && P("s")==0 && !bRecent && !bUnclst ){
int i;
@ <p>Select a range of artifacts to view:</p>
@ <ul>
for(i=1; i<=mx; i+=n){
@ <li> %z(href("%R/bloblist?s=%d&n=%d",i,n))
@ %d(i)..%d(i+n-1<mx?i+n-1:mx)</a>
}
@ <li> %z(href("%R/bloblist?n=250&recent"))250 most recent</a>
@ <li> %z(href("%R/bloblist?unclustered"))All unclustered</a>
@ </ul>
style_finish_page();
return;
}
if( phantomOnly || privOnly || mx>n ){
style_submenu_element("Index", "bloblist");
}
if( privOnly ){
@ <h2>Private Artifacts</h2>
zRange = mprintf("IN private");
}else if( phantomOnly ){
@ <h2>Phantom Artifacts</h2>
zRange = mprintf("IN phantom");
}else if( bUnclst ){
@ <h2>Unclustered Artifacts</h2>
zRange = mprintf("IN unclustered");
}else if( bRecent ){
@ <h2>%d(n) Most Recent Artifacts</h2>
zRange = mprintf(">=(SELECT rid FROM blob"
" ORDER BY rid DESC LIMIT 1 OFFSET %d)",n);
}else{
zRange = mprintf("BETWEEN %d AND %d", s, s+n-1);
}
describe_artifacts(zRange);
fossil_free(zRange);
db_prepare(&q,
"SELECT rid, uuid, summary, isPrivate, type='phantom', rcvid, ref"
" FROM description ORDER BY rid %s",
((bRecent||bUnclst)?"DESC":"ASC")/*safe-for-%s*/
);
if( skin_detail_boolean("white-foreground") ){
zSha1Bg = "#714417";
zSha3Bg = "#177117";
}else{
zSha1Bg = "#ebffb0";
zSha3Bg = "#b0ffb0";
|
| ︙ | ︙ |