Fossil SCM
On the Unknown Artifacts section of the /artifact_stats page, provide links to the RCVFROM table entry for each unknown artifact.
Commit
9f9ed245f963572a21d1469d7d5f5d16432ac9f9d3ae42ac377b8d4c4bae5875
Parent
230832004a18d6d…
1 file changed
+4
-4
+4
-4
| --- src/stat.c | ||
| +++ src/stat.c | ||
| @@ -697,11 +697,11 @@ | ||
| 697 | 697 | |
| 698 | 698 | if( db_exists("SELECT 1 FROM artstat WHERE atype='unknown'") ){ |
| 699 | 699 | @ <h2>Unknown Artifacts</h2> |
| 700 | 700 | db_prepare(&q, |
| 701 | 701 | "SELECT artstat.id, blob.uuid, user.login," |
| 702 | - " datetime(rcvfrom.mtime), rcvfrom.ipaddr" | |
| 702 | + " datetime(rcvfrom.mtime), rcvfrom.rcvid" | |
| 703 | 703 | " FROM artstat JOIN blob ON artstat.id=blob.rid" |
| 704 | 704 | " LEFT JOIN rcvfrom USING(rcvid)" |
| 705 | 705 | " LEFT JOIN user USING(uid)" |
| 706 | 706 | " WHERE atype='unknown'" |
| 707 | 707 | ); |
| @@ -710,25 +710,25 @@ | ||
| 710 | 710 | @ <thead><tr> |
| 711 | 711 | @ <th>RecordID</th> |
| 712 | 712 | @ <th>Hash</th> |
| 713 | 713 | @ <th>User</th> |
| 714 | 714 | @ <th>Date</th> |
| 715 | - @ <th>IP-Addr</th> | |
| 715 | + @ <th>RcvID</th> | |
| 716 | 716 | @ </tr></thead><tbody> |
| 717 | 717 | while( db_step(&q)==SQLITE_ROW ){ |
| 718 | 718 | int rid = db_column_int(&q, 0); |
| 719 | 719 | const char *zHash = db_column_text(&q, 1); |
| 720 | 720 | const char *zUser = db_column_text(&q, 2); |
| 721 | 721 | const char *zDate = db_column_text(&q, 3); |
| 722 | - const char *zIpAddr = db_column_text(&q, 4); | |
| 722 | + int iRcvid = db_column_int(&q, 4); | |
| 723 | 723 | @ <tr><td>%d(rid)</td> |
| 724 | 724 | @ <td>%z(href("%R/info/%!S",zHash))%S(zHash)</a></td> |
| 725 | 725 | @ <td>%h(zUser)</td> |
| 726 | 726 | @ <td>%h(zDate)</td> |
| 727 | - @ <td>%h(zIpAddr)</td></tr> | |
| 727 | + @ <td>%z(href("%R/rcvfrom?rcvid=%d",iRcvid))%d(iRcvid)</a></td></tr> | |
| 728 | 728 | } |
| 729 | 729 | @ </tbody></table></div> |
| 730 | 730 | db_finalize(&q); |
| 731 | 731 | } |
| 732 | 732 | style_table_sorter(); |
| 733 | 733 | style_footer(); |
| 734 | 734 | } |
| 735 | 735 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -697,11 +697,11 @@ | |
| 697 | |
| 698 | if( db_exists("SELECT 1 FROM artstat WHERE atype='unknown'") ){ |
| 699 | @ <h2>Unknown Artifacts</h2> |
| 700 | db_prepare(&q, |
| 701 | "SELECT artstat.id, blob.uuid, user.login," |
| 702 | " datetime(rcvfrom.mtime), rcvfrom.ipaddr" |
| 703 | " FROM artstat JOIN blob ON artstat.id=blob.rid" |
| 704 | " LEFT JOIN rcvfrom USING(rcvid)" |
| 705 | " LEFT JOIN user USING(uid)" |
| 706 | " WHERE atype='unknown'" |
| 707 | ); |
| @@ -710,25 +710,25 @@ | |
| 710 | @ <thead><tr> |
| 711 | @ <th>RecordID</th> |
| 712 | @ <th>Hash</th> |
| 713 | @ <th>User</th> |
| 714 | @ <th>Date</th> |
| 715 | @ <th>IP-Addr</th> |
| 716 | @ </tr></thead><tbody> |
| 717 | while( db_step(&q)==SQLITE_ROW ){ |
| 718 | int rid = db_column_int(&q, 0); |
| 719 | const char *zHash = db_column_text(&q, 1); |
| 720 | const char *zUser = db_column_text(&q, 2); |
| 721 | const char *zDate = db_column_text(&q, 3); |
| 722 | const char *zIpAddr = db_column_text(&q, 4); |
| 723 | @ <tr><td>%d(rid)</td> |
| 724 | @ <td>%z(href("%R/info/%!S",zHash))%S(zHash)</a></td> |
| 725 | @ <td>%h(zUser)</td> |
| 726 | @ <td>%h(zDate)</td> |
| 727 | @ <td>%h(zIpAddr)</td></tr> |
| 728 | } |
| 729 | @ </tbody></table></div> |
| 730 | db_finalize(&q); |
| 731 | } |
| 732 | style_table_sorter(); |
| 733 | style_footer(); |
| 734 | } |
| 735 |
| --- src/stat.c | |
| +++ src/stat.c | |
| @@ -697,11 +697,11 @@ | |
| 697 | |
| 698 | if( db_exists("SELECT 1 FROM artstat WHERE atype='unknown'") ){ |
| 699 | @ <h2>Unknown Artifacts</h2> |
| 700 | db_prepare(&q, |
| 701 | "SELECT artstat.id, blob.uuid, user.login," |
| 702 | " datetime(rcvfrom.mtime), rcvfrom.rcvid" |
| 703 | " FROM artstat JOIN blob ON artstat.id=blob.rid" |
| 704 | " LEFT JOIN rcvfrom USING(rcvid)" |
| 705 | " LEFT JOIN user USING(uid)" |
| 706 | " WHERE atype='unknown'" |
| 707 | ); |
| @@ -710,25 +710,25 @@ | |
| 710 | @ <thead><tr> |
| 711 | @ <th>RecordID</th> |
| 712 | @ <th>Hash</th> |
| 713 | @ <th>User</th> |
| 714 | @ <th>Date</th> |
| 715 | @ <th>RcvID</th> |
| 716 | @ </tr></thead><tbody> |
| 717 | while( db_step(&q)==SQLITE_ROW ){ |
| 718 | int rid = db_column_int(&q, 0); |
| 719 | const char *zHash = db_column_text(&q, 1); |
| 720 | const char *zUser = db_column_text(&q, 2); |
| 721 | const char *zDate = db_column_text(&q, 3); |
| 722 | int iRcvid = db_column_int(&q, 4); |
| 723 | @ <tr><td>%d(rid)</td> |
| 724 | @ <td>%z(href("%R/info/%!S",zHash))%S(zHash)</a></td> |
| 725 | @ <td>%h(zUser)</td> |
| 726 | @ <td>%h(zDate)</td> |
| 727 | @ <td>%z(href("%R/rcvfrom?rcvid=%d",iRcvid))%d(iRcvid)</a></td></tr> |
| 728 | } |
| 729 | @ </tbody></table></div> |
| 730 | db_finalize(&q); |
| 731 | } |
| 732 | style_table_sorter(); |
| 733 | style_footer(); |
| 734 | } |
| 735 |