Implement date and time formatting for polling information in Lamassu configuration: add formatDateTime method to enhance date display, update UI to utilize new formatting for last poll and last successful poll timestamps.
This commit is contained in:
parent
a4c5d11d99
commit
ac2b0f539c
2 changed files with 9 additions and 2 deletions
|
|
@ -133,6 +133,13 @@ window.app = Vue.createApp({
|
|||
return new Date(dateString).toLocaleDateString()
|
||||
},
|
||||
|
||||
formatDateTime(dateString) {
|
||||
if (!dateString) return ''
|
||||
const date = new Date(dateString)
|
||||
return date.toLocaleDateString() + ' ' + date.toLocaleTimeString('en-US', { hour12: false })
|
||||
},
|
||||
|
||||
|
||||
// Configuration Methods
|
||||
async getLamassuConfig() {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -346,8 +346,8 @@
|
|||
<q-badge v-else-if="lamassuConfig.test_connection_success === false" color="red">Failed</q-badge>
|
||||
<q-badge v-else color="grey">Not tested</q-badge>
|
||||
</p>
|
||||
<p><strong>Last Poll:</strong> ${ lamassuConfig.last_poll_time ? formatDate(lamassuConfig.last_poll_time) : 'Not yet run' }</p>
|
||||
<p><strong>Last Success:</strong> ${ lamassuConfig.last_successful_poll ? formatDate(lamassuConfig.last_successful_poll) : 'Never' }</p>
|
||||
<p><strong>Last Poll:</strong> ${ lamassuConfig.last_poll_time ? formatDateTime(lamassuConfig.last_poll_time) : 'Not yet run' }</p>
|
||||
<p><strong>Last Success:</strong> ${ lamassuConfig.last_successful_poll ? formatDateTime(lamassuConfig.last_successful_poll) : 'Never' }</p>
|
||||
</div>
|
||||
<div v-else>
|
||||
<p><strong>Status:</strong> <q-badge color="orange">Not configured</q-badge></p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue