Fossil

Check-in [9f9ed245]
Login

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

Overview
Comment:On the Unknown Artifacts section of the /artifact_stats page, provide links to the RCVFROM table entry for each unknown artifact.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:9f9ed245f963572a21d1469d7d5f5d16432ac9f9d3ae42ac377b8d4c4bae5875
User & Date: drh 2017-12-10 00:56:41
Context
2017-12-10
02:30
Add the experimental /artifact_size_stats webpage. There are no links to this page, yet. check-in: 4439f15d user: drh tags: trunk
00:56
On the Unknown Artifacts section of the /artifact_stats page, provide links to the RCVFROM table entry for each unknown artifact. check-in: 9f9ed245 user: drh tags: trunk
00:51
Fix the sorttable.js module so that it works with more than one sortable table on the same screen. check-in: 23083200 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/stat.c.

   695    695     @ </tbody></table>
   696    696     db_finalize(&q);
   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       );
   708    708       @ <table class='sortable' border='1' \
   709    709       @ data-column-types='ntttt' data-init-sort='0'>
   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   }