Make mempool.space instance configurable, change ntp server to global pool
This commit is contained in:
parent
18faece660
commit
cc28df888b
5 changed files with 34 additions and 5 deletions
|
@ -171,6 +171,12 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label for="mempoolInstance" class="col-sm-6 col-form-label">Mempool Instance</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" name="mempoolInstance" id="mempoolInstance" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class=" col-sm-6">
|
||||
<div class="form-check form-switch">
|
||||
|
|
|
@ -10,7 +10,10 @@ getBcStatus = () => {
|
|||
.then(jsonData => {
|
||||
var source = document.getElementById("entry-template").innerHTML;
|
||||
var template = Handlebars.compile(source);
|
||||
var context = { currentScreen: jsonData.currentScreen, rendered: jsonData.rendered, data: jsonData.data, screens: screens, ledStatus: jsonData.ledStatus ? jsonData.ledStatus.map((t) => (t).toString(16)) : [] };
|
||||
|
||||
var context = { timerRunning: jsonData.timerRunning, currentScreen: jsonData.currentScreen, rendered: jsonData.rendered, data: jsonData.data, screens: screens, ledStatus: jsonData.ledStatus ? jsonData.ledStatus.map((t) => (t).toString(16)) : [] };
|
||||
|
||||
|
||||
document.getElementById('output').innerHTML = template(context);
|
||||
})
|
||||
.catch(err => {
|
||||
|
@ -54,7 +57,7 @@ fetch('/api/settings', {
|
|||
document.getElementById('ledBrightness').value = jsonData.ledBrightness;
|
||||
document.getElementById('fullRefreshMin').value = jsonData.fullRefreshMin;
|
||||
document.getElementById('wpTimeout').value = jsonData.wpTimeout;
|
||||
|
||||
document.getElementById('mempoolInstance').value = jsonData.mempoolInstance;
|
||||
|
||||
if (jsonData.gitRev)
|
||||
document.getElementById('gitRev').innerHTML = "Version: " + jsonData.gitRev;
|
||||
|
@ -143,4 +146,12 @@ changeScreen = (id) => {
|
|||
.catch(err => {
|
||||
//error block
|
||||
});
|
||||
}
|
||||
|
||||
toggleTimer = (currentStatus) => {
|
||||
if (currentStatus) {
|
||||
fetch('/api/action/pause');
|
||||
} else {
|
||||
fetch('/api/action/timer_restart');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue