mirror of
https://github.com/9technologygroup/patchmon.net.git
synced 2025-10-24 16:43:41 +00:00
Added Dashboard card to show Package trends over time
This commit is contained in:
@@ -347,8 +347,8 @@ router.get(
|
|||||||
try {
|
try {
|
||||||
const { hostId } = req.params;
|
const { hostId } = req.params;
|
||||||
|
|
||||||
const limit = parseInt(req.query.limit) || 10;
|
const limit = parseInt(req.query.limit, 10) || 10;
|
||||||
const offset = parseInt(req.query.offset) || 0;
|
const offset = parseInt(req.query.offset, 10) || 0;
|
||||||
|
|
||||||
const [host, totalHistoryCount] = await Promise.all([
|
const [host, totalHistoryCount] = await Promise.all([
|
||||||
prisma.hosts.findUnique({
|
prisma.hosts.findUnique({
|
||||||
@@ -483,7 +483,7 @@ router.get(
|
|||||||
async (req, res) => {
|
async (req, res) => {
|
||||||
try {
|
try {
|
||||||
const { days = 30, hostId } = req.query;
|
const { days = 30, hostId } = req.query;
|
||||||
const daysInt = parseInt(days);
|
const daysInt = parseInt(days, 10);
|
||||||
|
|
||||||
// Calculate date range
|
// Calculate date range
|
||||||
const endDate = new Date();
|
const endDate = new Date();
|
||||||
|
|||||||
Reference in New Issue
Block a user