Dashboard - Add chart type setting (#6951)

* Dashboard - Add chart type setting
This commit is contained in:
Alex 2024-04-18 15:57:45 -07:00 committed by GitHub
parent 07ff90f97c
commit 808e2cbe66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
16 changed files with 765 additions and 611 deletions

View File

@ -102,10 +102,12 @@
//begin widget
echo "<div class='hud_box'>\n";
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick=\"$('#hud_call_forward_details').slideToggle('fast');\">\n";
echo " <span class='hud_title' style='color: ".$dashboard_heading_text_color.";'>".$text['header-call_forward']."</span>\n";
//doughnut chart
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick=\"$('#hud_call_forward_details').slideToggle('fast');\">\n";
echo " <div style='width: 275px; height: 175px;'><canvas id='call_forward_chart'></canvas></div>\n";
echo "</div>\n";
if ($dashboard_chart_type == "doughnut") {
echo "<div style='width: 275px; height: 143px;'><canvas id='call_forward_chart'></canvas></div>\n";
echo "<script>\n";
echo " const call_forward_chart = new Chart(\n";
@ -170,10 +172,6 @@
echo " pointStyle: 'rect',\n";
echo " color: '".$dashboard_heading_text_color."'\n";
echo " }\n";
echo " },\n";
echo " title: {\n";
echo " text: '".$text['header-call_forward']."',\n";
echo " color: '".$dashboard_heading_text_color."'\n";
echo " }\n";
echo " }\n";
echo " },\n";
@ -192,6 +190,11 @@
echo " }\n";
echo " );\n";
echo "</script>\n";
}
if ($dashboard_chart_type == "none") {
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color.";'>".$stats['call_forward']."</span>";
}
echo " </div>\n";
//details
echo "<div class='hud_details hud_box' id='hud_call_forward_details'>";

View File

@ -110,10 +110,12 @@
$hud_stat_title = $text['label-destinations'];
}
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick=\"$('#hud_domain_limits_details').slideToggle('fast');\">\n";
echo " <span class='hud_title' style='color: ".$dashboard_heading_text_color.";'>".$text['label-domain_limits']."</span>\n";
//doughnut chart
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick=\"$('#hud_domain_limits_details').slideToggle('fast');\">\n";
echo " <div style='width: 275px; height: 175px;'><canvas id='domain_limits_chart'></canvas></div>\n";
echo "</div>\n";
if ($dashboard_chart_type == "doughnut") {
echo "<div style='width: 275px; height: 143px;'><canvas id='domain_limits_chart'></canvas></div>\n";
echo "<script>\n";
echo " const domain_limits_chart = new Chart(\n";
@ -152,10 +154,6 @@
echo " usePointStyle: true,\n";
echo " pointStyle: 'rect'\n";
echo " }\n";
echo " },\n";
echo " title: {\n";
echo " text: '".$text['label-domain_limits']."',\n";
echo " color: '".$dashboard_heading_text_color."'\n";
echo " }\n";
echo " }\n";
echo " },\n";
@ -174,6 +172,11 @@
echo " }\n";
echo " );\n";
echo "</script>\n";
}
if ($dashboard_chart_type == "none") {
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color.";'>".$hud_stat_used."</span>";
}
echo " </div>\n";
//details
echo "<div class='hud_details hud_box' id='hud_domain_limits_details'>";

View File

@ -173,10 +173,12 @@
//caller id
echo "<div class='hud_box'>\n";
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick=\"$('#hud_caller_id_details').slideToggle('fast');\">\n";
echo " <span class='hud_title' style='color: ".$dashboard_heading_text_color.";'>".$text['label-caller_id_number']."</span>\n";
//doughnut chart
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick=\"$('#hud_caller_id_details').slideToggle('fast');\">\n";
echo " <div style='width: 275px; height: 175px;'><canvas id='caller_id_chart'></canvas></div>\n";
echo "</div>\n";
if ($dashboard_chart_type == "doughnut") {
echo "<div style='width: 275px; height: 143px;'><canvas id='caller_id_chart'></canvas></div>\n";
echo "<script>\n";
echo " const caller_id_chart = new Chart(\n";
@ -216,10 +218,6 @@
echo " pointStyle: 'rect',\n";
echo " color: '".$dashboard_heading_text_color."'\n";
echo " }\n";
echo " },\n";
echo " title: {\n";
echo " text: '".$text['label-caller_id_number']."',\n";
echo " color: '".$dashboard_heading_text_color."'\n";
echo " }\n";
echo " }\n";
echo " },\n";
@ -238,6 +236,11 @@
echo " }\n";
echo " );\n";
echo "</script>\n";
}
if ($dashboard_chart_type == "none") {
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color.";'>".$stats['undefined']."</span>";
}
echo " </div>\n";
//details
echo "<form id='form_list_caller_id' method='post' action='".PROJECT_PATH."/app/extensions/resources/dashboard/caller_id.php'>\n";

View File

@ -153,10 +153,13 @@
//ring group forward
echo "<div class='hud_box'>\n";
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick=\"$('#hud_ring_group_forward_details').slideToggle('fast');\">\n";
echo " <span class='hud_title' style='color: ".$dashboard_heading_text_color.";'>".$text['header-ring-group-forward']."</span>\n";
//doughnut chart
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick=\"$('#hud_ring_group_forward_details').slideToggle('fast');\">\n";
echo " <div style='width: 275px; height: 175px;'><canvas id='ring_group_forward_chart'></canvas></div>\n";
echo "</div>\n";
if ($dashboard_chart_type == "doughnut") {
echo " <div style='width: 275px; height: 143px;'><canvas id='ring_group_forward_chart'></canvas></div>\n";
echo "<script>\n";
echo " const ring_group_forward_chart = new Chart(\n";
@ -218,6 +221,11 @@
echo " }\n";
echo " );\n";
echo "</script>\n";
}
if ($dashboard_chart_type == "none") {
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color.";'>".$stats['forwarding']."</span>";
}
echo " </div>\n";
//details
if (permission_exists('ring_group_forward')) {

View File

@ -76,11 +76,13 @@
$registrations = $registration->count();
}
//add doughnut chart
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick=\"$('#hud_switch_status_details').slideToggle('fast');\">\n";
echo " <span class='hud_title' style='color: ".$dashboard_heading_text_color.";'>".$text['label-switch_status']."</span>\n";
if ($dashboard_chart_type == "doughnut") {
//add doughnut chart
?>
<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick="$('#hud_switch_status_details').slideToggle('fast');">
<canvas id='switch_status_chart' width='175px' height='175px'></canvas>
</div>
<div style='height: 143px;'><canvas id='switch_status_chart'></canvas></div>
<script>
const switch_status_chart = new Chart(
@ -100,10 +102,6 @@
plugins: {
chart_number: {
text: '<?php echo $registrations; ?>'
},
title: {
text: '<?php echo $text['label-switch_status']; ?>',
color: '<?php echo $dashboard_heading_text_color; ?>'
}
}
},
@ -123,6 +121,11 @@
);
</script>
<?php
}
if ($dashboard_chart_type == "none") {
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color.";'>".$registrations."</span>";
}
echo " </div>\n";
//show the content
echo "<div class='hud_details hud_box' id='hud_switch_status_details'>";

View File

@ -294,11 +294,14 @@
echo "<div class='hud_box'>\n";
if ($show_stat) {
echo "<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick=\"$('#hud_system_counts_details').slideToggle('fast');\">\n";
echo " <span class='hud_title' style='color: ".$dashboard_heading_text_color.";' onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-system_counts']."</span>\n";
if ($dashboard_chart_type == "doughnut") {
//add doughnut chart
?>
<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick="$('#hud_system_counts_details').slideToggle('fast');">
<div style='width: 250px; height: 175px;'><canvas id='system_counts_chart'></canvas></div>
</div>
<div style='height: 143px;'><canvas id='system_counts_chart'></canvas></div>
<script>
const system_counts_chart = new Chart(
@ -331,10 +334,6 @@
pointStyle: 'rect',
color: '<?php echo $dashboard_heading_text_color; ?>'
}
},
title: {
text: '<?php echo $text['label-system_counts']; ?>',
color: '<?php echo $dashboard_heading_text_color; ?>'
}
}
},
@ -355,6 +354,11 @@
</script>
<?php
}
if ($dashboard_chart_type == "none") {
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color.";'>".$domain_total."</span>";
}
echo " </div>\n";
}
echo "<div class='hud_details hud_box' id='hud_system_counts_details'>";
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";

View File

@ -51,10 +51,12 @@
}
//add half doughnut chart
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick=\"$('#hud_system_cpu_status_details').slideToggle('fast');\">\n";
echo " <span class='hud_title' style='color: ".$dashboard_heading_text_color.";' onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-cpu_usage']."</span>\n";
if ($dashboard_chart_type == "doughnut") {
?>
<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick="$('#hud_system_cpu_status_details').slideToggle('fast');">
<div><canvas id='system_cpu_status_chart' width='175px' height='175px' ></canvas></div>
</div>
<div style='width: 175px; height: 143px;'><canvas id='system_cpu_status_chart'></canvas></div>
<script>
const system_cpu_status_chart = new Chart(
@ -85,15 +87,11 @@
rotation: 270,
plugins: {
chart_number_2: {
text: '<?php echo $percent_cpu; ?>'
text: '<?php echo round($percent_cpu); ?>'
},
tooltip: {
yAlign: 'bottom',
displayColors: false,
},
title: {
text: '<?php echo $text['label-cpu_usage']; ?>',
color: '<?php echo $dashboard_heading_text_color; ?>'
}
}
},
@ -112,8 +110,12 @@
}
);
</script>
<?php
<?php
}
if ($dashboard_chart_type == "none") {
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color.";'>".round($percent_cpu)."%</span>";
}
echo " </div>\n";
//show the content
echo "<div class='hud_details hud_box' id='hud_system_cpu_status_details'>";

View File

@ -35,11 +35,14 @@
}
if (!empty($percent_disk_usage)) {
//add half doughnut chart
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick=\"$('#hud_system_status_details').slideToggle('fast');\">\n";
echo " <span class='hud_title' style='color: ".$dashboard_heading_text_color.";' onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-disk_usage']."</span>\n";
if ($dashboard_chart_type == "doughnut") {
?>
<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick="$('#hud_system_status_details').slideToggle('fast');">
<div><canvas id='system_status_chart' width='175px' height='175px'></canvas></div>
</div>
<div style='width: 175px; height: 143px;'><canvas id='system_status_chart'></canvas></div>
<script>
const system_status_chart = new Chart(
@ -70,11 +73,7 @@
rotation: 270,
plugins: {
chart_number_2: {
text: '<?php echo $percent_disk_usage; ?>'
},
title: {
text: '<?php echo $text['label-disk_usage']; ?>',
color: '<?php echo $dashboard_heading_text_color; ?>'
text: '<?php echo round($percent_disk_usage); ?>'
}
}
},
@ -95,6 +94,11 @@
</script>
<?php
}
if ($dashboard_chart_type == "none") {
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color.";'>".round($percent_disk_usage)."%</span>";
}
echo " </div>\n";
}
}
echo "<div class='hud_details hud_box' id='hud_system_status_details'>";

View File

@ -90,11 +90,13 @@
//missed calls
echo "<div class='hud_box'>\n";
//add doughnut chart
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick=\"$('#hud_missed_calls_details').slideToggle('fast');\">\n";
echo " <span class='hud_title' style='color: ".$dashboard_heading_text_color.";' onclick=\"document.location.href='".PROJECT_PATH."/app/xml_cdr/xml_cdr.php?call_result=missed'\">".$text['label-missed_calls']."</span>";
if ($dashboard_chart_type == "doughnut") {
//add doughnut chart
?>
<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick="$('#hud_missed_calls_details').slideToggle('fast');">
<canvas id='missed_calls_chart' width='175px' height='175px'></canvas>
</div>
<div style='height: 143px;'><canvas id='missed_calls_chart'></canvas></div>
<script>
const missed_calls_chart = new Chart(
@ -116,10 +118,6 @@
plugins: {
chart_number: {
text: '<?php echo $num_rows; ?>'
},
title: {
text: '<?php echo $text['label-missed_calls']; ?>',
color: '<?php echo $dashboard_heading_text_color; ?>'
}
}
},
@ -139,6 +137,11 @@
);
</script>
<?php
}
if ($dashboard_chart_type == "none") {
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color.";' onclick=\"$('#hud_missed_calls_details').slideToggle('fast');\">".$num_rows."</span>";
}
echo " </div>\n";
echo "<div class='hud_details hud_box' id='hud_missed_calls_details'>";
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";

View File

@ -86,12 +86,13 @@
//recent calls
echo "<div class='hud_box'>\n";
//add doughnut chart
?>
<div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick="$('#hud_recent_calls_details').slideToggle('fast');">
<canvas id='recent_calls_chart' width='175px' height='175px'></canvas>
</div>
echo " <div style='display: flex; flex-wrap: wrap; justify-content: center; padding-bottom: 20px;' onclick=\"$('#hud_recent_calls_details').slideToggle('fast');\">\n";
echo " <span class='hud_title' style='color: ".$dashboard_heading_text_color.";' onclick=\"document.location.href='".PROJECT_PATH."/app/xml_cdr/xml_cdr.php';\">".$text['label-recent_calls']."</span>\n";
if ($dashboard_chart_type == "doughnut") {
//add doughnut chart
?>
<div style='height: 143px;'><canvas id='recent_calls_chart'></canvas></div>
<script>
const recent_calls_chart = new Chart(
document.getElementById('recent_calls_chart').getContext('2d'),
@ -112,10 +113,6 @@
plugins: {
chart_number: {
text: '<?php echo $num_rows; ?>'
},
title: {
text: '<?php echo $text['label-recent_calls']; ?>',
color: '<?php echo $dashboard_heading_text_color; ?>'
}
}
},
@ -135,6 +132,11 @@
);
</script>
<?php
}
if ($dashboard_chart_type == "none") {
echo " <span class='hud_stat' style='color: ".$dashboard_number_text_color.";' onclick=\"$('#hud_recent_calls_details').slideToggle('fast');\">".$num_rows."</span>";
}
echo " </div>\n";
echo "<div class='hud_details hud_box' id='hud_recent_calls_details'>";
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";

View File

@ -72,6 +72,11 @@
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard path.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_chart_type';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the chart type.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_heading_text_color';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';

View File

@ -260,6 +260,84 @@ $text['description-dashboard_groups']['zh-cn'] = "添加有权访问此小部件
$text['description-dashboard_groups']['ja-jp'] = "このウィジェットに対する権限を持つグループを追加します。";
$text['description-dashboard_groups']['ko-kr'] = "이 위젯에 대한 권한이 있는 그룹을 추가하십시오.";
$text['label-dashboard_chart_type']['en-us'] = "Chart Type";
$text['label-dashboard_chart_type']['en-gb'] = "Chart Type";
$text['label-dashboard_chart_type']['ar-eg'] = "نوع التخطيط";
$text['label-dashboard_chart_type']['de-at'] = "Diagramm Typ";
$text['label-dashboard_chart_type']['de-ch'] = "Diagramm Typ";
$text['label-dashboard_chart_type']['de-de'] = "Diagramm Typ";
$text['label-dashboard_chart_type']['el-gr'] = "Τύπος γραφήματος";
$text['label-dashboard_chart_type']['es-cl'] = "Tipo de gráfico";
$text['label-dashboard_chart_type']['es-mx'] = "Tipo de gráfico";
$text['label-dashboard_chart_type']['fr-ca'] = "Type de graphiqueType de graphique";
$text['label-dashboard_chart_type']['fr-fr'] = "Type de graphique";
$text['label-dashboard_chart_type']['he-il'] = "סוג תרשים";
$text['label-dashboard_chart_type']['it-it'] = "Tipo di grafico";
$text['label-dashboard_chart_type']['nl-nl'] = "Grafiektype";
$text['label-dashboard_chart_type']['pl-pl'] = "Typ wykresu";
$text['label-dashboard_chart_type']['pt-br'] = "Tipo de Gráfico";
$text['label-dashboard_chart_type']['pt-pt'] = "Tipo de Gráfico";
$text['label-dashboard_chart_type']['ro-ro'] = "Tip diagramă";
$text['label-dashboard_chart_type']['ru-ru'] = "Тип диаграммы";
$text['label-dashboard_chart_type']['sv-se'] = "Diagramtyp";
$text['label-dashboard_chart_type']['uk-ua'] = "Тип діаграми";
$text['label-dashboard_chart_type']['tr-tr'] = "Grafik tipi";
$text['label-dashboard_chart_type']['zh-cn'] = "图表类型";
$text['label-dashboard_chart_type']['ja-jp'] = "グラフの種類";
$text['label-dashboard_chart_type']['ko-kr'] = "차트 종류";
$text['description-dashboard_chart_type']['en-us'] = "Enter the dashboard widget chart type.";
$text['description-dashboard_chart_type']['en-gb'] = "Enter the dashboard widget chart type.";
$text['description-dashboard_chart_type']['ar-eg'] = "أدخل نوع مخطط عنصر واجهة المستخدم للوحة المعلومات.";
$text['description-dashboard_chart_type']['de-at'] = "Geben Sie den Diagrammtyp des Dashboard-Widgets ein.";
$text['description-dashboard_chart_type']['de-ch'] = "Geben Sie den Diagrammtyp des Dashboard-Widgets ein.";
$text['description-dashboard_chart_type']['de-de'] = "Geben Sie den Diagrammtyp des Dashboard-Widgets ein.";
$text['description-dashboard_chart_type']['el-gr'] = "Εισαγάγετε τον τύπο γραφήματος του γραφικού στοιχείου πίνακα εργαλείων.";
$text['description-dashboard_chart_type']['es-cl'] = "Ingrese el tipo de gráfico del widget del panel.";
$text['description-dashboard_chart_type']['es-mx'] = "Ingrese el tipo de gráfico del widget del panel.";
$text['description-dashboard_chart_type']['fr-ca'] = "Entrez le type de graphique du widget de tableau de bord.";
$text['description-dashboard_chart_type']['fr-fr'] = "Entrez le type de graphique du widget de tableau de bord.";
$text['description-dashboard_chart_type']['he-il'] = "הזן את סוג תרשים הווידג'ט של לוח המחוונים.";
$text['description-dashboard_chart_type']['it-it'] = "Inserisci il tipo di grafico del widget del dashboard.";
$text['description-dashboard_chart_type']['nl-nl'] = "Voer het diagramtype van de dashboardwidget in.";
$text['description-dashboard_chart_type']['pl-pl'] = "Wprowadź typ wykresu widżetu panelu kontrolnego.";
$text['description-dashboard_chart_type']['pt-br'] = "Insira o tipo de gráfico do widget do painel.";
$text['description-dashboard_chart_type']['pt-pt'] = "Insira o tipo de gráfico do widget do painel.";
$text['description-dashboard_chart_type']['ro-ro'] = "Introduceți tipul de diagramă widget din tabloul de bord.";
$text['description-dashboard_chart_type']['ru-ru'] = "Введите тип диаграммы виджета информационной панели.";
$text['description-dashboard_chart_type']['sv-se'] = "Ange diagramtypen för instrumentpanelens widget.";
$text['description-dashboard_chart_type']['uk-ua'] = "Введіть тип діаграми віджета інформаційної панелі.";
$text['description-dashboard_chart_type']['tr-tr'] = "Kontrol paneli widget'ı grafik türünü girin.";
$text['description-dashboard_chart_type']['zh-cn'] = "输入仪表板小部件图表类型。";
$text['description-dashboard_chart_type']['ja-jp'] = "ダッシュボード ウィジェットのグラフ タイプを入力します。";
$text['description-dashboard_chart_type']['ko-kr'] = "대시보드 위젯 차트 유형을 입력합니다.";
$text['label-doughnut']['en-us'] = "Doughnut";
$text['label-doughnut']['en-gb'] = "Doughnut";
$text['label-doughnut']['ar-eg'] = "كعكة محلاة";
$text['label-doughnut']['de-at'] = "Krapfen";
$text['label-doughnut']['de-ch'] = "Krapfen";
$text['label-doughnut']['de-de'] = "Krapfen";
$text['label-doughnut']['el-gr'] = "Ντόνατ";
$text['label-doughnut']['es-cl'] = "Rosquilla";
$text['label-doughnut']['es-mx'] = "Rosquilla";
$text['label-doughnut']['fr-ca'] = "Donut";
$text['label-doughnut']['fr-fr'] = "Donut";
$text['label-doughnut']['he-il'] = "סופגניה";
$text['label-doughnut']['it-it'] = "Ciambella";
$text['label-doughnut']['nl-nl'] = "Donut";
$text['label-doughnut']['pl-pl'] = "Pączek";
$text['label-doughnut']['pt-br'] = "Rosquinha";
$text['label-doughnut']['pt-pt'] = "Rosquinha";
$text['label-doughnut']['ro-ro'] = "Gogoașă";
$text['label-doughnut']['ru-ru'] = "Пончик";
$text['label-doughnut']['sv-se'] = "Munk";
$text['label-doughnut']['uk-ua'] = "Пончик";
$text['label-doughnut']['tr-tr'] = "Tatlı çörek";
$text['label-doughnut']['zh-cn'] = "油炸圈饼";
$text['label-doughnut']['ja-jp'] = "ドーナツ";
$text['label-doughnut']['ko-kr'] = "도넛";
$text['label-dashboard_heading_text_color']['en-us'] = "Heading Text Color";
$text['label-dashboard_heading_text_color']['en-gb'] = "Heading Text Color";
$text['label-dashboard_heading_text_color']['ar-eg'] = "لون نص العنوان";

View File

@ -65,6 +65,7 @@
$dashboard_name = $_POST["dashboard_name"] ?? '';
$dashboard_path = $_POST["dashboard_path"] ?? '';
$dashboard_groups = $_POST["dashboard_groups"] ?? '';
$dashboard_chart_type = $_POST["dashboard_chart_type"] ?? '';
$dashboard_heading_text_color = $_POST["dashboard_heading_text_color"] ?? '';
$dashboard_number_text_color = $_POST["dashboard_number_text_color"] ?? '';
$dashboard_column_span = $_POST["dashboard_column_span"] ?? '';
@ -165,6 +166,7 @@
$array['dashboard'][0]['dashboard_uuid'] = $dashboard_uuid;
$array['dashboard'][0]['dashboard_name'] = $dashboard_name;
$array['dashboard'][0]['dashboard_path'] = $dashboard_path;
$array['dashboard'][0]['dashboard_chart_type'] = $dashboard_chart_type;
$array['dashboard'][0]['dashboard_heading_text_color'] = $dashboard_heading_text_color;
$array['dashboard'][0]['dashboard_number_text_color'] = $dashboard_number_text_color;
$array['dashboard'][0]['dashboard_column_span'] = $dashboard_column_span;
@ -212,6 +214,7 @@
$sql .= " dashboard_uuid, ";
$sql .= " dashboard_name, ";
$sql .= " dashboard_path, ";
$sql .= " dashboard_chart_type, ";
$sql .= " dashboard_heading_text_color, ";
$sql .= " dashboard_number_text_color, ";
$sql .= " dashboard_column_span, ";
@ -227,6 +230,7 @@
if (is_array($row) && @sizeof($row) != 0) {
$dashboard_name = $row["dashboard_name"];
$dashboard_path = $row["dashboard_path"];
$dashboard_chart_type = $row["dashboard_chart_type"];
$dashboard_heading_text_color = $row["dashboard_heading_text_color"];
$dashboard_number_text_color = $row["dashboard_number_text_color"];
$dashboard_column_span = $row["dashboard_column_span"];
@ -404,6 +408,30 @@
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo $text['label-dashboard_chart_type']."\n";
echo "</td>\n";
echo "<td class='vtable' style='position: relative;' align='left'>\n";
echo " <select name='dashboard_chart_type' class='formfld'>\n";
if ($dashboard_chart_type == "doughnut") {
echo " <option value='doughnut' selected='selected'>".$text['label-doughnut']."</option>\n";
}
else {
echo " <option value='doughnut'>".$text['label-doughnut']."</option>\n";
}
if ($dashboard_chart_type == "none") {
echo " <option value='none' selected='selected'>".$text['label-none']."</option>\n";
}
else {
echo " <option value='none'>".$text['label-none']."</option>\n";
}
echo " </select>\n";
echo "<br />\n";
echo $text['description-dashboard_chart_type']."\n";
echo "</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td class='vncell' valign='top' align='left' nowrap='nowrap'>\n";
echo $text['label-dashboard_heading_text_color']."\n";

View File

@ -72,6 +72,7 @@
$sql .= "dashboard_uuid, \n";
$sql .= "dashboard_name, \n";
$sql .= "dashboard_path, \n";
$sql .= "dashboard_chart_type, \n";
$sql .= "dashboard_heading_text_color, \n";
$sql .= "dashboard_number_text_color, \n";
$sql .= "dashboard_column_span, \n";
@ -149,7 +150,6 @@
echo " Chart.defaults.responsive = true;\n";
echo " Chart.defaults.maintainAspectRatio = false;\n";
echo " Chart.defaults.plugins.legend.display = false;\n";
echo " Chart.defaults.plugins.title.display = true;\n";
echo " Chart.overrides.doughnut.cutout = '75%';\n";
echo "</script>\n";
@ -303,6 +303,7 @@
foreach($dashboard as $row) {
$dashboard_name = strtolower($row['dashboard_name']);
$dashboard_name = str_replace(" ", "_", $dashboard_name);
$dashboard_chart_type = $row['dashboard_chart_type'] ?? 'doughnut';
$dashboard_heading_text_color = $row['dashboard_heading_text_color'] ?? $settings->get('theme', 'dashboard_heading_text_color');
$dashboard_number_text_color = $row['dashboard_heading_text_color'] ?? $settings->get('theme', 'dashboard_number_text_color');
echo "<div class='widget' id='".$dashboard_name."' draggable='false'>\n";

View File

@ -899,8 +899,8 @@
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "dashboard_heading_text_color";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#444444";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#ffffff";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the color (and opacity) of the Dashboard block heading text.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "b09126da-c68b-473c-83f8-8e9a7523ce37";
@ -963,8 +963,8 @@
$apps[$x]['default_settings'][$y]['default_setting_category'] = "theme";
$apps[$x]['default_settings'][$y]['default_setting_subcategory'] = "dashboard_number_text_color";
$apps[$x]['default_settings'][$y]['default_setting_name'] = "text";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#444444";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "true";
$apps[$x]['default_settings'][$y]['default_setting_value'] = "#ffffff";
$apps[$x]['default_settings'][$y]['default_setting_enabled'] = "false";
$apps[$x]['default_settings'][$y]['default_setting_description'] = "Set the color (and opacity) of the Dashboard block number.";
$y++;
$apps[$x]['default_settings'][$y]['default_setting_uuid'] = "1d829bf8-6b4e-44e8-8cb5-962f8b91d64e";

View File

@ -213,20 +213,20 @@ $dashboard_detail_background_color_center = $_SESSION['theme']['dashboard_detail
$dashboard_border_radius = $_SESSION['theme']['dashboard_border_radius']['text'] ?? '5px';
$dashboard_border_color = $_SESSION['theme']['dashboard_border_color']['text'] ?? '#dbe0ea';
$dashboard_border_color_hover = $_SESSION['theme']['dashboard_border_color_hover']['text'] ?? '#cbd3e1';
$dashboard_heading_text_color = $_SESSION['theme']['dashboard_heading_text_color']['text'] ?? '#fff';
$dashboard_heading_text_color_hover = $_SESSION['theme']['dashboard_heading_text_color_hover']['text'] ?? '#fff';
$dashboard_heading_text_size = $_SESSION['theme']['dashboard_heading_text_size']['text'] ?? '12pt';
$dashboard_heading_text_font = $_SESSION['theme']['dashboard_heading_text_font']['text'] ?? 'Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif';
$dashboard_heading_text_shadow_color = $_SESSION['theme']['dashboard_heading_text_shadow_color']['text'] ?? '#000';
$dashboard_heading_background_color = $_SESSION['theme']['dashboard_heading_background_color']['text'] ?? '#8e96a5';
$dashboard_heading_text_color = $_SESSION['theme']['dashboard_heading_text_color']['text'] ?? '#444';
$dashboard_heading_text_color_hover = $_SESSION['theme']['dashboard_heading_text_color_hover']['text'] ?? '';
$dashboard_heading_text_size = $_SESSION['theme']['dashboard_heading_text_size']['text'] ?? '13px';
$dashboard_heading_text_font = $_SESSION['theme']['dashboard_heading_text_font']['text'] ?? 'Arial, Calibri, Candara, Segoe, "Segoe UI", Optima, sans-serif';
$dashboard_heading_text_shadow_color = $_SESSION['theme']['dashboard_heading_text_shadow_color']['text'] ?? 'rgba(0,0,0,0)';
$dashboard_heading_background_color = $_SESSION['theme']['dashboard_heading_background_color']['text'] ?? '';
$dashboard_heading_background_color_hover = $_SESSION['theme']['dashboard_heading_background_color_hover']['text'] ?? color_adjust($dashboard_heading_background_color, 0.03);
$dashboard_number_text_color = $_SESSION['theme']['dashboard_number_text_color']['text'] ?? '#fff';
$dashboard_number_text_color_hover = $_SESSION['theme']['dashboard_number_text_color_hover']['text'] ?? '#fff';
$dashboard_number_text_font = $_SESSION['theme']['dashboard_number_text_font']['text'] ?? 'Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif';
$dashboard_number_text_size = $_SESSION['theme']['dashboard_number_text_size']['text'] ?? '60pt';
$dashboard_number_text_shadow_color = $_SESSION['theme']['dashboard_number_text_shadow_color']['text'] ?? '#737983';
$dashboard_number_text_shadow_color_hover = $_SESSION['theme']['dashboard_number_text_shadow_color_hover']['text'] ?? '#737983';
$dashboard_number_background_color = $_SESSION['theme']['dashboard_number_background_color']['text'] ?? '#a4aebf';
$dashboard_number_text_color = $_SESSION['theme']['dashboard_number_text_color']['text'] ?? '#444';
$dashboard_number_text_color_hover = $_SESSION['theme']['dashboard_number_text_color_hover']['text'] ?? '';
$dashboard_number_text_font = $_SESSION['theme']['dashboard_number_text_font']['text'] ?? 'Arial, Calibri, Candara, Segoe, "Segoe UI", Optima, sans-serif';
$dashboard_number_text_size = $_SESSION['theme']['dashboard_number_text_size']['text'] ?? '100px';
$dashboard_number_text_shadow_color = $_SESSION['theme']['dashboard_number_text_shadow_color']['text'] ?? 'rgba(0,0,0,0)';
$dashboard_number_text_shadow_color_hover = $_SESSION['theme']['dashboard_number_text_shadow_color_hover']['text'] ?? 'rgba(0,0,0,0)';
$dashboard_number_background_color = $_SESSION['theme']['dashboard_number_background_color']['text'] ?? '';
$dashboard_number_background_color_hover = $_SESSION['theme']['dashboard_number_background_color_hover']['text'] ?? color_adjust($dashboard_number_background_color, 0.03);
$dashboard_number_title_text_color = $_SESSION['theme']['dashboard_number_title_text_color']['text'] ?? '#fff';
$dashboard_number_title_text_size = $_SESSION['theme']['dashboard_number_title_text_size']['text'] ?? '14px';
@ -2568,6 +2568,7 @@ else { //default: white
letter-spacing: -0.02em;
color: <?=$dashboard_heading_text_color?>;
font-size: <?=$dashboard_heading_text_size?>;
font-weight: bold;
<?php
//calculate line height based on font size
$font_size = strtolower($dashboard_heading_text_size);
@ -2619,6 +2620,7 @@ else { //default: white
border-top: 1px solid <?php echo color_adjust($dashboard_number_background_color, 0.2); ?>;
overflow: hidden;
<?php
/*
//calculate font padding
$font_size = strtolower($dashboard_heading_text_size);
$tmp = str_replace(' ', '', $font_size);
@ -2628,9 +2630,14 @@ else { //default: white
$tmp = str_replace('%', '', $tmp);
$font_size_number = $tmp;
$padding_top_bottom = (int) floor((100-$tmp) * 0.25);
*/
?>
<!--
padding-top: <?php echo $padding_top_bottom.'px' ?>;
padding-bottom: <?php echo $padding_top_bottom.'px' ?>;
-->
padding-top: 5px;
padding-bottom: 10px;
}
span.hud_stat:hover {