Add progress bar to system status dashboard (#7131)
* Add progress bar to system status dashboard * Update dashboard_edit.php * Update app_languages.php * Update config.php
This commit is contained in:
parent
8c67b31441
commit
5e6d494796
|
|
@ -1,15 +1,17 @@
|
|||
<?php
|
||||
|
||||
$x++;
|
||||
$array['dashboard'][$x]['dashboard_uuid'] = 'ab48bcca-5cb1-40f0-b36f-ba1ad510ba5a';
|
||||
$array['dashboard'][$x]['dashboard_uuid'] = 'c388de65-85ad-4662-bbc3-a65fe9ddc319';
|
||||
$array['dashboard'][$x]['dashboard_name'] = 'System Status';
|
||||
$array['dashboard'][$x]['dashboard_path'] = 'system/system_status';
|
||||
$array['dashboard'][$x]['dashboard_order'] = '90';
|
||||
$array['dashboard'][$x]['dashboard_enabled'] = 'true';
|
||||
$array['dashboard'][$x]['dashboard_chart_type'] = 'progress_bar';
|
||||
$array['dashboard'][$x]['dashboard_number_text_color'] = '#fff';
|
||||
$array['dashboard'][$x]['dashboard_description'] = 'System information like Disk usage.';
|
||||
$y = 0;
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '5e1998c1-d3be-42f0-80ac-659e2e7934cb';
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'ab48bcca-5cb1-40f0-b36f-ba1ad510ba5a';
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'c388de65-85ad-4662-bbc3-a65fe9ddc319';
|
||||
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin';
|
||||
$x++;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
//add half doughnut chart
|
||||
echo " <div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_system_status_details').slideToggle('fast'); toggle_grid_row_end('".$dashboard_name."')\"").">\n";
|
||||
echo " <span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-disk_usage']."</a></span>\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 (!isset($dashboard_chart_type) || $dashboard_chart_type == "doughnut") {
|
||||
?>
|
||||
|
|
@ -97,6 +97,20 @@
|
|||
if ($dashboard_chart_type == "number") {
|
||||
echo " <span class='hud_stat'>".round($percent_disk_usage)."%</span>";
|
||||
}
|
||||
if ($dashboard_chart_type == "progress_bar") {
|
||||
echo " <span class='hud_title' style='text-align: left; font-size: 11px; line-height: 1.8; font-weight: unset; padding-left: 41px;'>".$text['label-disk_usage']."</span>\n";
|
||||
echo " <div class='progress_container' style='width: 80%; height: 15px; border-radius: 4px; 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: 4px; 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>\n";
|
||||
}
|
||||
/*
|
||||
if ($dashboard_chart_type == "progress_bar") {
|
||||
echo " <span class='hud_title' style='text-align: left; font-size: 11px; line-height: 1.8; font-weight: unset; padding-left: 41px;'>".$text['label-cpu_usage']."</span>\n";
|
||||
echo " <div class='progress_container' style='width: 80%; height: 15px; border-radius: 4px; background: ".($settings->get('theme', 'dashboard_cpu_usage_chart_sub_color') ?? '#d4d4d4').";'>\n";
|
||||
echo " <div class='progress_bar' style='width: ".$percent_cpu."%; height: 15px; border-radius: 4px; font-size: x-small; color: ".$row['dashboard_number_text_color']."; background: ".($settings->get('theme', 'dashboard_cpu_usage_chart_main_color') ?? '#03c04a').";'>".round($percent_cpu)."%</div>\n";
|
||||
echo " </div>\n";
|
||||
}
|
||||
*/
|
||||
echo " </div>\n";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -486,6 +486,33 @@ $text['label-doughnut']['zh-cn'] = "油炸圈饼";
|
|||
$text['label-doughnut']['ja-jp'] = "ドーナツ";
|
||||
$text['label-doughnut']['ko-kr'] = "도넛";
|
||||
|
||||
$text['label-progress_bar']['en-us'] = "Progress Bar";
|
||||
$text['label-progress_bar']['en-gb'] = "Progress Bar";
|
||||
$text['label-progress_bar']['ar-eg'] = "";
|
||||
$text['label-progress_bar']['de-at'] = "";
|
||||
$text['label-progress_bar']['de-ch'] = "";
|
||||
$text['label-progress_bar']['de-de'] = "";
|
||||
$text['label-progress_bar']['el-gr'] = "";
|
||||
$text['label-progress_bar']['es-cl'] = "";
|
||||
$text['label-progress_bar']['es-mx'] = "";
|
||||
$text['label-progress_bar']['fr-ca'] = "";
|
||||
$text['label-progress_bar']['fr-fr'] = "";
|
||||
$text['label-progress_bar']['he-il'] = "";
|
||||
$text['label-progress_bar']['it-it'] = "";
|
||||
$text['label-progress_bar']['ka-ge'] = "";
|
||||
$text['label-progress_bar']['nl-nl'] = "";
|
||||
$text['label-progress_bar']['pl-pl'] = "";
|
||||
$text['label-progress_bar']['pt-br'] = "";
|
||||
$text['label-progress_bar']['pt-pt'] = "";
|
||||
$text['label-progress_bar']['ro-ro'] = "";
|
||||
$text['label-progress_bar']['ru-ru'] = "";
|
||||
$text['label-progress_bar']['sv-se'] = "";
|
||||
$text['label-progress_bar']['uk-ua'] = "";
|
||||
$text['label-progress_bar']['tr-tr'] = "";
|
||||
$text['label-progress_bar']['zh-cn'] = "";
|
||||
$text['label-progress_bar']['ja-jp'] = "";
|
||||
$text['label-progress_bar']['ko-kr'] = "";
|
||||
|
||||
$text['label-dashboard_label_enabled']['en-us'] = "Label Enabled";
|
||||
$text['label-dashboard_label_enabled']['en-gb'] = "Label Enabled";
|
||||
$text['label-dashboard_label_enabled']['ar-eg'] = "تم تمكين العلامة";
|
||||
|
|
@ -1694,4 +1721,31 @@ $text['button-swap']['zh-cn'] = "交换值";
|
|||
$text['button-swap']['ja-jp'] = "スワップ値";
|
||||
$text['button-swap']['ko-kr'] = "가치 교환";
|
||||
|
||||
?>
|
||||
$text['label-system_status']['en-us'] = "System Status";
|
||||
$text['label-system_status']['en-gb'] = "System Status";
|
||||
$text['label-system_status']['ar-eg'] = "حالة النظام";
|
||||
$text['label-system_status']['de-at'] = "System Status";
|
||||
$text['label-system_status']['de-ch'] = "System Status";
|
||||
$text['label-system_status']['de-de'] = "System Status";
|
||||
$text['label-system_status']['el-gr'] = "Κατάσταση συστήματος";
|
||||
$text['label-system_status']['es-cl'] = "Estado del Sistema";
|
||||
$text['label-system_status']['es-mx'] = "Estado del Sistema";
|
||||
$text['label-system_status']['fr-ca'] = "État du Système";
|
||||
$text['label-system_status']['fr-fr'] = "État du Système";
|
||||
$text['label-system_status']['he-il'] = "מצב מערכת";
|
||||
$text['label-system_status']['it-it'] = "Stato Sistema";
|
||||
$text['label-system_status']['ka-ge'] = "სისტემის სტატუსი";
|
||||
$text['label-system_status']['nl-nl'] = "Systeem Status";
|
||||
$text['label-system_status']['pl-pl'] = "Stan systemu";
|
||||
$text['label-system_status']['pt-br'] = "Status do sistema";
|
||||
$text['label-system_status']['pt-pt'] = "Status do Sistema";
|
||||
$text['label-system_status']['ro-ro'] = "Starea sistemului";
|
||||
$text['label-system_status']['ru-ru'] = "Статус Системы";
|
||||
$text['label-system_status']['sv-se'] = "System Status";
|
||||
$text['label-system_status']['uk-ua'] = "Стан системи ";
|
||||
$text['label-system_status']['tr-tr'] = "Sistem durumu";
|
||||
$text['label-system_status']['zh-cn'] = "系统状况";
|
||||
$text['label-system_status']['ja-jp'] = "システムステータス";
|
||||
$text['label-system_status']['ko-kr'] = "시스템 상태";
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -802,6 +802,7 @@
|
|||
$dashboard_path == "xml_cdr/recent_calls" ||
|
||||
$dashboard_path == "system/system_status" ||
|
||||
$dashboard_path == "system/system_cpu_status" ||
|
||||
$dashboard_path == "system/system_disk_usage" ||
|
||||
$dashboard_path == "system/system_counts" ||
|
||||
$dashboard_path == "switch/switch_status" ||
|
||||
$dashboard_path == "domain_limits/domain_limits" ||
|
||||
|
|
@ -818,6 +819,9 @@
|
|||
echo " <select name='dashboard_chart_type' class='formfld'>\n";
|
||||
echo " <option value='doughnut'>".$text['label-doughnut']."</option>\n";
|
||||
echo " <option value='number' ".(!empty($dashboard_chart_type) && $dashboard_chart_type == "number" ? "selected='selected'" : null).">".$text['label-number']."</option>\n";
|
||||
if ($dashboard_path == "system/system_status") {
|
||||
echo " <option value='progress_bar' ".(!empty($dashboard_chart_type) && $dashboard_chart_type == "progress_bar" ? "selected='selected'" : null).">".$text['label-progress_bar']."</option>\n";
|
||||
}
|
||||
echo " </select>\n";
|
||||
echo "<br />\n";
|
||||
echo $text['description-dashboard_chart_type']."\n";
|
||||
|
|
|
|||
Loading…
Reference in New Issue