mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Update chart.js v3 to v4 (#6529)
* Update chart.min.js * Update missed_calls.php * Update recent_calls.php * Update system_counts.php * Update system_cpu_status.php * Update system_status.php * Update domain_limits.php * Update voicemails.php
This commit is contained in:
@@ -290,52 +290,46 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var system_counts_chart_context = document.getElementById('system_counts_chart').getContext('2d');
|
||||
|
||||
const system_counts_chart_data = {
|
||||
labels: ['<?php echo $text['label-active']; ?>: <?php echo $domain_active; ?>', '<?php echo $text['label-inactive']; ?>: <?php echo $domain_inactive; ?>'],
|
||||
datasets: [{
|
||||
data: ['<?php echo $domain_active; ?>', '<?php echo $domain_inactive; ?>'],
|
||||
backgroundColor: [
|
||||
'<?php echo $_SESSION['dashboard']['system_counts_chart_main_background_color']['text']; ?>',
|
||||
'<?php echo $_SESSION['dashboard']['system_counts_chart_sub_background_color']['text']; ?>'
|
||||
],
|
||||
borderColor: '<?php echo $_SESSION['dashboard']['system_counts_chart_border_color']['text']; ?>',
|
||||
borderWidth: '<?php echo $_SESSION['dashboard']['system_counts_chart_border_width']['text']; ?>',
|
||||
cutout: chart_cutout
|
||||
}]
|
||||
};
|
||||
|
||||
const system_counts_chart_config = {
|
||||
type: 'doughnut',
|
||||
data: system_counts_chart_data,
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
chart_counter: {
|
||||
chart_text: '<?php echo $domain_total; ?>'
|
||||
},
|
||||
legend: {
|
||||
position: 'right',
|
||||
reverse: true,
|
||||
labels: {
|
||||
usePointStyle: true,
|
||||
pointStyle: 'rect'
|
||||
}
|
||||
},
|
||||
title: {
|
||||
display: true,
|
||||
text: '<?php echo $text['label-system_counts']; ?>'
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [chart_counter],
|
||||
};
|
||||
|
||||
const system_counts_chart = new Chart(
|
||||
system_counts_chart_context,
|
||||
system_counts_chart_config
|
||||
document.getElementById('system_counts_chart').getContext('2d'),
|
||||
{
|
||||
type: 'doughnut',
|
||||
data: {
|
||||
labels: ['<?php echo $text['label-active']; ?>: <?php echo $domain_active; ?>', '<?php echo $text['label-inactive']; ?>: <?php echo $domain_inactive; ?>'],
|
||||
datasets: [{
|
||||
data: ['<?php echo $domain_active; ?>', '<?php echo $domain_inactive; ?>'],
|
||||
backgroundColor: [
|
||||
'<?php echo $_SESSION['dashboard']['system_counts_chart_main_background_color']['text']; ?>',
|
||||
'<?php echo $_SESSION['dashboard']['system_counts_chart_sub_background_color']['text']; ?>'
|
||||
],
|
||||
borderColor: '<?php echo $_SESSION['dashboard']['system_counts_chart_border_color']['text']; ?>',
|
||||
borderWidth: '<?php echo $_SESSION['dashboard']['system_counts_chart_border_width']['text']; ?>',
|
||||
cutout: chart_cutout
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false,
|
||||
plugins: {
|
||||
chart_counter: {
|
||||
chart_text: '<?php echo $domain_total; ?>'
|
||||
},
|
||||
legend: {
|
||||
position: 'right',
|
||||
reverse: true,
|
||||
labels: {
|
||||
usePointStyle: true,
|
||||
pointStyle: 'rect'
|
||||
}
|
||||
},
|
||||
title: {
|
||||
display: true,
|
||||
text: '<?php echo $text['label-system_counts']; ?>'
|
||||
}
|
||||
}
|
||||
},
|
||||
plugins: [chart_counter],
|
||||
}
|
||||
);
|
||||
</script>
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user