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.
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.
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.
* 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.
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.
- 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