22 Commits

Author SHA1 Message Date
jholdstock
4dc2cc4d8d webapi: Use raw whitespace to format JSON.
No need to manually construct HTML in this formatting func, it can simply deal with whitespace and then use <pre> tags to display.

Add some tests to validate behaviour.
2023-06-27 14:52:24 +01:00
jholdstock
78cf99bc2c webapi: Use input type "search" for ticket hash.
The "search" input type is functionally the same as "text" but has a nice extra property - most browsers will render it with a "Clear" button to wipe the current input.

Also disable spellchecking on this input.
2023-06-27 14:52:24 +01:00
jholdstock
6acc5be10c Add dcrd to VSP status.
This renames "Voting wallet status" to "VSP status" and it now includes the status of the local dcrd instance. This change impacts both the /admin page of the UI, and the response of the /admin/status API endpoint.
2021-11-16 14:33:39 +00:00
Jamie Holdstock
ab5ee2857f Vertical login form and improve error appearance. 2021-06-15 10:18:25 +08:00
Jamie Holdstock
2b7903f7d5 Add database and logout tabs to admin page.
Buttons to logout and download DB backup are now moved into new tabs. Also the database size is displayed in the database tab.
2021-06-15 10:18:25 +08:00
Jamie Holdstock
f4adcfeaf0 Add version to bootstrap.css filename. 2021-06-09 21:25:05 +08:00
Jamie Holdstock
9867f78385
Add network proportion to homepage and /vspinfo (and revoked proportion) (#264)
* Add network proportion to homepage and /vspinfo.

Proportion is calculated using the number of tickets  currently registered with the VSP, divided by the total size of the network ticket pool as reported by `getblockheader`.

The value will only ever be an estimate because:

- it's possible for a single ticket to be added to multiple VSPs.
- vspd does not distinguish between immature and live tickets, whereas `getblockheader` only reports live tickets.
- `getblockheader` is reporting the size of the ticket pool as of the previous block, not the current block.

* xaur suggestions

* Show missed ticket %, not just the raw number.
2021-06-08 08:47:07 -05:00
Jamie Holdstock
2cdc5a74b5 Split admin page into tabs.
Previously the voting wallet status and the ticket search were stacked on top of eachother, making the page very long and awkward to navigate. This introduces tabbed navigation which allows just one to be displayed at a time.
2021-06-01 07:17:54 +08:00
Jamie Holdstock
7edbd02d4e Use proper background color. 2021-06-01 07:17:54 +08:00
Jamie Holdstock
32c5c7a524 Indent JSON on admin screen. 2021-06-01 07:17:54 +08:00
Jamie Holdstock
851d3137e5 Improve voting wallet status aesthetics. 2021-06-01 07:17:54 +08:00
jholdstock
825a717ca7 Store records of vote choice changes 2020-09-17 16:05:07 +00:00
jholdstock
f2ae9a81ea Dont underline logo on hover 2020-08-31 17:18:30 +00:00
jholdstock
1c351d02ec Add voting wallet status to admin page 2020-07-09 21:01:20 +00:00
jholdstock
705ea51fc1 Remove quotes from generic font-family names 2020-06-20 12:51:18 +00:00
jholdstock
892e6c5716 Modernize login and admin pages 2020-06-18 20:18:17 +00:00
jholdstock
03a5ef4fd1 Modernize homepage 2020-06-18 20:18:17 +00:00
jholdstock
600cd7bf9b Use modern logo and colours. 2020-06-18 20:18:17 +00:00
jholdstock
2f7c46e5f8 Misc front end improvements.
- Use bootstrap to improve layout.
- Add warning banners for webserver debug mode and vspd closed.

Admin page:
- Replace listing of all tickets with form to search by ticket hash
2020-06-12 13:35:43 +00:00
Jamie Holdstock
67dece7041
Rename to vspd. (#75) 2020-05-27 15:59:30 +01:00
Jamie Holdstock
d5eb18f557
Add support email and pubkey to GUI (#74)
* Add support email to gui.

* Use Decred fonts

* Use Decred favicon

* Add pubkey to homepage. Use properly typed struct for template data.

* go mod tidy
2020-05-27 15:36:11 +01:00
Jamie Holdstock
04311000e8
Move web assets under webapi package. (#26) 2020-05-18 15:20:13 +01:00