Remove master index digest column from the web page

It isn't really necessary now we have the download links.

Signed-off-by: Graham <gpe@openrs2.org>
Graham 4 years ago
parent 98d25539b9
commit eae9a3e2f4
  1. 14
      archive/src/main/kotlin/org/openrs2/archive/cache/CacheExporter.kt
  2. 2
      archive/src/main/resources/org/openrs2/archive/templates/caches/index.html

@ -19,7 +19,6 @@ public class CacheExporter @Inject constructor(
) { ) {
public data class Cache( public data class Cache(
val id: Long, val id: Long,
val whirlpool: ByteArray,
val game: String, val game: String,
val build: Int?, val build: Int?,
val timestamp: Instant?, val timestamp: Instant?,
@ -39,7 +38,7 @@ public class CacheExporter @Inject constructor(
return database.execute { connection -> return database.execute { connection ->
connection.prepareStatement( connection.prepareStatement(
""" """
SELECT m.id, c.whirlpool, g.name, m.build, m.timestamp, m.name SELECT m.id, g.name, m.build, m.timestamp, m.name
FROM master_indexes m FROM master_indexes m
JOIN games g ON g.id = m.game_id JOIN games g ON g.id = m.game_id
JOIN containers c ON c.id = m.container_id JOIN containers c ON c.id = m.container_id
@ -51,18 +50,17 @@ public class CacheExporter @Inject constructor(
while (rows.next()) { while (rows.next()) {
val id = rows.getLong(1) val id = rows.getLong(1)
val whirlpool = rows.getBytes(2) val game = rows.getString(2)
val game = rows.getString(3)
var build: Int? = rows.getInt(4) var build: Int? = rows.getInt(3)
if (rows.wasNull()) { if (rows.wasNull()) {
build = null build = null
} }
val timestamp = rows.getTimestamp(5)?.toInstant() val timestamp = rows.getTimestamp(4)?.toInstant()
val name = rows.getString(6) val name = rows.getString(5)
caches += Cache(id, whirlpool, game, build, timestamp, name) caches += Cache(id, game, build, timestamp, name)
} }
caches caches

@ -4,7 +4,6 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th>Master index digest</th>
<th>Game</th> <th>Game</th>
<th>Build</th> <th>Build</th>
<th>Timestamp</th> <th>Timestamp</th>
@ -15,7 +14,6 @@
<tbody> <tbody>
<!--/*@thymesVar id="caches" type="java.util.List<org.openrs2.archive.cache.CacheExporter.Cache>"*/--> <!--/*@thymesVar id="caches" type="java.util.List<org.openrs2.archive.cache.CacheExporter.Cache>"*/-->
<tr th:each="cache : ${caches}"> <tr th:each="cache : ${caches}">
<td th:text="${@io.netty.buffer.ByteBufUtil@hexDump(cache.whirlpool).substring(0, 8)}">00000000</td>
<td th:text="${cache.game}">runescape</td> <td th:text="${cache.game}">runescape</td>
<td th:text="${cache.build}">550</td> <td th:text="${cache.build}">550</td>
<td th:text="${#temporals.formatISO(cache.timestamp)}"></td> <td th:text="${#temporals.formatISO(cache.timestamp)}"></td>

Loading…
Cancel
Save