diff --git a/internal/webapi/admin.go b/internal/webapi/admin.go index e98a093f..0dd06a78 100644 --- a/internal/webapi/admin.go +++ b/internal/webapi/admin.go @@ -1,4 +1,4 @@ -// Copyright (c) 2020-2023 The Decred developers +// Copyright (c) 2020-2024 The Decred developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. @@ -155,12 +155,20 @@ func (w *WebAPI) adminPage(c *gin.Context) { missed.SortByPurchaseHeight() + xpubs, err := w.db.AllXPubs() + if err != nil { + w.log.Errorf("db.AllXPubs error: %v", err) + c.String(http.StatusInternalServerError, "Error getting xpubs from db") + return + } + c.HTML(http.StatusOK, "admin.html", gin.H{ "WebApiCache": cacheData, "WebApiCfg": w.cfg, "WalletStatus": w.walletStatus(c), "DcrdStatus": w.dcrdStatus(c), "MissedTickets": missed, + "XPubs": xpubs, }) } @@ -231,6 +239,13 @@ func (w *WebAPI) ticketSearch(c *gin.Context) { missed.SortByPurchaseHeight() + xpubs, err := w.db.AllXPubs() + if err != nil { + w.log.Errorf("db.AllXPubs error: %v", err) + c.String(http.StatusInternalServerError, "Error getting xpubs from db") + return + } + c.HTML(http.StatusOK, "admin.html", gin.H{ "SearchResult": searchResult{ Hash: hash, @@ -246,6 +261,7 @@ func (w *WebAPI) ticketSearch(c *gin.Context) { "WalletStatus": w.walletStatus(c), "DcrdStatus": w.dcrdStatus(c), "MissedTickets": missed, + "XPubs": xpubs, }) } diff --git a/internal/webapi/public/css/vspd.css b/internal/webapi/public/css/vspd.css index a62cf295..1e1471ca 100644 --- a/internal/webapi/public/css/vspd.css +++ b/internal/webapi/public/css/vspd.css @@ -246,7 +246,9 @@ table.missed-tickets td { .tabset > input:nth-child(4):focus ~ ul li:nth-child(4) label, .tabset > input:nth-child(4):hover ~ ul li:nth-child(4) label, .tabset > input:nth-child(5):focus ~ ul li:nth-child(5) label, -.tabset > input:nth-child(5):hover ~ ul li:nth-child(5) label { +.tabset > input:nth-child(5):hover ~ ul li:nth-child(5) label, +.tabset > input:nth-child(6):focus ~ ul li:nth-child(6) label, +.tabset > input:nth-child(6):hover ~ ul li:nth-child(6) label { cursor: pointer; color: #091440; } @@ -255,7 +257,8 @@ table.missed-tickets td { .tabset > input:nth-child(2):checked ~ ul li:nth-child(2) label, .tabset > input:nth-child(3):checked ~ ul li:nth-child(3) label, .tabset > input:nth-child(4):checked ~ ul li:nth-child(4) label, -.tabset > input:nth-child(5):checked ~ ul li:nth-child(5) label { +.tabset > input:nth-child(5):checked ~ ul li:nth-child(5) label, +.tabset > input:nth-child(6):checked ~ ul li:nth-child(6) label { border-bottom: 5px solid #2ed8a3; color: #091440; cursor: default; @@ -275,6 +278,7 @@ table.missed-tickets td { .tabset > input:nth-child(2):checked ~ div > section:nth-child(2), .tabset > input:nth-child(3):checked ~ div > section:nth-child(3), .tabset > input:nth-child(4):checked ~ div > section:nth-child(4), -.tabset > input:nth-child(5):checked ~ div > section:nth-child(5) { +.tabset > input:nth-child(5):checked ~ div > section:nth-child(5), +.tabset > input:nth-child(6):checked ~ div > section:nth-child(6) { position:static; } diff --git a/internal/webapi/templates/admin.html b/internal/webapi/templates/admin.html index df41781a..29824858 100644 --- a/internal/webapi/templates/admin.html +++ b/internal/webapi/templates/admin.html @@ -51,12 +51,19 @@
ID | +Key | +Last Address Index | +Retired | + + + {{ range . }} +
---|---|---|---|
{{ .ID }} | +{{ .Key }} | +{{ .LastUsedIdx }} | +{{ dateTime .Retired }} | +
Database size: {{ .WebApiCache.DatabaseSize }}
Download Backup