CP dashboard UI updates

This commit is contained in:
Pinga 2025-01-18 20:44:52 +02:00
parent 2df8b0e336
commit 4a5ff50eed

View file

@ -290,10 +290,10 @@
fill: { fill: {
opacity: 1, opacity: 1,
}, },
series: [{ series: counts.some(count => count > 0) ? [{
name: "Domain Registrations", name: "Domain Registrations",
data: counts data: counts
}], }] : [],
tooltip: { tooltip: {
theme: 'dark' theme: 'dark'
}, },
@ -327,7 +327,16 @@
} }
}, },
}, },
labels: dates, noData: {
text: "No data available",
align: 'center',
verticalAlign: 'middle',
style: {
color: '#888',
fontSize: '14px',
fontFamily: 'inherit'
}
},
colors: [tabler.getColor("primary")], colors: [tabler.getColor("primary")],
legend: { legend: {
show: false, show: false,
@ -349,7 +358,7 @@
fill: { fill: {
opacity: 1, opacity: 1,
}, },
series: series, series: series.some(val => val > 0) ? series : [],
labels: labels, labels: labels,
tooltip: { tooltip: {
theme: 'dark' theme: 'dark'
@ -357,6 +366,16 @@
grid: { grid: {
strokeDashArray: 4, strokeDashArray: 4,
}, },
noData: {
text: "No data to display",
align: 'center',
verticalAlign: 'middle',
style: {
color: '#888',
fontSize: '14px',
fontFamily: 'inherit'
}
},
colors: [tabler.getColor("primary"), tabler.getColor("primary", 0.8), tabler.getColor("primary", 0.6), tabler.getColor("gray-300")], colors: [tabler.getColor("primary"), tabler.getColor("primary", 0.8), tabler.getColor("primary", 0.6), tabler.getColor("gray-300")],
legend: { legend: {
show: true, show: true,
@ -402,13 +421,10 @@
fill: { fill: {
opacity: 1, opacity: 1,
}, },
series: [{ series: (answeredData.some(val => val > 0) || unansweredData.some(val => val > 0)) ? [
name: "Answered", { name: "Answered", data: answeredData },
data: answeredData { name: "Pending", data: unansweredData }
},{ ] : [],
name: "Pending",
data: unansweredData
}],
tooltip: { tooltip: {
theme: 'dark' theme: 'dark'
}, },
@ -442,6 +458,16 @@
} }
}, },
}, },
noData: {
text: "No support ticket data available",
align: 'center',
verticalAlign: 'middle',
style: {
color: '#888',
fontSize: '14px',
fontFamily: 'inherit'
}
},
colors: [tabler.getColor("primary"), tabler.getColor("red")], colors: [tabler.getColor("primary"), tabler.getColor("red")],
legend: { legend: {
show: false, show: false,