Skip to content

Commit

Permalink
Format dates on graph updates
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed Nov 25, 2024
1 parent e7c4cf4 commit 795d3ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion resources/views/livewire/queues.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class="h-14"
return
}
chart.data.labels = this.labels(queues[config.queue])
chart.data.labels = this.labels(queues[config.queue]).map(formatDate)
chart.options.scales.y.max = this.highest(queues[config.queue])
chart.data.datasets[0].data = this.scale(queues[config.queue].queued)
chart.data.datasets[1].data = this.scale(queues[config.queue].processing)
Expand Down
4 changes: 2 additions & 2 deletions resources/views/livewire/servers.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class="w-full min-w-[5rem] max-w-xs h-9 relative"
return
}
chart.data.labels = Object.keys(servers[config.slug].cpu)
chart.data.labels = Object.keys(servers[config.slug].cpu).map(formatDate)
chart.data.datasets[0].data = Object.values(servers[config.slug].cpu)
chart.update()
})
Expand Down Expand Up @@ -275,7 +275,7 @@ class="w-full min-w-[5rem] max-w-xs h-9 relative"
return
}
chart.data.labels = Object.keys(servers[config.slug].memory)
chart.data.labels = Object.keys(servers[config.slug].memory).map(formatDate)
chart.data.datasets[0].data = Object.values(servers[config.slug].memory)
chart.update()
})
Expand Down

0 comments on commit 795d3ec

Please sign in to comment.