mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Add ability to create multiple dashboards (#7483)
* Add ability to create multiple dashboards * Create dashboard_widget_list.php * Create dashboard_widget_edit.php * Update dashboard_edit.php * Update dashboard_config_json.php * Update dashboard.php * Update app_languages.php * Update app_defaults.php * Update app_config.php * Update dashboard.php * Create config.php * Update content.php * Update icon.php * Update parent.php * Update template.php * Update config.php * Update config.php * Update domains.php * Update config.php * Update active_calls.php * Update config.php * Update config.php * Update config.php * Update config.php * Update call_forward.php * Update config.php * Update config.php * Update config.php * Update config.php * Update config.php * Update domain_limits.php * Update caller_id.php * Update config.php * Update config.php * Update config.php * Update config.php * Update config.php * Update registrations.php * Update ring_group_forward.php * Update config.php * Update config.php * Update switch_status.php * Update config.php * Update system_counts.php * Update system_cpu_status.php * Update system_disk_usage.php * Update system_services.php * Update system_status.php * Update config.php * Update config.php * Update voicemails.php * Update config.php * Update missed_calls.php * Update recent_calls.php * Update dashboard_widget_edit.php * Update app_languages.php * Update dashboard_widget_edit.php * Update index.php * Update parent.php
This commit is contained in:
@@ -120,10 +120,10 @@
|
||||
<?php
|
||||
|
||||
//show the results
|
||||
echo " <div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_system_status_details').slideToggle('fast');\"").">\n";
|
||||
echo " <div class='hud_content' ".($widget_details_state == "disabled" ?: "onclick=\"$('#hud_system_status_details').slideToggle('fast');\"").">\n";
|
||||
echo " <span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-system_status']."</a></span>\n";
|
||||
|
||||
if ($dashboard_chart_type == "doughnut") {
|
||||
if ($widget_chart_type == "doughnut") {
|
||||
?>
|
||||
<div class='hud_chart' style='width: 175px;'><canvas id='system_status_chart'></canvas></div>
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
ctx.font = chart_text_size + ' ' + chart_text_font;
|
||||
ctx.textBaseline = 'middle';
|
||||
ctx.textAlign = 'center';
|
||||
ctx.fillStyle = '<?php echo $dashboard_number_text_color; ?>';
|
||||
ctx.fillStyle = '<?php echo $widget_number_text_color; ?>';
|
||||
ctx.fillText(options.text + '%', width / 2, top + (height / 2) + 35);
|
||||
ctx.save();
|
||||
}
|
||||
@@ -178,33 +178,33 @@
|
||||
<?php
|
||||
}
|
||||
|
||||
if ($dashboard_chart_type == "number") {
|
||||
if ($widget_chart_type == "number") {
|
||||
echo " <span class='hud_stat'>".round($percent_disk_usage)."%</span>";
|
||||
}
|
||||
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "progress_bar") {
|
||||
if (!isset($widget_chart_type) || $widget_chart_type == "progress_bar") {
|
||||
//cpu usage
|
||||
if ($dashboard_row_span > 1) {
|
||||
if ($widget_row_span > 1) {
|
||||
echo " <span class='hud_title cpu_usage' style='text-align: left; font-size: 11px; line-height: 1.8; font-weight: unset; padding-left: 10%;'>".$text['label-processor_usage']."</span>\n";
|
||||
echo " <div class='progress_container' style='width: 80%; height: 15px; overflow: hidden; border-radius: 10px; background: ".($settings->get('theme', 'dashboard_cpu_usage_chart_sub_color') ?? '#d4d4d4').";'>\n";
|
||||
echo " <div id='cpu_status_progress_bar' class='progress_bar' style='width: ".($percent_cpu > 100 ? 100 : $percent_cpu)."%; height: 15px; border-radius: 10px; font-size: x-small; color: ".$row['dashboard_number_text_color']."; background: ".($settings->get('theme', 'dashboard_cpu_usage_chart_main_color') ?? '#03c04a')."; transition: 1.5s;'>".($percent_cpu > 100 ? 100 : round($percent_cpu))."%</div>\n";
|
||||
echo " <div id='cpu_status_progress_bar' class='progress_bar' style='width: ".($percent_cpu > 100 ? 100 : $percent_cpu)."%; height: 15px; border-radius: 10px; font-size: x-small; color: ".$row['widget_number_text_color']."; background: ".($settings->get('theme', 'dashboard_cpu_usage_chart_main_color') ?? '#03c04a')."; transition: 1.5s;'>".($percent_cpu > 100 ? 100 : round($percent_cpu))."%</div>\n";
|
||||
echo " </div>\n";
|
||||
echo " <div style='width: 100%; height: 15px'> </div>\n";
|
||||
}
|
||||
|
||||
//disk usage
|
||||
if ($dashboard_row_span >= 1) {
|
||||
if ($widget_row_span >= 1) {
|
||||
echo " <span class='hud_title' style='text-align: left; font-size: 11px; line-height: 1.8; font-weight: unset; padding-left: 10%;'>".$text['label-disk_usage']."</span>\n";
|
||||
echo " <div class='progress_container' style='width: 80%; height: 15px; overflow: hidden; border-radius: 10px; background: ".($settings->get('theme', 'dashboard_disk_usage_chart_sub_color') ?? '#d4d4d4').";'>\n";
|
||||
echo " <div class='progress_bar' style='width: ".$percent_disk_usage."%; height: 15px; border-radius: 10px; font-size: x-small; color: ".$row['dashboard_number_text_color']."; background: ".($settings->get('theme', 'dashboard_disk_usage_chart_main_color') ?? '#03c04a').";'>".round($percent_disk_usage)."%</div>\n";
|
||||
echo " <div class='progress_bar' style='width: ".$percent_disk_usage."%; height: 15px; border-radius: 10px; font-size: x-small; color: ".$row['widget_number_text_color']."; background: ".($settings->get('theme', 'dashboard_disk_usage_chart_main_color') ?? '#03c04a').";'>".round($percent_disk_usage)."%</div>\n";
|
||||
echo " </div>\n";
|
||||
echo " <div style='width: 100%; height: 15px'> </div>\n";
|
||||
}
|
||||
|
||||
//percent memory
|
||||
if ($dashboard_row_span > 1) {
|
||||
if ($widget_row_span > 1) {
|
||||
echo " <span class='hud_title' style='text-align: left; font-size: 11px; line-height: 1.8; font-weight: unset; padding-left: 10%;'>".$text['label-memory_usage']."</span>\n";
|
||||
echo " <div class='progress_container' style='width: 80%; height: 15px; overflow: hidden; border-radius: 10px; background: ".($settings->get('theme', 'dashboard_disk_usage_chart_sub_color') ?? '#d4d4d4').";'>\n";
|
||||
echo " <div class='progress_bar' style='width: ".round((int)$memory_details['memory_percent'])."%; height: 15px; border-radius: 10px; font-size: x-small; color: ".$row['dashboard_number_text_color']."; background: ".($settings->get('theme', 'dashboard_disk_usage_chart_main_color') ?? '#03c04a').";'>".round((int)$memory_details['memory_percent'])."%</div>\n";
|
||||
echo " <div class='progress_bar' style='width: ".round((int)$memory_details['memory_percent'])."%; height: 15px; border-radius: 10px; font-size: x-small; color: ".$row['widget_number_text_color']."; background: ".($settings->get('theme', 'dashboard_disk_usage_chart_main_color') ?? '#03c04a').";'>".round((int)$memory_details['memory_percent'])."%</div>\n";
|
||||
echo " </div>\n";
|
||||
}
|
||||
}
|
||||
@@ -212,7 +212,7 @@
|
||||
echo " </div>\n";
|
||||
|
||||
|
||||
if ($dashboard_details_state != 'disabled') {
|
||||
if ($widget_details_state != 'disabled') {
|
||||
echo "<div class='hud_details hud_box' id='hud_system_status_details'>";
|
||||
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
|
||||
echo "<tr>\n";
|
||||
|
||||
Reference in New Issue
Block a user