mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-10 04:47:53 +00:00
Show last update time for status
This commit is contained in:
parent
688f82cbdf
commit
5cbc95e229
1 changed files with 10 additions and 0 deletions
|
|
@ -229,10 +229,20 @@ function update_cluster_status() {
|
|||
xhr.onload = function() {
|
||||
status_formatted = JSON.stringify(JSON.parse(xhr.responseText), null, 4)
|
||||
status_node.innerHTML = status_formatted
|
||||
time_node.innerHTML = new Date().today() + " " + new Date().timeNow()
|
||||
}
|
||||
xhr.send(null)
|
||||
}
|
||||
|
||||
Date.prototype.today = function () {
|
||||
return this.getFullYear() +"/"+ (((this.getMonth()+1) < 10)?"0":"") + (this.getMonth()+1) +"/"+ ((this.getDate() < 10)?"0":"") + this.getDate();
|
||||
}
|
||||
|
||||
Date.prototype.timeNow = function () {
|
||||
return ((this.getHours() < 10)?"0":"") + this.getHours() +":"+ ((this.getMinutes() < 10)?"0":"") + this.getMinutes() +":"+ ((this.getSeconds() < 10)?"0":"") + this.getSeconds();
|
||||
}
|
||||
|
||||
|
||||
const input = document.getElementById('query')
|
||||
const output = document.getElementById('outputs')
|
||||
const button = document.getElementById('query-btn')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue