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:
Alex
2025-09-08 16:33:29 -07:00
committed by GitHub
parent a7f4712ceb
commit e8681737dc
54 changed files with 6181 additions and 4812 deletions

View File

@@ -46,7 +46,7 @@ if (!isset($database)) {
} }
//set the dashboard icon to a solid color phone //set the dashboard icon to a solid color phone
$dashboard_icon = 'fa-solid fa-phone'; $widget_icon = 'fa-solid fa-phone';
//add multi-lingual support //add multi-lingual support
$text = (new text)->get($_SESSION['domain']['language']['code'], 'app/active_calls'); $text = (new text)->get($_SESSION['domain']['language']['code'], 'app/active_calls');
@@ -68,17 +68,17 @@ $row_style["0"] = "row_style0";
$row_style["1"] = "row_style1"; $row_style["1"] = "row_style1";
//icon and count //icon and count
echo "<div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_active_calls_details').slideToggle('fast');\"").">\n"; echo "<div class='hud_content' ".($widget_details_state == "disabled" ?: "onclick=\"$('#hud_active_calls_details').slideToggle('fast');\"").">\n";
echo "<span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/active_calls/active_calls.php'\">".$text['title']."</a></span>\n"; echo "<span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/active_calls/active_calls.php'\">".$text['title']."</a></span>\n";
echo "<div style='position: relative; display: inline-block;'>\n"; echo "<div style='position: relative; display: inline-block;'>\n";
echo "<span class='hud_stat'><i class=\"fas ".$dashboard_icon." \"></i></span>\n"; echo "<span class='hud_stat'><i class=\"fas ".$widget_icon." \"></i></span>\n";
echo "<span id='calls_active_count' name='calls_active_count' style=\"background-color: ".(!empty($dashboard_number_background_color) ? $dashboard_number_background_color : '#03c04a')."; color: ".(!empty($dashboard_number_text_color) ? $dashboard_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 23px; left: 24.5px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">0</span>\n"; echo "<span id='calls_active_count' name='calls_active_count' style=\"background-color: ".(!empty($widget_number_background_color) ? $widget_number_background_color : '#03c04a')."; color: ".(!empty($widget_number_text_color) ? $widget_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 23px; left: 24.5px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">0</span>\n";
echo "</div>\n"; echo "</div>\n";
echo "</div>\n"; echo "</div>\n";
//active call details //active call details
echo "<div class='hud_details hud_box' id='hud_active_calls_details'>\n"; echo "<div class='hud_details hud_box' id='hud_active_calls_details'>\n";
if ($dashboard_details_state != 'disabled') { if ($widget_details_state != 'disabled') {
echo "<table id='active_calls' name='active_calls' class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n"; echo "<table id='active_calls' name='active_calls' class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<thead id='head_active_calls' name='head_active_calls'>\n"; echo "<thead id='head_active_calls' name='head_active_calls'>\n";
echo "<tr>\n"; echo "<tr>\n";

View File

@@ -1,47 +1,50 @@
<?php <?php
$x++; $x++;
$array['dashboard'][$x]['dashboard_uuid'] = '4c63234b-e5d2-4232-9787-4734d342557b'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Active Calls'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '4c63234b-e5d2-4232-9787-4734d342557b';
$array['dashboard'][$x]['dashboard_path'] = 'active_calls/active_calls'; $array['dashboard_widgets'][$x]['widget_name'] = 'Active Calls';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-phone'; $array['dashboard_widgets'][$x]['widget_path'] = 'active_calls/active_calls';
$array['dashboard'][$x]['dashboard_icon_color'] = '#bfbfbf'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-solid fa-phone';
$array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#bfbfbf';
$array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard_widgets'][$x]['widget_url'] = '';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = '';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'icon'; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['icon']; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'icon';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['icon'];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '90'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '90';
$array['dashboard'][$x]['dashboard_description'] = 'System information like Disk usage.'; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = 'System information like Disk usage.';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'a792add7-95a8-4d0e-a7c6-48495de8bae9'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '4c63234b-e5d2-4232-9787-4734d342557b'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'a792add7-95a8-4d0e-a7c6-48495de8bae9';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '4c63234b-e5d2-4232-9787-4734d342557b';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '2fc95ca2-fad0-41a4-bd58-6aba37eebc75'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '4c63234b-e5d2-4232-9787-4734d342557b'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '2fc95ca2-fad0-41a4-bd58-6aba37eebc75';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '4c63234b-e5d2-4232-9787-4734d342557b';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'c5205a44-1eb7-4294-86a8-8b0d2b9ece98'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '4c63234b-e5d2-4232-9787-4734d342557b'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'c5205a44-1eb7-4294-86a8-8b0d2b9ece98';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '4c63234b-e5d2-4232-9787-4734d342557b';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'user';

View File

@@ -1,49 +1,53 @@
<?php <?php
//call block icon //call block icon
$array['dashboard'][$x]['dashboard_uuid'] = 'e75f04ff-6d1b-4b39-af0f-e1d1860327c1'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Call Block'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'e75f04ff-6d1b-4b39-af0f-e1d1860327c1';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard_widgets'][$x]['widget_name'] = 'Call Block';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-ban'; $array['dashboard_widgets'][$x]['widget_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon_color'] = '#EA4C46'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-ban';
$array['dashboard'][$x]['dashboard_url'] = '/app/call_block/call_block.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#EA4C46';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/call_block/call_block.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'false'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'false';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '7919f503-397c-4f98-a661-a60a738a1b1c'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'e75f04ff-6d1b-4b39-af0f-e1d1860327c1'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '7919f503-397c-4f98-a661-a60a738a1b1c';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'e75f04ff-6d1b-4b39-af0f-e1d1860327c1';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '8f9f1b96-660b-469c-ab02-fbdf65f994f1'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'e75f04ff-6d1b-4b39-af0f-e1d1860327c1'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '8f9f1b96-660b-469c-ab02-fbdf65f994f1';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'e75f04ff-6d1b-4b39-af0f-e1d1860327c1';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '2f8cb6c2-c4cb-4602-af3e-713196c4965b'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'e75f04ff-6d1b-4b39-af0f-e1d1860327c1'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '2f8cb6c2-c4cb-4602-af3e-713196c4965b';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'e75f04ff-6d1b-4b39-af0f-e1d1860327c1';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'user';
$y++; $y++;
?> ?>

View File

@@ -1,39 +1,41 @@
<?php <?php
$array['dashboard'][$x]['dashboard_uuid'] = '9083305a-ebb4-4b67-bb9b-8c09cf030261'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Call Center Agents'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '9083305a-ebb4-4b67-bb9b-8c09cf030261';
$array['dashboard'][$x]['dashboard_path'] = 'call_centers/call_center_agents'; $array['dashboard_widgets'][$x]['widget_name'] = 'Call Center Agents';
$array['dashboard'][$x]['dashboard_icon'] = ''; $array['dashboard_widgets'][$x]['widget_path'] = 'call_centers/call_center_agents';
$array['dashboard'][$x]['dashboard_icon_color'] = ''; $array['dashboard_widgets'][$x]['widget_icon'] = '';
$array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard_widgets'][$x]['widget_icon_color'] = '';
$array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard_widgets'][$x]['widget_url'] = '';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = '';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#3164AD'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#3164AD';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '2'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'none'; $array['dashboard_widgets'][$x]['widget_row_span'] = '2';
$array['dashboard'][$x]['dashboard_order'] = '180'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'none';
$array['dashboard'][$x]['dashboard_enabled'] = 'false'; $array['dashboard_widgets'][$x]['widget_order'] = '180';
$array['dashboard'][$x]['dashboard_description'] = 'Status for agent in a call center.'; $array['dashboard_widgets'][$x]['widget_enabled'] = 'false';
$array['dashboard_widgets'][$x]['widget_description'] = 'Status for agent in a call center.';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '22d8937c-a9b3-4458-b34c-0ebeda15ffad'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '9083305a-ebb4-4b67-bb9b-8c09cf030261'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '22d8937c-a9b3-4458-b34c-0ebeda15ffad';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'agent'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '9083305a-ebb4-4b67-bb9b-8c09cf030261';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'agent';
?> ?>

View File

@@ -102,11 +102,11 @@
//begin widget //begin widget
echo "<div class='hud_box'>\n"; echo "<div class='hud_box'>\n";
echo " <div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_call_forward_details').slideToggle('fast');\"").">\n"; echo " <div class='hud_content' ".($widget_details_state == "disabled" ?: "onclick=\"$('#hud_call_forward_details').slideToggle('fast');\"").">\n";
echo " <span class='hud_title'>".$text['header-call_forward']."</span>\n"; echo " <span class='hud_title'>".$text['header-call_forward']."</span>\n";
//doughnut chart //doughnut chart
if (empty($dashboard_chart_type) || $dashboard_chart_type == "doughnut") { if (empty($widget_chart_type) || $widget_chart_type == "doughnut") {
echo "<div class='hud_chart' style='width: 275px;'><canvas id='call_forward_chart'></canvas></div>\n"; echo "<div class='hud_chart' style='width: 275px;'><canvas id='call_forward_chart'></canvas></div>\n";
echo "<script>\n"; echo "<script>\n";
@@ -170,7 +170,7 @@
echo " labels: {\n"; echo " labels: {\n";
echo " usePointStyle: true,\n"; echo " usePointStyle: true,\n";
echo " pointStyle: 'rect',\n"; echo " pointStyle: 'rect',\n";
echo " color: '".$dashboard_label_text_color."'\n"; echo " color: '".$widget_label_text_color."'\n";
echo " }\n"; echo " }\n";
echo " }\n"; echo " }\n";
echo " }\n"; echo " }\n";
@@ -182,7 +182,7 @@
echo " ctx.font = chart_text_size + ' ' + chart_text_font;\n"; echo " ctx.font = chart_text_size + ' ' + chart_text_font;\n";
echo " ctx.textBaseline = 'middle';\n"; echo " ctx.textBaseline = 'middle';\n";
echo " ctx.textAlign = 'center';\n"; echo " ctx.textAlign = 'center';\n";
echo " ctx.fillStyle = '".$dashboard_number_text_color."';\n"; echo " ctx.fillStyle = '".$widget_number_text_color."';\n";
echo " ctx.fillText(options.text, width / 2, top + (height / 2));\n"; echo " ctx.fillText(options.text, width / 2, top + (height / 2));\n";
echo " ctx.save();\n"; echo " ctx.save();\n";
echo " }\n"; echo " }\n";
@@ -191,13 +191,13 @@
echo " );\n"; echo " );\n";
echo "</script>\n"; echo "</script>\n";
} }
if ($dashboard_chart_type == "number") { if ($widget_chart_type == "number") {
echo " <span class='hud_stat'>".$stats['call_forward']."</span>"; echo " <span class='hud_stat'>".$stats['call_forward']."</span>";
} }
echo " </div>\n"; echo " </div>\n";
//details //details
if ($dashboard_details_state != 'disabled') { if ($widget_details_state != 'disabled') {
echo "<div class='hud_details hud_box' id='hud_call_forward_details'>"; echo "<div class='hud_details hud_box' id='hud_call_forward_details'>";
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n"; echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr style='position: -webkit-sticky; position: sticky; z-index: 5; top: 0;'>\n"; echo "<tr style='position: -webkit-sticky; position: sticky; z-index: 5; top: 0;'>\n";

View File

@@ -1,86 +1,92 @@
<?php <?php
//call forward //call forward
$array['dashboard'][$x]['dashboard_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692fb'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Call Forward'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692fb';
$array['dashboard'][$x]['dashboard_path'] = 'call_forward/call_forward'; $array['dashboard_widgets'][$x]['widget_name'] = 'Call Forward';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-forward'; $array['dashboard_widgets'][$x]['widget_path'] = 'call_forward/call_forward';
$array['dashboard'][$x]['dashboard_icon_color'] = ''; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-forward';
$array['dashboard'][$x]['dashboard_url'] = '/app/call_forward/call_forward.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/call_forward/call_forward.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'doughnut'; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['number', 'doughnut']; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'doughnut';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['number', 'doughnut'];
$array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '2'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden'; $array['dashboard_widgets'][$x]['widget_row_span'] = '2';
$array['dashboard'][$x]['dashboard_order'] = '130'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '130';
$array['dashboard'][$x]['dashboard_description'] = 'Call routing for extension using Call forward, Follow Me and Do Not Disturb.'; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = 'Call routing for extension using Call forward, Follow Me and Do Not Disturb.';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '5de9537d-4098-405f-9922-caf5f85fade3'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692fb'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '5de9537d-4098-405f-9922-caf5f85fade3';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692fb';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'b550e850-36d5-4cde-9936-85180f401df4'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692fb'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'b550e850-36d5-4cde-9936-85180f401df4';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692fb';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '6d04646f-54cf-49f4-a3ce-a16e7adda2b9'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692fb'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '6d04646f-54cf-49f4-a3ce-a16e7adda2b9';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'ba60799a-1c40-44a8-80ef-c2be4f4692fb';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'user';
$x++; $x++;
//follow me icon //follow me icon
$array['dashboard'][$x]['dashboard_uuid'] = '714e513d-be78-4c63-8f8d-951d48a7fc0e'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Follow Me'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '714e513d-be78-4c63-8f8d-951d48a7fc0e';
$array['dashboard'][$x]['dashboard_path'] = 'core/dashboard/resources/dashboard/icon.php'; $array['dashboard_widgets'][$x]['widget_name'] = 'Follow Me';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-forward'; $array['dashboard_widgets'][$x]['widget_path'] = 'core/dashboard/resources/dashboard/icon.php';
$array['dashboard'][$x]['dashboard_url'] = '/app/call_forward/call_forward.php'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-forward';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/call_forward/call_forward.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '#0292ff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '#0292ff';
$array['dashboard'][$x]['dashboard_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '57a49ce1-6985-4c9e-b59c-38ecd1d6bf7f'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '714e513d-be78-4c63-8f8d-951d48a7fc0e'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '57a49ce1-6985-4c9e-b59c-38ecd1d6bf7f';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '714e513d-be78-4c63-8f8d-951d48a7fc0e';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'user';
$y++; $y++;
?> ?>

View File

@@ -1,45 +1,48 @@
<?php <?php
//conference centers icon //conference centers icon
$array['dashboard'][$x]['dashboard_uuid'] = 'd1b26c96-6cfd-45ea-824f-0b5e16a9aab9'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Conference Centers'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'd1b26c96-6cfd-45ea-824f-0b5e16a9aab9';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard_widgets'][$x]['widget_name'] = 'Conference Centers';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-hotel'; $array['dashboard_widgets'][$x]['widget_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon_color'] = '#5D5CE3'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-hotel';
$array['dashboard'][$x]['dashboard_url'] = '/app/conference_centers/conference_rooms.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#5D5CE3';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/conference_centers/conference_rooms.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '4d0e15fa-5fb8-4735-b8ba-0c5ee9108c4d'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'd1b26c96-6cfd-45ea-824f-0b5e16a9aab9'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '4d0e15fa-5fb8-4735-b8ba-0c5ee9108c4d';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'd1b26c96-6cfd-45ea-824f-0b5e16a9aab9';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'b78637e6-4dcd-422b-bac8-494caaef0359'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'd1b26c96-6cfd-45ea-824f-0b5e16a9aab9'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'b78637e6-4dcd-422b-bac8-494caaef0359';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'd1b26c96-6cfd-45ea-824f-0b5e16a9aab9';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
?> ?>

View File

@@ -1,45 +1,48 @@
<?php <?php
//conferences icon //conferences icon
$array['dashboard'][$x]['dashboard_uuid'] = 'c3c37d29-b654-4024-8ee4-d752b3e4db46'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Conferences'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'c3c37d29-b654-4024-8ee4-d752b3e4db46';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard_widgets'][$x]['widget_name'] = 'Conferences';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-comments'; $array['dashboard_widgets'][$x]['widget_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-comments';
$array['dashboard'][$x]['dashboard_url'] = '/app/conferences/conferences.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#0292ff';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/conferences/conferences.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'b3a98d15-7966-4208-b075-b2bf9bb41d7f'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'c3c37d29-b654-4024-8ee4-d752b3e4db46'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'b3a98d15-7966-4208-b075-b2bf9bb41d7f';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'c3c37d29-b654-4024-8ee4-d752b3e4db46';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '5f807aa0-e1b4-4b85-9387-4de51cbdc897'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'c3c37d29-b654-4024-8ee4-d752b3e4db46'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '5f807aa0-e1b4-4b85-9387-4de51cbdc897';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'c3c37d29-b654-4024-8ee4-d752b3e4db46';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
?> ?>

View File

@@ -1,45 +1,48 @@
<?php <?php
//destinations icon //destinations icon
$array['dashboard'][$x]['dashboard_uuid'] = 'a294b771-a125-4d36-b51a-973540346fad'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Destinations'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'a294b771-a125-4d36-b51a-973540346fad';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard_widgets'][$x]['widget_name'] = 'Destinations';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-right-to-bracket'; $array['dashboard_widgets'][$x]['widget_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-solid fa-right-to-bracket';
$array['dashboard'][$x]['dashboard_url'] = '/app/destinations/destinations.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#0292ff';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/destinations/destinations.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '7d0066d2-d86c-4684-83ea-bc0a6eb27184'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'a294b771-a125-4d36-b51a-973540346fad'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '7d0066d2-d86c-4684-83ea-bc0a6eb27184';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'a294b771-a125-4d36-b51a-973540346fad';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'bf9a472a-9fb1-4c75-8134-1140b529a6b0'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'a294b771-a125-4d36-b51a-973540346fad'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'bf9a472a-9fb1-4c75-8134-1140b529a6b0';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'a294b771-a125-4d36-b51a-973540346fad';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
?> ?>

View File

@@ -1,81 +1,86 @@
<?php <?php
//device keys //device keys
$array['dashboard'][$x]['dashboard_uuid'] = 'f1c722d5-b714-4fa2-9664-5f6d24d44661'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Device Keys'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'f1c722d5-b714-4fa2-9664-5f6d24d44661';
$array['dashboard'][$x]['dashboard_path'] = 'devices/device_keys'; $array['dashboard_widgets'][$x]['widget_name'] = 'Device Keys';
$array['dashboard'][$x]['dashboard_icon'] = ''; $array['dashboard_widgets'][$x]['widget_path'] = 'devices/device_keys';
$array['dashboard'][$x]['dashboard_icon_color'] = ''; $array['dashboard_widgets'][$x]['widget_icon'] = '';
$array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard_widgets'][$x]['widget_icon_color'] = '';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '2'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'none'; $array['dashboard_widgets'][$x]['widget_row_span'] = '2';
$array['dashboard'][$x]['dashboard_order'] = '150'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'none';
$array['dashboard'][$x]['dashboard_enabled'] = 'false'; $array['dashboard_widgets'][$x]['widget_order'] = '150';
$array['dashboard'][$x]['dashboard_description'] = 'Used to manage phone provisioned device keys.'; $array['dashboard_widgets'][$x]['widget_enabled'] = 'false';
$array['dashboard_widgets'][$x]['widget_description'] = 'Used to manage phone provisioned device keys.';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '0d04d50e-aa49-40d2-9e98-ed21f9070f6f'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'f1c722d5-b714-4fa2-9664-5f6d24d44661'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '0d04d50e-aa49-40d2-9e98-ed21f9070f6f';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'f1c722d5-b714-4fa2-9664-5f6d24d44661';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'user';
$x++; $x++;
//devices icon //devices icon
$array['dashboard'][$x]['dashboard_uuid'] = 'd93648da-af16-4018-9182-76e8820ffe56'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Devices'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'd93648da-af16-4018-9182-76e8820ffe56';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard_widgets'][$x]['widget_name'] = 'Devices';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-mobile-retro'; $array['dashboard_widgets'][$x]['widget_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_url'] = '/app/devices/devices.php'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-mobile-retro';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/devices/devices.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '#0292ff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '#0292ff';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '84452fd4-2409-427b-8382-96bfb38fdf49'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'd93648da-af16-4018-9182-76e8820ffe56'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '84452fd4-2409-427b-8382-96bfb38fdf49';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'd93648da-af16-4018-9182-76e8820ffe56';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '5d026f9d-3fbb-4d4a-b654-bef32ea8bdef'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'd93648da-af16-4018-9182-76e8820ffe56'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '5d026f9d-3fbb-4d4a-b654-bef32ea8bdef';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'd93648da-af16-4018-9182-76e8820ffe56';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
?> ?>

View File

@@ -1,47 +1,51 @@
<?php <?php
$array['dashboard'][$x]['dashboard_uuid'] = '2f7a90cc-8d60-4df4-98ee-2ef4000afac7'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Domain Limits'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '2f7a90cc-8d60-4df4-98ee-2ef4000afac7';
$array['dashboard'][$x]['dashboard_path'] = 'domain_limits/domain_limits'; $array['dashboard_widgets'][$x]['widget_name'] = 'Domain Limits';
$array['dashboard'][$x]['dashboard_icon'] = ''; $array['dashboard_widgets'][$x]['widget_path'] = 'domain_limits/domain_limits';
$array['dashboard'][$x]['dashboard_icon_color'] = ''; $array['dashboard_widgets'][$x]['widget_icon'] = '';
$array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard_widgets'][$x]['widget_icon_color'] = '';
$array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard_widgets'][$x]['widget_url'] = '';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = '';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'doughnut'; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['number', 'doughnut']; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'doughnut';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['number', 'doughnut'];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_row_span'] = '2'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden'; $array['dashboard_widgets'][$x]['widget_row_span'] = '2';
$array['dashboard'][$x]['dashboard_order'] = '120'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_enabled'] = 'false'; $array['dashboard_widgets'][$x]['widget_order'] = '120';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'false';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'e99eb62e-4150-42a8-8c0c-4a264245f12a'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '2f7a90cc-8d60-4df4-98ee-2ef4000afac7'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'e99eb62e-4150-42a8-8c0c-4a264245f12a';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '2f7a90cc-8d60-4df4-98ee-2ef4000afac7';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'db7c3c71-9761-4bd9-a166-ea5a0de2cd0e'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '2f7a90cc-8d60-4df4-98ee-2ef4000afac7'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'db7c3c71-9761-4bd9-a166-ea5a0de2cd0e';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '2f7a90cc-8d60-4df4-98ee-2ef4000afac7';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'b8772e85-bcbd-4e8c-afba-e9c04a700bfa'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '2f7a90cc-8d60-4df4-98ee-2ef4000afac7'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'b8772e85-bcbd-4e8c-afba-e9c04a700bfa';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '2f7a90cc-8d60-4df4-98ee-2ef4000afac7';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'user';
?> ?>

View File

@@ -110,11 +110,11 @@
$hud_stat_title = $text['label-destinations']; $hud_stat_title = $text['label-destinations'];
} }
echo " <div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_domain_limits_details').slideToggle('fast');\"").">\n"; echo " <div class='hud_content' ".($widget_details_state == "disabled" ?: "onclick=\"$('#hud_domain_limits_details').slideToggle('fast');\"").">\n";
echo " <span class='hud_title'>".$text['label-domain_limits']."</span>\n"; echo " <span class='hud_title'>".$text['label-domain_limits']."</span>\n";
//doughnut chart //doughnut chart
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "doughnut") { if (!isset($widget_chart_type) || $widget_chart_type == "doughnut") {
echo "<div class='hud_chart' style='width: 275px;'><canvas id='domain_limits_chart'></canvas></div>\n"; echo "<div class='hud_chart' style='width: 275px;'><canvas id='domain_limits_chart'></canvas></div>\n";
echo "<script>\n"; echo "<script>\n";
@@ -164,7 +164,7 @@
echo " ctx.font = chart_text_size + ' ' + chart_text_font;\n"; echo " ctx.font = chart_text_size + ' ' + chart_text_font;\n";
echo " ctx.textBaseline = 'middle';\n"; echo " ctx.textBaseline = 'middle';\n";
echo " ctx.textAlign = 'center';\n"; echo " ctx.textAlign = 'center';\n";
echo " ctx.fillStyle = '".$dashboard_number_text_color."';\n"; echo " ctx.fillStyle = '".$widget_number_text_color."';\n";
echo " ctx.fillText(options.text, width / 2, top + (height / 2));\n"; echo " ctx.fillText(options.text, width / 2, top + (height / 2));\n";
echo " ctx.save();\n"; echo " ctx.save();\n";
echo " }\n"; echo " }\n";
@@ -173,13 +173,13 @@
echo " );\n"; echo " );\n";
echo "</script>\n"; echo "</script>\n";
} }
if ($dashboard_chart_type == "number") { if ($widget_chart_type == "number") {
echo " <span class='hud_stat'>".$hud_stat_used."</span>"; echo " <span class='hud_stat'>".$hud_stat_used."</span>";
} }
echo " </div>\n"; echo " </div>\n";
//details //details
if ($dashboard_details_state != 'disabled') { if ($widget_details_state != 'disabled') {
echo "<div class='hud_details hud_box' id='hud_domain_limits_details'>"; echo "<div class='hud_details hud_box' id='hud_domain_limits_details'>";
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n"; echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";

View File

@@ -172,11 +172,11 @@
//caller id //caller id
echo "<div class='hud_box'>\n"; echo "<div class='hud_box'>\n";
echo " <div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_caller_id_details').slideToggle('fast');\"").">\n"; echo " <div class='hud_content' ".($widget_details_state == "disabled" ?: "onclick=\"$('#hud_caller_id_details').slideToggle('fast');\"").">\n";
echo " <span class='hud_title'>".$text['label-caller_id_number']."</span>\n"; echo " <span class='hud_title'>".$text['label-caller_id_number']."</span>\n";
//doughnut chart //doughnut chart
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "doughnut") { if (!isset($widget_chart_type) || $widget_chart_type == "doughnut") {
echo "<div class='hud_chart' style='width: 275px;'><canvas id='caller_id_chart'></canvas></div>\n"; echo "<div class='hud_chart' style='width: 275px;'><canvas id='caller_id_chart'></canvas></div>\n";
echo "<script>\n"; echo "<script>\n";
@@ -215,7 +215,7 @@
echo " labels: {\n"; echo " labels: {\n";
echo " usePointStyle: true,\n"; echo " usePointStyle: true,\n";
echo " pointStyle: 'rect',\n"; echo " pointStyle: 'rect',\n";
echo " color: '".$dashboard_label_text_color."'\n"; echo " color: '".$widget_label_text_color."'\n";
echo " }\n"; echo " }\n";
echo " }\n"; echo " }\n";
echo " }\n"; echo " }\n";
@@ -227,7 +227,7 @@
echo " ctx.font = chart_text_size + ' ' + chart_text_font;\n"; echo " ctx.font = chart_text_size + ' ' + chart_text_font;\n";
echo " ctx.textBaseline = 'middle';\n"; echo " ctx.textBaseline = 'middle';\n";
echo " ctx.textAlign = 'center';\n"; echo " ctx.textAlign = 'center';\n";
echo " ctx.fillStyle = '".$dashboard_number_text_color."';\n"; echo " ctx.fillStyle = '".$widget_number_text_color."';\n";
echo " ctx.fillText(options.text, width / 2, top + (height / 2));\n"; echo " ctx.fillText(options.text, width / 2, top + (height / 2));\n";
echo " ctx.save();\n"; echo " ctx.save();\n";
echo " }\n"; echo " }\n";
@@ -236,13 +236,13 @@
echo " );\n"; echo " );\n";
echo "</script>\n"; echo "</script>\n";
} }
if ($dashboard_chart_type == "number") { if ($widget_chart_type == "number") {
echo " <span class='hud_stat'>".$stats['undefined']."</span>"; echo " <span class='hud_stat'>".$stats['undefined']."</span>";
} }
echo " </div>\n"; echo " </div>\n";
//details //details
if ($dashboard_details_state != 'disabled') { if ($widget_details_state != 'disabled') {
echo "<form id='form_list_caller_id' method='post' action='".PROJECT_PATH."/app/extensions/resources/dashboard/caller_id.php'>\n"; echo "<form id='form_list_caller_id' method='post' action='".PROJECT_PATH."/app/extensions/resources/dashboard/caller_id.php'>\n";
echo "<div class='hud_details hud_box' id='hud_caller_id_details' style='text-align: right;'>"; echo "<div class='hud_details hud_box' id='hud_caller_id_details' style='text-align: right;'>";

View File

@@ -1,89 +1,97 @@
<?php <?php
$array['dashboard'][$x]['dashboard_uuid'] = '3bac3209-2f51-47db-b5fe-a1a804f49da9'; //caller id
$array['dashboard'][$x]['dashboard_name'] = 'Caller ID'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_path'] = 'extensions/caller_id'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '3bac3209-2f51-47db-b5fe-a1a804f49da9';
$array['dashboard'][$x]['dashboard_icon'] = ''; $array['dashboard_widgets'][$x]['widget_name'] = 'Caller ID';
$array['dashboard'][$x]['dashboard_icon_color'] = ''; $array['dashboard_widgets'][$x]['widget_path'] = 'extensions/caller_id';
$array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard_widgets'][$x]['widget_icon'] = '';
$array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard_widgets'][$x]['widget_icon_color'] = '';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_url'] = '';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'doughnut'; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['number', 'doughnut']; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'doughnut';
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['number', 'doughnut'];
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_detail_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '2'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '200'; $array['dashboard_widgets'][$x]['widget_row_span'] = '2';
$array['dashboard'][$x]['dashboard_enabled'] = 'false'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_order'] = '200';
$array['dashboard_widgets'][$x]['widget_enabled'] = 'false';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '931f7a2f-43fb-4d3d-8e39-e546a82206fa'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '3bac3209-2f51-47db-b5fe-a1a804f49da9'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '931f7a2f-43fb-4d3d-8e39-e546a82206fa';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '3bac3209-2f51-47db-b5fe-a1a804f49da9';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '47f4f687-d346-4614-b61f-fcf730f56d53'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '3bac3209-2f51-47db-b5fe-a1a804f49da9'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '47f4f687-d346-4614-b61f-fcf730f56d53';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '3bac3209-2f51-47db-b5fe-a1a804f49da9';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'ab2dd268-057d-419d-bf5a-1d3730d60daa'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '3bac3209-2f51-47db-b5fe-a1a804f49da9'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'ab2dd268-057d-419d-bf5a-1d3730d60daa';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '3bac3209-2f51-47db-b5fe-a1a804f49da9';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'user';
$x++; $x++;
//extensions icon //extensions icon
$array['dashboard'][$x]['dashboard_uuid'] = '4b7b6652-7e5f-48d3-987e-971053f093a7'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Extensions'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '4b7b6652-7e5f-48d3-987e-971053f093a7';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard_widgets'][$x]['widget_name'] = 'Extensions';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-suitcase'; $array['dashboard_widgets'][$x]['widget_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-suitcase';
$array['dashboard'][$x]['dashboard_url'] = '/app/extensions/extensions.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#0292ff';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/extensions/extensions.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'c3d3bc3f-4089-44df-ae53-9e7db08b28e3'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '4b7b6652-7e5f-48d3-987e-971053f093a7'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'c3d3bc3f-4089-44df-ae53-9e7db08b28e3';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '4b7b6652-7e5f-48d3-987e-971053f093a7';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'fcf6f157-a92d-432b-a583-9fd436920904'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '4b7b6652-7e5f-48d3-987e-971053f093a7'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'fcf6f157-a92d-432b-a583-9fd436920904';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '4b7b6652-7e5f-48d3-987e-971053f093a7';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
?> ?>

View File

@@ -1,41 +1,43 @@
<?php <?php
//fax server icon //fax server icon
$array['dashboard'][$x]['dashboard_uuid'] = 'ea3f5a8a-fc93-47d7-a632-a733522affc3'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Fax Server'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'ea3f5a8a-fc93-47d7-a632-a733522affc3';
$array['dashboard'][$x]['dashboard_path'] = 'core/dashboard/resources/dashboard/icon.php'; $array['dashboard_widgets'][$x]['widget_name'] = 'Fax Server';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-print'; $array['dashboard_widgets'][$x]['widget_path'] = 'core/dashboard/resources/dashboard/icon.php';
$array['dashboard'][$x]['dashboard_icon_color'] = '#5D5CE3'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-print';
$array['dashboard'][$x]['dashboard_url'] = '/app/fax/fax.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#5D5CE3';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/fax/fax.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '3a699f10-11f4-42e9-8900-e84d5210eddc'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'ea3f5a8a-fc93-47d7-a632-a733522affc3'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '3a699f10-11f4-42e9-8900-e84d5210eddc';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'fax'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'ea3f5a8a-fc93-47d7-a632-a733522affc3';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'fax';
$y++; $y++;
?> ?>

View File

@@ -1,45 +1,48 @@
<?php <?php
//ivr menus icon //ivr menus icon
$array['dashboard'][$x]['dashboard_uuid'] = '3af7af65-7861-4d05-a0bc-36d704458fa0'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'IVR Menus'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '3af7af65-7861-4d05-a0bc-36d704458fa0';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard_widgets'][$x]['widget_name'] = 'IVR Menus';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-diagram-project'; $array['dashboard_widgets'][$x]['widget_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-solid fa-diagram-project';
$array['dashboard'][$x]['dashboard_url'] = '/app/ivr_menus/ivr_menus.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#0292ff';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/ivr_menus/ivr_menus.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'ccf52583-0806-4cdc-868b-2fecc5b423b8'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '3af7af65-7861-4d05-a0bc-36d704458fa0'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'ccf52583-0806-4cdc-868b-2fecc5b423b8';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '3af7af65-7861-4d05-a0bc-36d704458fa0';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '7b2c391a-881a-4400-a9e1-d38765c89dc0'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '3af7af65-7861-4d05-a0bc-36d704458fa0'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '7b2c391a-881a-4400-a9e1-d38765c89dc0';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '3af7af65-7861-4d05-a0bc-36d704458fa0';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
?> ?>

View File

@@ -1,45 +1,48 @@
<?php <?php
//time conditions icon //time conditions icon
$array['dashboard'][$x]['dashboard_uuid'] = '3d8efe65-49c3-4783-844e-4ebc1c97db68'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Recordings'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '3d8efe65-49c3-4783-844e-4ebc1c97db68';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard_widgets'][$x]['widget_name'] = 'Recordings';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-microphone'; $array['dashboard_widgets'][$x]['widget_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-microphone';
$array['dashboard'][$x]['dashboard_url'] = '/app/recordings/recordings.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#0292ff';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/recordings/recordings.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'ac4a9b75-df8d-4210-8ccd-001de9dc7a6b'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '3d8efe65-49c3-4783-844e-4ebc1c97db68'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'ac4a9b75-df8d-4210-8ccd-001de9dc7a6b';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '3d8efe65-49c3-4783-844e-4ebc1c97db68';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'eaa583b0-eca5-4266-a0f9-e06f0fa14288'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '3d8efe65-49c3-4783-844e-4ebc1c97db68'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'eaa583b0-eca5-4266-a0f9-e06f0fa14288';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '3d8efe65-49c3-4783-844e-4ebc1c97db68';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
?> ?>

View File

@@ -1,45 +1,48 @@
<?php <?php
//registrations icon //registrations icon
$array['dashboard'][$x]['dashboard_uuid'] = 'ce343ebe-3b54-4aad-b7e0-66de02171e78'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Registrations'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'ce343ebe-3b54-4aad-b7e0-66de02171e78';
$array['dashboard'][$x]['dashboard_path'] = 'registrations/registrations.php'; $array['dashboard_widgets'][$x]['widget_name'] = 'Registrations';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-list-check'; $array['dashboard_widgets'][$x]['widget_path'] = 'registrations/registrations';
$array['dashboard'][$x]['dashboard_icon_color'] = '#bfbfbf'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-list-check';
$array['dashboard'][$x]['dashboard_url'] = '/app/registrations/registrations.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#bfbfbf';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/registrations/registrations.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'icon'; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['icon']; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'icon';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['icon'];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_number_background_color'] = '#5d5ce3'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '#5d5ce3';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '80'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '80';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '79c46151-6008-488d-bcac-0b17ef51d1bc'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'ce343ebe-3b54-4aad-b7e0-66de02171e78'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '79c46151-6008-488d-bcac-0b17ef51d1bc';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'ce343ebe-3b54-4aad-b7e0-66de02171e78';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'ae55ad7e-d0e0-4ca5-a509-18062872104f'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'ce343ebe-3b54-4aad-b7e0-66de02171e78'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'ae55ad7e-d0e0-4ca5-a509-18062872104f';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'ce343ebe-3b54-4aad-b7e0-66de02171e78';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
?> ?>

View File

@@ -5,20 +5,20 @@
require_once "resources/check_auth.php"; require_once "resources/check_auth.php";
//convert to a key //convert to a key
$dashboard_key = str_replace(' ', '_', strtolower($dashboard_name)); $widget_key = str_replace(' ', '_', strtolower($widget_name));
//add multi-lingual support //add multi-lingual support
$language = new text; $language = new text;
$text = $language->get($_SESSION['domain']['language']['code'], dirname($dashboard_url)); $text = $language->get($_SESSION['domain']['language']['code'], dirname($widget_url));
//get the dashboard label //get the dashboard label
$dashboard_label = $text['title-'.$dashboard_key] ?? $dashboard_name; $widget_label = $text['title-'.$widget_key] ?? $widget_name;
//prepare variables //prepare variables
$dashboard_target = ($dashboard_target == 'new') ? '_blank' : '_self'; $widget_target = ($widget_target == 'new') ? '_blank' : '_self';
$window_parameters = ''; $window_parameters = '';
if (!empty($dashboard_width) && !empty($dashboard_height)) { if (!empty($widget_width) && !empty($widget_height)) {
$window_parameters .= "width=".$dashboard_width.",height=".$dashboard_height; $window_parameters .= "width=".$widget_width.",height=".$widget_height;
} }
//channel count //channel count
@@ -51,15 +51,15 @@
//dashboard icon //dashboard icon
echo "<div class='hud_box'>\n"; echo "<div class='hud_box'>\n";
echo " <div class='hud_content' ".(empty($dashboard_details_state) || $dashboard_details_state != "disabled" ? "onclick=\"$('#hud_icon_details').slideToggle('fast');\"" : null).">\n"; echo " <div class='hud_content' ".(empty($widget_details_state) || $widget_details_state != "disabled" ? "onclick=\"$('#hud_icon_details').slideToggle('fast');\"" : null).">\n";
echo " <span class='hud_title' onclick=\"window.open('".$dashboard_url."', '".$dashboard_target."', '".$window_parameters."')\">".escape($dashboard_label)."</span>"; echo " <span class='hud_title' onclick=\"window.open('".$widget_url."', '".$widget_target."', '".$window_parameters."')\">".escape($widget_label)."</span>";
echo " <div style='position: relative; display: inline-block;'>\n"; echo " <div style='position: relative; display: inline-block;'>\n";
echo " <span class='hud_stat' onclick=\"window.open('".$dashboard_url."', '".$dashboard_target."', '".$window_parameters."')\"><i class=\"fas ".$dashboard_icon."\"></i></span>\n"; echo " <span class='hud_stat' onclick=\"window.open('".$widget_url."', '".$widget_target."', '".$window_parameters."')\"><i class=\"fas ".$widget_icon."\"></i></span>\n";
echo " <span style=\"background-color: ".(!empty($dashboard_number_background_color) ? $dashboard_number_background_color : '#5d5ce3')."; color: ".(!empty($dashboard_number_text_color) ? $dashboard_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 22px; left: 25px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$active_registrations." / ".($active_registrations + $inactive_registrations)."</span>\n"; echo " <span style=\"background-color: ".(!empty($widget_number_background_color) ? $widget_number_background_color : '#5d5ce3')."; color: ".(!empty($widget_number_text_color) ? $widget_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 22px; left: 25px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$active_registrations." / ".($active_registrations + $inactive_registrations)."</span>\n";
echo " </div>\n"; echo " </div>\n";
echo " </div>\n"; echo " </div>\n";
if (empty($dashboard_details_state) || $dashboard_details_state != "disabled") { if (empty($widget_details_state) || $widget_details_state != "disabled") {
echo " <div class='hud_details hud_box' id='hud_icon_details' style='padding: 20px; 10%; overflow: auto; ".(!empty($row['dashboard_detail_background_color']) ? "background: ".$row['dashboard_detail_background_color'].";" : null)."'>".str_replace("\r", '<br>', escape($dashboard_content_details))."</div>\n"; echo " <div class='hud_details hud_box' id='hud_icon_details' style='padding: 20px; 10%; overflow: auto; ".(!empty($row['widget_detail_background_color']) ? "background: ".$row['widget_detail_background_color'].";" : null)."'>".str_replace("\r", '<br>', escape($widget_content_details))."</div>\n";
} }
echo " <span class='hud_expander' onclick=\"$('#hud_icon_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>"; echo " <span class='hud_expander' onclick=\"$('#hud_icon_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
echo "</div>\n"; echo "</div>\n";

View File

@@ -1,90 +1,97 @@
<?php <?php
//ring group forward //ring group forward
$array['dashboard'][$x]['dashboard_uuid'] = 'b5da1d72-2cc7-422e-b05c-f07659aed419'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Ring Group Forward'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'b5da1d72-2cc7-422e-b05c-f07659aed419';
$array['dashboard'][$x]['dashboard_path'] = 'ring_groups/ring_group_forward'; $array['dashboard_widgets'][$x]['widget_name'] = 'Ring Group Forward';
$array['dashboard'][$x]['dashboard_icon'] = ''; $array['dashboard_widgets'][$x]['widget_path'] = 'ring_groups/ring_group_forward';
$array['dashboard'][$x]['dashboard_icon_color'] = ''; $array['dashboard_widgets'][$x]['widget_icon'] = '';
$array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard_widgets'][$x]['widget_icon_color'] = '';
$array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard_widgets'][$x]['widget_url'] = '';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = '';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'doughnut'; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['number', 'doughnut']; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'doughnut';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['number', 'doughnut'];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '2'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden'; $array['dashboard_widgets'][$x]['widget_row_span'] = '2';
$array['dashboard'][$x]['dashboard_order'] = '140'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '140';
$array['dashboard'][$x]['dashboard_description'] = 'Used for updating ring group call forward.'; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = 'Used for updating ring group call forward.';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '7aa0fdf0-100a-4ee3-ae37-67cb9a021493'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'b5da1d72-2cc7-422e-b05c-f07659aed419'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '7aa0fdf0-100a-4ee3-ae37-67cb9a021493';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'b5da1d72-2cc7-422e-b05c-f07659aed419';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '10ec859b-2325-4d66-92ce-410da9e1ee62'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'b5da1d72-2cc7-422e-b05c-f07659aed419'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '10ec859b-2325-4d66-92ce-410da9e1ee62';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'b5da1d72-2cc7-422e-b05c-f07659aed419';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'f7ef37b1-8134-48d1-b25a-d1a50bf0e339'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'b5da1d72-2cc7-422e-b05c-f07659aed419'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'f7ef37b1-8134-48d1-b25a-d1a50bf0e339';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'b5da1d72-2cc7-422e-b05c-f07659aed419';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'user';
$x++; $x++;
//ring groups icon //ring groups icon
$array['dashboard'][$x]['dashboard_uuid'] = '97e69ceb-89f6-43a0-9a92-c89c5b02e6ee'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Ring Groups'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '97e69ceb-89f6-43a0-9a92-c89c5b02e6ee';
$array['dashboard'][$x]['dashboard_path'] = 'core/dashboard/resources/dashboard/icon.php'; $array['dashboard_widgets'][$x]['widget_name'] = 'Ring Groups';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-users'; $array['dashboard_widgets'][$x]['widget_path'] = 'core/dashboard/resources/dashboard/icon.php';
$array['dashboard'][$x]['dashboard_url'] = '/app/ring_groups/ring_groups.php'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-users';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/ring_groups/ring_groups.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '#0292ff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '#0292ff';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'f0a49dcf-6535-4798-9313-32524a25df4a'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '97e69ceb-89f6-43a0-9a92-c89c5b02e6ee'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'f0a49dcf-6535-4798-9313-32524a25df4a';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '97e69ceb-89f6-43a0-9a92-c89c5b02e6ee';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '7f0aa784-e2d4-4935-a5e9-cf545419d014'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '97e69ceb-89f6-43a0-9a92-c89c5b02e6ee'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '7f0aa784-e2d4-4935-a5e9-cf545419d014';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '97e69ceb-89f6-43a0-9a92-c89c5b02e6ee';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
?> ?>

View File

@@ -153,11 +153,11 @@
//ring group forward //ring group forward
echo "<div class='hud_box'>\n"; echo "<div class='hud_box'>\n";
echo " <div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_ring_group_forward_details').slideToggle('fast');\"").">\n"; echo " <div class='hud_content' ".($widget_details_state == "disabled" ?: "onclick=\"$('#hud_ring_group_forward_details').slideToggle('fast');\"").">\n";
echo " <span class='hud_title'>".$text['header-ring-group-forward']."</span>\n"; echo " <span class='hud_title'>".$text['header-ring-group-forward']."</span>\n";
//doughnut chart //doughnut chart
if (empty($dashboard_chart_type) ||$dashboard_chart_type == "doughnut") { if (empty($widget_chart_type) ||$widget_chart_type == "doughnut") {
echo " <div class='hud_chart' style='width: 275px;'><canvas id='ring_group_forward_chart'></canvas></div>\n"; echo " <div class='hud_chart' style='width: 275px;'><canvas id='ring_group_forward_chart'></canvas></div>\n";
echo "<script>\n"; echo "<script>\n";
@@ -196,12 +196,12 @@
echo " labels: {\n"; echo " labels: {\n";
echo " usePointStyle: true,\n"; echo " usePointStyle: true,\n";
echo " pointStyle: 'rect',\n"; echo " pointStyle: 'rect',\n";
echo " color: '".$dashboard_label_text_color."'\n"; echo " color: '".$widget_label_text_color."'\n";
echo " }\n"; echo " }\n";
echo " },\n"; echo " },\n";
echo " title: {\n"; echo " title: {\n";
echo " text: '".$text['header-ring-group-forward']."',\n"; echo " text: '".$text['header-ring-group-forward']."',\n";
echo " color: '".$dashboard_label_text_color."'\n"; echo " color: '".$widget_label_text_color."'\n";
echo " }\n"; echo " }\n";
echo " }\n"; echo " }\n";
echo " },\n"; echo " },\n";
@@ -212,7 +212,7 @@
echo " ctx.font = chart_text_size + ' ' + chart_text_font;\n"; echo " ctx.font = chart_text_size + ' ' + chart_text_font;\n";
echo " ctx.textBaseline = 'middle';\n"; echo " ctx.textBaseline = 'middle';\n";
echo " ctx.textAlign = 'center';\n"; echo " ctx.textAlign = 'center';\n";
echo " ctx.fillStyle = '".$dashboard_number_text_color."';\n"; echo " ctx.fillStyle = '".$widget_number_text_color."';\n";
echo " ctx.fillText(options.text, width / 2, top + (height / 2));\n"; echo " ctx.fillText(options.text, width / 2, top + (height / 2));\n";
echo " ctx.save();\n"; echo " ctx.save();\n";
echo " }\n"; echo " }\n";
@@ -221,13 +221,13 @@
echo " );\n"; echo " );\n";
echo "</script>\n"; echo "</script>\n";
} }
if ($dashboard_chart_type == "number") { if ($widget_chart_type == "number") {
echo " <span class='hud_stat'>".$stats['forwarding']."</span>"; echo " <span class='hud_stat'>".$stats['forwarding']."</span>";
} }
echo " </div>\n"; echo " </div>\n";
//details //details
if ($dashboard_details_state != 'disabled') { if ($widget_details_state != 'disabled') {
if (permission_exists('ring_group_forward')) { if (permission_exists('ring_group_forward')) {
echo "<form id='form_list_ring_group_forward' method='post' action='".$validated_path."'>\n"; echo "<form id='form_list_ring_group_forward' method='post' action='".$validated_path."'>\n";
} }

View File

@@ -1,41 +1,43 @@
<?php <?php
$x++; $x++;
$array['dashboard'][$x]['dashboard_uuid'] = 'b9d92260-eaf7-4c05-a51e-3083e25516b3'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Switch Status'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'b9d92260-eaf7-4c05-a51e-3083e25516b3';
$array['dashboard'][$x]['dashboard_path'] = 'switch/switch_status'; $array['dashboard_widgets'][$x]['widget_name'] = 'Switch Status';
$array['dashboard'][$x]['dashboard_icon'] = ''; $array['dashboard_widgets'][$x]['widget_path'] = 'switch/switch_status';
$array['dashboard'][$x]['dashboard_icon_color'] = ''; $array['dashboard_widgets'][$x]['widget_icon'] = '';
$array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard_widgets'][$x]['widget_icon_color'] = '';
$array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard_widgets'][$x]['widget_url'] = '';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = '';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'doughnut'; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['number', 'doughnut']; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'doughnut';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['number', 'doughnut'];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_row_span'] = '2'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden'; $array['dashboard_widgets'][$x]['widget_row_span'] = '2';
$array['dashboard'][$x]['dashboard_order'] = '105'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_enabled'] = 'false'; $array['dashboard_widgets'][$x]['widget_order'] = '105';
$array['dashboard'][$x]['dashboard_description'] = 'Switch details such as version, uptime, channels and registrations.'; $array['dashboard_widgets'][$x]['widget_enabled'] = 'false';
$array['dashboard_widgets'][$x]['widget_description'] = 'Switch details such as version, uptime, channels and registrations.';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '5469c403-2cc5-4340-99f8-6f0755407de7'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'b9d92260-eaf7-4c05-a51e-3083e25516b3'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '5469c403-2cc5-4340-99f8-6f0755407de7';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'b9d92260-eaf7-4c05-a51e-3083e25516b3';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$x++; $x++;
?> ?>

View File

@@ -77,10 +77,10 @@
} }
//show the content //show the content
echo "<div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_switch_status_details').slideToggle('fast');\"").">\n"; echo "<div class='hud_content' ".($widget_details_state == "disabled" ?: "onclick=\"$('#hud_switch_status_details').slideToggle('fast');\"").">\n";
echo " <span class='hud_title'>".$text['label-switch_status']."</span>\n"; echo " <span class='hud_title'>".$text['label-switch_status']."</span>\n";
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "doughnut") { if (!isset($widget_chart_type) || $widget_chart_type == "doughnut") {
//add doughnut chart //add doughnut chart
?> ?>
<div class='hud_chart' style='width: 175px;'><canvas id='switch_status_chart'></canvas></div> <div class='hud_chart' style='width: 175px;'><canvas id='switch_status_chart'></canvas></div>
@@ -115,7 +115,7 @@
ctx.font = chart_text_size + ' ' + chart_text_font; ctx.font = chart_text_size + ' ' + chart_text_font;
ctx.textBaseline = 'middle'; ctx.textBaseline = 'middle';
ctx.textAlign = 'center'; 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)); ctx.fillText(options.text, width / 2, top + (height / 2));
ctx.save(); ctx.save();
} }
@@ -125,12 +125,12 @@
</script> </script>
<?php <?php
} }
if ($dashboard_chart_type == "number") { if ($widget_chart_type == "number") {
echo " <span class='hud_stat'>".$registrations."</span>"; echo " <span class='hud_stat'>".$registrations."</span>";
} }
echo " </div>\n"; echo " </div>\n";
if ($dashboard_details_state != 'disabled') { if ($widget_details_state != 'disabled') {
echo "<div class='hud_details hud_box' id='hud_switch_status_details'>"; echo "<div class='hud_details hud_box' id='hud_switch_status_details'>";
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n"; echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr>\n"; echo "<tr>\n";

View File

@@ -1,192 +1,203 @@
<?php <?php
$x++; $x++;
$array['dashboard'][$x]['dashboard_uuid'] = 'c388de65-85ad-4662-bbc3-a65fe9ddc319'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'System Status'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'c388de65-85ad-4662-bbc3-a65fe9ddc319';
$array['dashboard'][$x]['dashboard_path'] = 'system/system_status'; $array['dashboard_widgets'][$x]['widget_name'] = 'System Status';
$array['dashboard'][$x]['dashboard_icon'] = ''; $array['dashboard_widgets'][$x]['widget_path'] = 'system/system_status';
$array['dashboard'][$x]['dashboard_icon_color'] = ''; $array['dashboard_widgets'][$x]['widget_icon'] = '';
$array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard_widgets'][$x]['widget_icon_color'] = '';
$array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard_widgets'][$x]['widget_url'] = '';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = '';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'progress_bar'; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['number', 'doughnut', 'progress_bar']; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'progress_bar';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['number', 'doughnut', 'progress_bar'];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_row_span'] = '2'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden'; $array['dashboard_widgets'][$x]['widget_row_span'] = '2';
$array['dashboard'][$x]['dashboard_order'] = '90'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '90';
$array['dashboard'][$x]['dashboard_description'] = 'System information like Disk usage.'; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = 'System information like Disk usage.';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '5e1998c1-d3be-42f0-80ac-659e2e7934cb'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'c388de65-85ad-4662-bbc3-a65fe9ddc319'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '5e1998c1-d3be-42f0-80ac-659e2e7934cb';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'c388de65-85ad-4662-bbc3-a65fe9ddc319';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$x++; $x++;
$array['dashboard'][$x]['dashboard_uuid'] = 'c9b1f67a-d78a-4299-a16e-594a4b7cd246'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'System Disk Usage'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'c9b1f67a-d78a-4299-a16e-594a4b7cd246';
$array['dashboard'][$x]['dashboard_path'] = 'system/system_disk_usage'; $array['dashboard_widgets'][$x]['widget_name'] = 'System Disk Usage';
$array['dashboard'][$x]['dashboard_icon'] = ''; $array['dashboard_widgets'][$x]['widget_path'] = 'system/system_disk_usage';
$array['dashboard'][$x]['dashboard_icon_color'] = ''; $array['dashboard_widgets'][$x]['widget_icon'] = '';
$array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard_widgets'][$x]['widget_icon_color'] = '';
$array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard_widgets'][$x]['widget_url'] = '';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = '';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'doughnut'; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['number', 'doughnut']; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'doughnut';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['number', 'doughnut'];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_row_span'] = '2'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden'; $array['dashboard_widgets'][$x]['widget_row_span'] = '2';
$array['dashboard'][$x]['dashboard_order'] = '100'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_enabled'] = 'false'; $array['dashboard_widgets'][$x]['widget_order'] = '100';
$array['dashboard'][$x]['dashboard_description'] = 'System Disk Usage.'; $array['dashboard_widgets'][$x]['widget_enabled'] = 'false';
$array['dashboard_widgets'][$x]['widget_description'] = 'System Disk Usage.';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '625971b9-4892-4948-97e6-8bb8d409f4e1'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'c9b1f67a-d78a-4299-a16e-594a4b7cd246'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '625971b9-4892-4948-97e6-8bb8d409f4e1';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'c9b1f67a-d78a-4299-a16e-594a4b7cd246';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$x++; $x++;
$array['dashboard'][$x]['dashboard_uuid'] = 'beade936-846b-4f02-986c-a2de6fa762c2'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'System CPU Status'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'beade936-846b-4f02-986c-a2de6fa762c2';
$array['dashboard'][$x]['dashboard_path'] = 'system/system_cpu_status'; $array['dashboard_widgets'][$x]['widget_name'] = 'System CPU Status';
$array['dashboard'][$x]['dashboard_icon'] = ''; $array['dashboard_widgets'][$x]['widget_path'] = 'system/system_cpu_status';
$array['dashboard'][$x]['dashboard_icon_color'] = ''; $array['dashboard_widgets'][$x]['widget_icon'] = '';
$array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard_widgets'][$x]['widget_icon_color'] = '';
$array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard_widgets'][$x]['widget_url'] = '';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = '';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'doughnut'; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['number', 'doughnut', 'line']; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'doughnut';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['number', 'doughnut', 'line'];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_row_span'] = '2'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden'; $array['dashboard_widgets'][$x]['widget_row_span'] = '2';
$array['dashboard'][$x]['dashboard_order'] = '100'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_enabled'] = 'false'; $array['dashboard_widgets'][$x]['widget_order'] = '100';
$array['dashboard'][$x]['dashboard_description'] = 'System CPU information.'; $array['dashboard_widgets'][$x]['widget_enabled'] = 'false';
$array['dashboard_widgets'][$x]['widget_description'] = 'System CPU information.';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '41befc82-c65a-499e-9e29-513a3dd7974a'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'beade936-846b-4f02-986c-a2de6fa762c2'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '41befc82-c65a-499e-9e29-513a3dd7974a';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'beade936-846b-4f02-986c-a2de6fa762c2';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$x++; $x++;
$array['dashboard'][$x]['dashboard_uuid'] = 'bb76f7fc-669f-41dd-a636-6ddaee5deae1'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'System Counts'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'bb76f7fc-669f-41dd-a636-6ddaee5deae1';
$array['dashboard'][$x]['dashboard_path'] = 'system/system_counts'; $array['dashboard_widgets'][$x]['widget_name'] = 'System Counts';
$array['dashboard'][$x]['dashboard_icon'] = ''; $array['dashboard_widgets'][$x]['widget_path'] = 'system/system_counts';
$array['dashboard'][$x]['dashboard_icon_color'] = ''; $array['dashboard_widgets'][$x]['widget_icon'] = '';
$array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard_widgets'][$x]['widget_icon_color'] = '';
$array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard_widgets'][$x]['widget_url'] = '';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = '';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'doughnut'; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['number', 'doughnut']; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'doughnut';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['number', 'doughnut'];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_row_span'] = '2'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden'; $array['dashboard_widgets'][$x]['widget_row_span'] = '2';
$array['dashboard'][$x]['dashboard_order'] = '110'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_enabled'] = 'false'; $array['dashboard_widgets'][$x]['widget_order'] = '110';
$array['dashboard'][$x]['dashboard_description'] = 'A list of showing the count of active and inactive domains, devices, extensions, gateways, users, desttinations, ring groups and more'; $array['dashboard_widgets'][$x]['widget_enabled'] = 'false';
$array['dashboard_widgets'][$x]['widget_description'] = 'A list of showing the count of active and inactive domains, devices, extensions, gateways, users, desttinations, ring groups and more';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'a772d2a8-7c1f-4453-b77b-2e15b510a78d'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'bb76f7fc-669f-41dd-a636-6ddaee5deae1'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'a772d2a8-7c1f-4453-b77b-2e15b510a78d';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'bb76f7fc-669f-41dd-a636-6ddaee5deae1';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$x++; $x++;
$array['dashboard'][$x]['dashboard_uuid'] = '2a0a6742-bd2d-449a-88ac-b3ed255c9f8e'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'System Services'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '2a0a6742-bd2d-449a-88ac-b3ed255c9f8e';
$array['dashboard'][$x]['dashboard_path'] = 'system/system_services'; $array['dashboard_widgets'][$x]['widget_name'] = 'System Services';
$array['dashboard'][$x]['dashboard_icon'] = ''; $array['dashboard_widgets'][$x]['widget_path'] = 'system/system_services';
$array['dashboard'][$x]['dashboard_icon_color'] = ''; $array['dashboard_widgets'][$x]['widget_icon'] = '';
$array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard_widgets'][$x]['widget_icon_color'] = '';
$array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard_widgets'][$x]['widget_url'] = '';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = '';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'doughnut'; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['number', 'doughnut']; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'doughnut';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['number', 'doughnut'];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_row_span'] = '2'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden'; $array['dashboard_widgets'][$x]['widget_row_span'] = '2';
$array['dashboard'][$x]['dashboard_order'] = '110'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '110';
$array['dashboard'][$x]['dashboard_description'] = 'A list of showing the count of active and inactive services'; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = 'A list of showing the count of active and inactive services';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '4ce4064a-2179-4423-a21f-f546d10d6aa2'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '2a0a6742-bd2d-449a-88ac-b3ed255c9f8e'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '4ce4064a-2179-4423-a21f-f546d10d6aa2';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '2a0a6742-bd2d-449a-88ac-b3ed255c9f8e';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
//$y++; //$y++;
//$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '0ed1a7a3-4eeb-4d99-addb-856a52856f99'; //$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
//$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '2a0a6742-bd2d-449a-88ac-b3ed255c9f8e'; //$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '0ed1a7a3-4eeb-4d99-addb-856a52856f99';
//$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; //$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '2a0a6742-bd2d-449a-88ac-b3ed255c9f8e';
//$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
?> ?>

View File

@@ -295,10 +295,10 @@
echo "<div class='hud_box'>\n"; echo "<div class='hud_box'>\n";
if ($show_stat) { if ($show_stat) {
echo "<div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_system_counts_details').slideToggle('fast');\"").">\n"; echo "<div class='hud_content' ".($widget_details_state == "disabled" ?: "onclick=\"$('#hud_system_counts_details').slideToggle('fast');\"").">\n";
echo " <span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-system_counts']."</a></span>\n"; echo " <span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-system_counts']."</a></span>\n";
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "doughnut") { if (!isset($widget_chart_type) || $widget_chart_type == "doughnut") {
//add doughnut chart //add doughnut chart
?> ?>
<div class='hud_chart' style='width: 250px;'><canvas id='system_counts_chart'></canvas></div> <div class='hud_chart' style='width: 250px;'><canvas id='system_counts_chart'></canvas></div>
@@ -331,7 +331,7 @@
labels: { labels: {
usePointStyle: true, usePointStyle: true,
pointStyle: 'rect', pointStyle: 'rect',
color: '<?php echo $dashboard_heading_text_color; ?>' color: '<?php echo $widget_label_text_color; ?>'
} }
} }
} }
@@ -343,7 +343,7 @@
ctx.font = chart_text_size + ' ' + chart_text_font; ctx.font = chart_text_size + ' ' + chart_text_font;
ctx.textBaseline = 'middle'; ctx.textBaseline = 'middle';
ctx.textAlign = 'center'; 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)); ctx.fillText(options.text, width / 2, top + (height / 2));
ctx.save(); ctx.save();
} }
@@ -353,13 +353,13 @@
</script> </script>
<?php <?php
} }
if ($dashboard_chart_type == "number") { if ($widget_chart_type == "number") {
echo " <span class='hud_stat'>".$domain_total."</span>"; echo " <span class='hud_stat'>".$domain_total."</span>";
} }
echo " </div>\n"; echo " </div>\n";
} }
if ($dashboard_details_state != 'disabled') { if ($widget_details_state != 'disabled') {
echo "<div class='hud_details hud_box' id='hud_system_counts_details'>"; 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"; echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr>\n"; echo "<tr>\n";

View File

@@ -51,7 +51,7 @@
} }
//show the content //show the content
echo "<div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_system_cpu_status_details').slideToggle('fast');\"").">\n"; echo "<div class='hud_content' ".($widget_details_state == "disabled" ?: "onclick=\"$('#hud_system_cpu_status_details').slideToggle('fast');\"").">\n";
echo " <span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-cpu_usage']."</a></span>\n"; echo " <span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/system/system.php'\">".$text['label-cpu_usage']."</a></span>\n";
$token = (new token())->create($_SERVER['PHP_SELF']); $token = (new token())->create($_SERVER['PHP_SELF']);
@@ -60,7 +60,7 @@
subscriber::save_token($token, [system_dashboard_service::get_service_name()]); subscriber::save_token($token, [system_dashboard_service::get_service_name()]);
if ($dashboard_chart_type === 'line') { ?> if ($widget_chart_type === 'line') { ?>
<div class='hud_chart' style='width: 90%;'><canvas id='system_cpu_status_chart'></canvas></div> <div class='hud_chart' style='width: 90%;'><canvas id='system_cpu_status_chart'></canvas></div>
<script> <script>
@@ -201,7 +201,7 @@
<?php } <?php }
//add half doughnut chart //add half doughnut chart
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "doughnut") { ?> if (!isset($widget_chart_type) || $widget_chart_type == "doughnut") { ?>
<div class='hud_chart' style='width: 175px;'><canvas id='system_cpu_status_chart'></canvas></div> <div class='hud_chart' style='width: 175px;'><canvas id='system_cpu_status_chart'></canvas></div>
<script> <script>
@@ -315,7 +315,7 @@
ctx.font = chart_text_size + ' ' + chart_text_font; ctx.font = chart_text_size + ' ' + chart_text_font;
ctx.textBaseline = 'middle'; ctx.textBaseline = 'middle';
ctx.textAlign = 'center'; 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.fillText(options.text + '%', width / 2, top + (height / 2) + 35);
ctx.save(); ctx.save();
} }
@@ -326,12 +326,12 @@
connect_cpu_status_websocket(); connect_cpu_status_websocket();
</script> </script>
<?php } <?php }
if ($dashboard_chart_type == "number") { if ($widget_chart_type == "number") {
echo "<span class='hud_stat'>".round($percent_cpu)."%</span>"; echo "<span class='hud_stat'>".round($percent_cpu)."%</span>";
} }
echo "</div>\n"; echo "</div>\n";
if ($dashboard_details_state != 'disabled') { if ($widget_details_state != 'disabled') {
echo "<div class='hud_details hud_box' id='hud_system_cpu_status_details'>"; echo "<div class='hud_details hud_box' id='hud_system_cpu_status_details'>";
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n"; echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr>\n"; echo "<tr>\n";

View File

@@ -37,10 +37,10 @@
if (!empty($percent_disk_usage)) { if (!empty($percent_disk_usage)) {
//add half doughnut chart //add half doughnut chart
echo " <div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_system_disk_usage_details').slideToggle('fast');\"").">\n"; echo " <div class='hud_content' ".($widget_details_state == "disabled" ?: "onclick=\"$('#hud_system_disk_usage_details').slideToggle('fast');\"").">\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-disk_usage']."</a></span>\n";
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "doughnut") { if (!isset($widget_chart_type) || $widget_chart_type == "doughnut") {
?> ?>
<div class='hud_chart' style='width: 175px;'><canvas id='system_disk_usage_chart'></canvas></div> <div class='hud_chart' style='width: 175px;'><canvas id='system_disk_usage_chart'></canvas></div>
@@ -84,7 +84,7 @@
ctx.font = chart_text_size + ' ' + chart_text_font; ctx.font = chart_text_size + ' ' + chart_text_font;
ctx.textBaseline = 'middle'; ctx.textBaseline = 'middle';
ctx.textAlign = 'center'; 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.fillText(options.text + '%', width / 2, top + (height / 2) + 35);
ctx.save(); ctx.save();
} }
@@ -94,14 +94,14 @@
</script> </script>
<?php <?php
} }
if ($dashboard_chart_type == "number") { if ($widget_chart_type == "number") {
echo " <span class='hud_stat'>".round($percent_disk_usage)."%</span>"; echo " <span class='hud_stat'>".round($percent_disk_usage)."%</span>";
} }
echo " </div>\n"; echo " </div>\n";
} }
} }
if ($dashboard_details_state != 'disabled') { if ($widget_details_state != 'disabled') {
echo "<div class='hud_details hud_box' id='hud_system_disk_usage_details'>"; echo "<div class='hud_details hud_box' id='hud_system_disk_usage_details'>";
echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n"; echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr>\n"; echo "<tr>\n";

View File

@@ -159,11 +159,11 @@
//show the results //show the results
echo "<div class='hud_box'>\n"; echo "<div class='hud_box'>\n";
echo " <div class='hud_content' ".($dashboard_details_state == 'disabled' ?: "onclick=\"$('#hud_system_services_details').slideToggle('fast');\""). ">\n"; echo " <div class='hud_content' ".($widget_details_state == 'disabled' ?: "onclick=\"$('#hud_system_services_details').slideToggle('fast');\""). ">\n";
echo " <span class='hud_title'>System Services</span>\n"; echo " <span class='hud_title'>System Services</span>\n";
//doughnut chart //doughnut chart
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "doughnut") { if (!isset($widget_chart_type) || $widget_chart_type == "doughnut") {
echo " <div class='hud_chart' style='width: 250px;'><canvas id='system_services_chart'></canvas></div>\n"; echo " <div class='hud_chart' style='width: 250px;'><canvas id='system_services_chart'></canvas></div>\n";
echo " <script>\n"; echo " <script>\n";
echo " const system_services_chart = new Chart (\n"; echo " const system_services_chart = new Chart (\n";
@@ -193,7 +193,7 @@ if (!isset($dashboard_chart_type) || $dashboard_chart_type == "doughnut") {
echo " labels: {\n"; echo " labels: {\n";
echo " usePointStyle: true,\n"; echo " usePointStyle: true,\n";
echo " pointStyle: 'rect',\n"; echo " pointStyle: 'rect',\n";
echo " color: '$dashboard_heading_text_color'\n"; echo " color: '$widget_label_text_color'\n";
echo " }\n"; echo " }\n";
echo " }\n"; echo " }\n";
echo " }\n"; echo " }\n";
@@ -205,7 +205,7 @@ if (!isset($dashboard_chart_type) || $dashboard_chart_type == "doughnut") {
echo " ctx.font = chart_text_size + ' ' + chart_text_font;\n"; echo " ctx.font = chart_text_size + ' ' + chart_text_font;\n";
echo " ctx.textBaseline = 'middle';\n"; echo " ctx.textBaseline = 'middle';\n";
echo " ctx.textAlign = 'center';\n"; echo " ctx.textAlign = 'center';\n";
echo " ctx.fillStyle = '$dashboard_number_text_color';\n"; echo " ctx.fillStyle = '$widget_number_text_color';\n";
echo " ctx.fillText(options.text, width / 2, top + (height / 2));\n"; echo " ctx.fillText(options.text, width / 2, top + (height / 2));\n";
echo " ctx.save();\n"; echo " ctx.save();\n";
echo " }\n"; echo " }\n";
@@ -214,12 +214,12 @@ if (!isset($dashboard_chart_type) || $dashboard_chart_type == "doughnut") {
echo " );\n"; echo " );\n";
echo " </script>\n"; echo " </script>\n";
} }
if ($dashboard_chart_type == "number") { if ($widget_chart_type == "number") {
echo " <span class='hud_stat'>".$total_services."</span>"; echo " <span class='hud_stat'>".$total_services."</span>";
} }
echo " </div>\n"; echo " </div>\n";
if ($dashboard_details_state != 'disabled') { if ($widget_details_state != 'disabled') {
echo " <div class='hud_details hud_box' id='hud_system_services_details'>\n"; echo " <div class='hud_details hud_box' id='hud_system_services_details'>\n";
echo " <table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n"; echo " <table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo " <tr>\n"; echo " <tr>\n";

View File

@@ -120,10 +120,10 @@
<?php <?php
//show the results //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"; 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> <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.font = chart_text_size + ' ' + chart_text_font;
ctx.textBaseline = 'middle'; ctx.textBaseline = 'middle';
ctx.textAlign = 'center'; 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.fillText(options.text + '%', width / 2, top + (height / 2) + 35);
ctx.save(); ctx.save();
} }
@@ -178,33 +178,33 @@
<?php <?php
} }
if ($dashboard_chart_type == "number") { if ($widget_chart_type == "number") {
echo " <span class='hud_stat'>".round($percent_disk_usage)."%</span>"; 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 //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 " <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 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>\n";
echo " <div style='width: 100%; height: 15px'>&nbsp;</div>\n"; echo " <div style='width: 100%; height: 15px'>&nbsp;</div>\n";
} }
//disk usage //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 " <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_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>\n";
echo " <div style='width: 100%; height: 15px'>&nbsp;</div>\n"; echo " <div style='width: 100%; height: 15px'>&nbsp;</div>\n";
} }
//percent memory //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 " <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_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"; echo " </div>\n";
} }
} }
@@ -212,7 +212,7 @@
echo " </div>\n"; 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 "<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 "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr>\n"; echo "<tr>\n";

View File

@@ -1,45 +1,48 @@
<?php <?php
//time conditions icon //time conditions icon
$array['dashboard'][$x]['dashboard_uuid'] = 'e9f06ed4-ddfc-4611-b246-fdeab36a49ca'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Time Conditions'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'e9f06ed4-ddfc-4611-b246-fdeab36a49ca';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard_widgets'][$x]['widget_name'] = 'Time Conditions';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-clock'; $array['dashboard_widgets'][$x]['widget_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-clock';
$array['dashboard'][$x]['dashboard_url'] = '/app/time_conditions/time_conditions.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#0292ff';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/time_conditions/time_conditions.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '57214759-8195-40cd-8085-607d1d57e7c3'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'e9f06ed4-ddfc-4611-b246-fdeab36a49ca'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '57214759-8195-40cd-8085-607d1d57e7c3';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'e9f06ed4-ddfc-4611-b246-fdeab36a49ca';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'da24bced-cefd-4567-90e3-4bf971dcd007'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'e9f06ed4-ddfc-4611-b246-fdeab36a49ca'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'da24bced-cefd-4567-90e3-4bf971dcd007';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'e9f06ed4-ddfc-4611-b246-fdeab36a49ca';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
?> ?>

View File

@@ -1,93 +1,101 @@
<?php <?php
//new messages //new messages
$array['dashboard'][$x]['dashboard_uuid'] = 'be2aaa22-d8f1-4d9b-b5f9-14a26da329cb'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'New Messages'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'be2aaa22-d8f1-4d9b-b5f9-14a26da329cb';
$array['dashboard'][$x]['dashboard_path'] = 'voicemails/voicemails'; $array['dashboard_widgets'][$x]['widget_name'] = 'New Messages';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-envelope'; $array['dashboard_widgets'][$x]['widget_path'] = 'voicemails/voicemails';
$array['dashboard'][$x]['dashboard_icon_color'] = '#bfbfbf'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-solid fa-envelope';
$array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#bfbfbf';
$array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard_widgets'][$x]['widget_url'] = '';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = '';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'icon'; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['number', 'doughnut', 'icon']; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'icon';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['number', 'doughnut', 'icon'];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_number_background_color'] = '#03c04a'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '#03c04a';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '70'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '70';
$array['dashboard'][$x]['dashboard_description'] = 'Count the new voicemail messages and list of assigned voicemail boxes.'; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = 'Count the new voicemail messages and list of assigned voicemail boxes.';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '05466c38-88cd-456c-98cd-4cbf323af04f'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'be2aaa22-d8f1-4d9b-b5f9-14a26da329cb'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '05466c38-88cd-456c-98cd-4cbf323af04f';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'be2aaa22-d8f1-4d9b-b5f9-14a26da329cb';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '5320e3a7-255e-49b0-9ff5-172f590dcdf1'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'be2aaa22-d8f1-4d9b-b5f9-14a26da329cb'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '5320e3a7-255e-49b0-9ff5-172f590dcdf1';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'be2aaa22-d8f1-4d9b-b5f9-14a26da329cb';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '9052c80b-802f-4111-baa4-202a41ec7ffc'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'be2aaa22-d8f1-4d9b-b5f9-14a26da329cb'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '9052c80b-802f-4111-baa4-202a41ec7ffc';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'be2aaa22-d8f1-4d9b-b5f9-14a26da329cb';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'user';
$x++; $x++;
//voicemails icon //voicemails icon
$array['dashboard'][$x]['dashboard_uuid'] = '230f2857-f14a-44cd-9c33-577f26a5ce45'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Voicemails'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '230f2857-f14a-44cd-9c33-577f26a5ce45';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard_widgets'][$x]['widget_name'] = 'Voicemails';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-envelope'; $array['dashboard_widgets'][$x]['widget_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_url'] = '/app/voicemails/voicemails.php'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-envelope';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/voicemails/voicemails.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '#5d5ce3'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '#5d5ce3';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '5cbfb1a3-87fb-4e9a-bc78-fb9a91690b04'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '230f2857-f14a-44cd-9c33-577f26a5ce45'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '5cbfb1a3-87fb-4e9a-bc78-fb9a91690b04';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '230f2857-f14a-44cd-9c33-577f26a5ce45';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '53235026-b515-441e-95a4-1ca0d57d2e65'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '230f2857-f14a-44cd-9c33-577f26a5ce45'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '53235026-b515-441e-95a4-1ca0d57d2e65';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '230f2857-f14a-44cd-9c33-577f26a5ce45';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '34912b18-603c-4cff-8542-4ef3bc708fc5'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '230f2857-f14a-44cd-9c33-577f26a5ce45'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '34912b18-603c-4cff-8542-4ef3bc708fc5';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '230f2857-f14a-44cd-9c33-577f26a5ce45';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'user';
$y++; $y++;
?> ?>

View File

@@ -49,10 +49,10 @@
} }
} }
echo "<div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_voicemail_details').slideToggle('fast');\"").">\n"; echo "<div class='hud_content' ".($widget_details_state == "disabled" ?: "onclick=\"$('#hud_voicemail_details').slideToggle('fast');\"").">\n";
echo " <span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/voicemails/voicemail_messages.php'\">".$text['label-new_messages']."</a></span>"; echo " <span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/voicemails/voicemail_messages.php'\">".$text['label-new_messages']."</a></span>";
if (isset($dashboard_chart_type) && $dashboard_chart_type == "doughnut") { if (isset($widget_chart_type) && $widget_chart_type == "doughnut") {
//add doughnut chart //add doughnut chart
?> ?>
<div class='hud_chart'><canvas id='new_messages_chart'></canvas></div> <div class='hud_chart'><canvas id='new_messages_chart'></canvas></div>
@@ -87,7 +87,7 @@
ctx.font = chart_text_size + ' ' + chart_text_font; ctx.font = chart_text_size + ' ' + chart_text_font;
ctx.textBaseline = 'middle'; ctx.textBaseline = 'middle';
ctx.textAlign = 'center'; 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)); ctx.fillText(options.text, width / 2, top + (height / 2));
ctx.save(); ctx.save();
} }
@@ -99,21 +99,21 @@
} }
//dashboard number //dashboard number
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "number") { if (!isset($widget_chart_type) || $widget_chart_type == "number") {
echo " <span class='hud_stat'>".$messages['new']."</span>"; echo " <span class='hud_stat'>".$messages['new']."</span>";
} }
//dashboard icon //dashboard icon
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "icon") { if (!isset($widget_chart_type) || $widget_chart_type == "icon") {
echo " <div style='position: relative; display: inline-block;'>\n"; echo " <div style='position: relative; display: inline-block;'>\n";
echo " <span class='hud_stat'><i class=\"fas ".$dashboard_icon." \"></i></span>\n"; echo " <span class='hud_stat'><i class=\"fas ".$widget_icon." \"></i></span>\n";
echo " <span style=\"background-color: ".(!empty($dashboard_number_background_color) ? $dashboard_number_background_color : '#03c04a')."; color: ".(!empty($dashboard_number_text_color) ? $dashboard_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 23px; left: 24.5px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$messages['new']."</span>\n"; echo " <span style=\"background-color: ".(!empty($widget_number_background_color) ? $widget_number_background_color : '#03c04a')."; color: ".(!empty($widget_number_text_color) ? $widget_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 23px; left: 24.5px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$messages['new']."</span>\n";
echo " </div>\n"; echo " </div>\n";
} }
echo "</div>\n"; echo "</div>\n";
if ($dashboard_details_state != 'disabled') { if ($widget_details_state != 'disabled') {
echo "<div class='hud_details hud_box' id='hud_voicemail_details'>"; echo "<div class='hud_details hud_box' id='hud_voicemail_details'>";
if (!empty($voicemails) && sizeof($voicemails) > 0) { if (!empty($voicemails) && sizeof($voicemails) > 0) {
echo "<table class='tr_hover' cellpadding='2' cellspacing='0' border='0' width='100%'>"; echo "<table class='tr_hover' cellpadding='2' cellspacing='0' border='0' width='100%'>";

View File

@@ -1,141 +1,153 @@
<?php <?php
//missed calls //missed calls
$array['dashboard'][$x]['dashboard_uuid'] = '6ad0e056-bf3d-465a-956d-bd77d513ab36'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Missed Calls'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '6ad0e056-bf3d-465a-956d-bd77d513ab36';
$array['dashboard'][$x]['dashboard_path'] = 'xml_cdr/missed_calls'; $array['dashboard_widgets'][$x]['widget_name'] = 'Missed Calls';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-circle-xmark'; $array['dashboard_widgets'][$x]['widget_path'] = 'xml_cdr/missed_calls';
$array['dashboard'][$x]['dashboard_icon_color'] = '#bfbfbf'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-solid fa-circle-xmark';
$array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#bfbfbf';
$array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard_widgets'][$x]['widget_url'] = '';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = '';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'icon'; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['number', 'doughnut', 'icon']; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'icon';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['number', 'doughnut', 'icon'];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_number_background_color'] = '#EA4C46'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '#EA4C46';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '70'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '70';
$array['dashboard'][$x]['dashboard_description'] = 'Show number and list of calls that were missed.'; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = 'Show number and list of calls that were missed.';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '85573555-7e18-4449-aa59-a264a7addda9'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '6ad0e056-bf3d-465a-956d-bd77d513ab36'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '85573555-7e18-4449-aa59-a264a7addda9';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '6ad0e056-bf3d-465a-956d-bd77d513ab36';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'cde35063-58ca-4cdd-94fa-a1c4ee03e66c'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '6ad0e056-bf3d-465a-956d-bd77d513ab36'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'cde35063-58ca-4cdd-94fa-a1c4ee03e66c';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '6ad0e056-bf3d-465a-956d-bd77d513ab36';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'b6e6c697-5351-484c-808d-884589c6d527'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '6ad0e056-bf3d-465a-956d-bd77d513ab36'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'b6e6c697-5351-484c-808d-884589c6d527';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '6ad0e056-bf3d-465a-956d-bd77d513ab36';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'user';
$x++; $x++;
//recent calls //recent calls
$array['dashboard'][$x]['dashboard_uuid'] = 'c323e296-b1cf-42ea-9c57-fc00697915b7'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Recent Calls'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'c323e296-b1cf-42ea-9c57-fc00697915b7';
$array['dashboard'][$x]['dashboard_path'] = 'xml_cdr/recent_calls'; $array['dashboard_widgets'][$x]['widget_name'] = 'Recent Calls';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-rectangle-list'; $array['dashboard_widgets'][$x]['widget_path'] = 'xml_cdr/recent_calls';
$array['dashboard'][$x]['dashboard_icon_color'] = '#bfbfbf'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-solid fa-rectangle-list';
$array['dashboard'][$x]['dashboard_url'] = ''; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#bfbfbf';
$array['dashboard'][$x]['dashboard_target'] = ''; $array['dashboard_widgets'][$x]['widget_url'] = '';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = '';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'icon'; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['number', 'doughnut', 'icon']; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'icon';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['number', 'doughnut', 'icon'];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_number_background_color'] = '#417ed3'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '#417ed3';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'hidden'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '70'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'hidden';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '70';
$array['dashboard'][$x]['dashboard_description'] = 'List of recent calls.'; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = 'List of recent calls.';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '976018d2-ed21-4ccd-a95c-ef7e36c1134e'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'c323e296-b1cf-42ea-9c57-fc00697915b7'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '976018d2-ed21-4ccd-a95c-ef7e36c1134e';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'c323e296-b1cf-42ea-9c57-fc00697915b7';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '62e53c42-aa15-4a4a-abf0-fb8cd37bafad'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'c323e296-b1cf-42ea-9c57-fc00697915b7'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '62e53c42-aa15-4a4a-abf0-fb8cd37bafad';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'c323e296-b1cf-42ea-9c57-fc00697915b7';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'a923b923-f1c9-4244-abfd-132c5a2f5b6e'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'c323e296-b1cf-42ea-9c57-fc00697915b7'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'a923b923-f1c9-4244-abfd-132c5a2f5b6e';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'c323e296-b1cf-42ea-9c57-fc00697915b7';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'user';
$x++; $x++;
//call detail records icon //call detail records icon
$array['dashboard'][$x]['dashboard_uuid'] = '7fb8c79b-3fc4-4977-992a-eb0404f80fe8'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Call Detail Records'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '7fb8c79b-3fc4-4977-992a-eb0404f80fe8';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard_widgets'][$x]['widget_name'] = 'Call Detail Records';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-list-ul'; $array['dashboard_widgets'][$x]['widget_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-list-ul';
$array['dashboard'][$x]['dashboard_url'] = '/app/xml_cdr/xml_cdr.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#0292ff';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/app/xml_cdr/xml_cdr.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '#0292ff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '#0292ff';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'e4054bae-108a-48f1-9a9e-35f7d464af4c'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '7fb8c79b-3fc4-4977-992a-eb0404f80fe8'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'e4054bae-108a-48f1-9a9e-35f7d464af4c';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '7fb8c79b-3fc4-4977-992a-eb0404f80fe8';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'cc976e00-66c4-498d-8a97-383b5ee9dc80'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '7fb8c79b-3fc4-4977-992a-eb0404f80fe8'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'cc976e00-66c4-498d-8a97-383b5ee9dc80';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '7fb8c79b-3fc4-4977-992a-eb0404f80fe8';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '23e473d3-5eb6-4289-beb4-89f37d365ea0'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '7fb8c79b-3fc4-4977-992a-eb0404f80fe8'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '23e473d3-5eb6-4289-beb4-89f37d365ea0';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '7fb8c79b-3fc4-4977-992a-eb0404f80fe8';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'user';
$y++; $y++;
?> ?>

View File

@@ -90,10 +90,10 @@
//missed calls //missed calls
echo "<div class='hud_box'>\n"; echo "<div class='hud_box'>\n";
echo "<div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_missed_calls_details').slideToggle('fast');\"").">\n"; echo "<div class='hud_content' ".($widget_details_state == "disabled" ?: "onclick=\"$('#hud_missed_calls_details').slideToggle('fast');\"").">\n";
echo " <span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/xml_cdr/xml_cdr.php?call_result=missed'\">".$text['label-missed_calls']."</a></span>"; echo " <span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/xml_cdr/xml_cdr.php?call_result=missed'\">".$text['label-missed_calls']."</a></span>";
if ($dashboard_chart_type == "doughnut") { if ($widget_chart_type == "doughnut") {
//add doughnut chart //add doughnut chart
?> ?>
<div class='hud_chart'><canvas id='missed_calls_chart'></canvas></div> <div class='hud_chart'><canvas id='missed_calls_chart'></canvas></div>
@@ -128,7 +128,7 @@
ctx.font = chart_text_size + ' ' + chart_text_font; ctx.font = chart_text_size + ' ' + chart_text_font;
ctx.textBaseline = 'middle'; ctx.textBaseline = 'middle';
ctx.textAlign = 'center'; 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)); ctx.fillText(options.text, width / 2, top + (height / 2));
ctx.save(); ctx.save();
} }
@@ -140,20 +140,20 @@
} }
//dashboard number //dashboard number
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "number") { if (!isset($widget_chart_type) || $widget_chart_type == "number") {
echo "<span class='hud_stat'>".$num_rows."</span>"; echo "<span class='hud_stat'>".$num_rows."</span>";
} }
//dashboard icon //dashboard icon
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "icon") { if (!isset($widget_chart_type) || $widget_chart_type == "icon") {
echo " <div style='position: relative; display: inline-block;'>\n"; echo " <div style='position: relative; display: inline-block;'>\n";
echo " <span class='hud_stat'><i class=\"fas ".$dashboard_icon." \"></i></span>\n"; echo " <span class='hud_stat'><i class=\"fas ".$widget_icon." \"></i></span>\n";
echo " <span style=\"background-color: ".(!empty($dashboard_number_background_color) ? $dashboard_number_background_color : '#EA4C46')."; color: ".(!empty($dashboard_number_text_color) ? $dashboard_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 23px; left: 24.5px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$num_rows."</span>\n"; echo " <span style=\"background-color: ".(!empty($widget_number_background_color) ? $widget_number_background_color : '#EA4C46')."; color: ".(!empty($widget_number_text_color) ? $widget_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 23px; left: 24.5px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$num_rows."</span>\n";
echo " </div>\n"; echo " </div>\n";
} }
echo "</div>\n"; echo "</div>\n";
if ($dashboard_details_state != 'disabled') { if ($widget_details_state != 'disabled') {
echo "<div class='hud_details hud_box' id='hud_missed_calls_details'>"; 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"; echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr>\n"; echo "<tr>\n";

View File

@@ -87,10 +87,10 @@
//recent calls //recent calls
echo "<div class='hud_box'>\n"; echo "<div class='hud_box'>\n";
echo "<div class='hud_content' ".($dashboard_details_state == "disabled" ?: "onclick=\"$('#hud_recent_calls_details').slideToggle('fast');\"").">\n"; echo "<div class='hud_content' ".($widget_details_state == "disabled" ?: "onclick=\"$('#hud_recent_calls_details').slideToggle('fast');\"").">\n";
echo " <span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/xml_cdr/xml_cdr.php';\">".$text['label-recent_calls']."</a></span>\n"; echo " <span class='hud_title'><a onclick=\"document.location.href='".PROJECT_PATH."/app/xml_cdr/xml_cdr.php';\">".$text['label-recent_calls']."</a></span>\n";
if ($dashboard_chart_type == "doughnut") { if ($widget_chart_type == "doughnut") {
//add doughnut chart //add doughnut chart
?> ?>
@@ -126,7 +126,7 @@
ctx.font = chart_text_size + ' ' + chart_text_font; ctx.font = chart_text_size + ' ' + chart_text_font;
ctx.textBaseline = 'middle'; ctx.textBaseline = 'middle';
ctx.textAlign = 'center'; 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)); ctx.fillText(options.text, width / 2, top + (height / 2));
ctx.save(); ctx.save();
} }
@@ -138,21 +138,21 @@
} }
//dashboard numeric //dashboard numeric
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "number") { if (!isset($widget_chart_type) || $widget_chart_type == "number") {
echo "<span class='hud_stat'>".$num_rows."</span>"; echo "<span class='hud_stat'>".$num_rows."</span>";
} }
//dashboard icon //dashboard icon
if (!isset($dashboard_chart_type) || $dashboard_chart_type == "icon") { if (!isset($widget_chart_type) || $widget_chart_type == "icon") {
echo " <div style='position: relative; display: inline-block;'>\n"; echo " <div style='position: relative; display: inline-block;'>\n";
echo " <span class='hud_stat'><i class=\"fas ".$dashboard_icon." \"></i></span>\n"; echo " <span class='hud_stat'><i class=\"fas ".$widget_icon." \"></i></span>\n";
echo " <span style=\"background-color: ".(!empty($dashboard_number_background_color) ? $dashboard_number_background_color : '#417ed3')."; color: ".(!empty($dashboard_number_text_color) ? $dashboard_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 23px; left: 24.5px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$num_rows."</span>\n"; echo " <span style=\"background-color: ".(!empty($widget_number_background_color) ? $widget_number_background_color : '#417ed3')."; color: ".(!empty($widget_number_text_color) ? $widget_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 23px; left: 24.5px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$num_rows."</span>\n";
echo " </div>\n"; echo " </div>\n";
} }
echo "</div>\n"; echo "</div>\n";
if ($dashboard_details_state != 'disabled') { if ($widget_details_state != 'disabled') {
echo "<div class='hud_details hud_box' id='hud_recent_calls_details'>"; 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"; echo "<table class='tr_hover' width='100%' cellpadding='0' cellspacing='0' border='0'>\n";
echo "<tr>\n"; echo "<tr>\n";

View File

@@ -1,45 +1,48 @@
<?php <?php
//contacts //contacts
$array['dashboard'][$x]['dashboard_uuid'] = '3b0cbb2f-733d-4646-8332-7d108808f2fd'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Contacts'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '3b0cbb2f-733d-4646-8332-7d108808f2fd';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard_widgets'][$x]['widget_name'] = 'Contacts';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-regular fa-address-card'; $array['dashboard_widgets'][$x]['widget_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon_color'] = '#0292ff'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-regular fa-address-card';
$array['dashboard'][$x]['dashboard_url'] = '/core/contacts/contacts.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#0292ff';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/core/contacts/contacts.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '#0292FF'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '#0292FF';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'ec16fd64-5333-4372-bb9c-21603358e283'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '3b0cbb2f-733d-4646-8332-7d108808f2fd'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'ec16fd64-5333-4372-bb9c-21603358e283';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '3b0cbb2f-733d-4646-8332-7d108808f2fd';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'c46035ba-9d23-4e77-84a9-c8ffeea48415'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '3b0cbb2f-733d-4646-8332-7d108808f2fd'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'c46035ba-9d23-4e77-84a9-c8ffeea48415';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '3b0cbb2f-733d-4646-8332-7d108808f2fd';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
?> ?>

View File

@@ -27,191 +27,62 @@
$apps[$x]['permissions'][$y]['name'] = 'dashboard_all'; $apps[$x]['permissions'][$y]['name'] = 'dashboard_all';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++; $y++;
$apps[$x]['permissions'][$y]['name'] = 'dashboard_group_view'; $apps[$x]['permissions'][$y]['name'] = 'dashboard_domain';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++; $y++;
$apps[$x]['permissions'][$y]['name'] = 'dashboard_group_add'; $apps[$x]['permissions'][$y]['name'] = 'dashboard_widget_view';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++; $y++;
$apps[$x]['permissions'][$y]['name'] = 'dashboard_group_edit'; $apps[$x]['permissions'][$y]['name'] = 'dashboard_widget_add';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++; $y++;
$apps[$x]['permissions'][$y]['name'] = 'dashboard_group_delete'; $apps[$x]['permissions'][$y]['name'] = 'dashboard_widget_edit';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++; $y++;
$apps[$x]['permissions'][$y]['name'] = 'dashboard_group_all'; $apps[$x]['permissions'][$y]['name'] = 'dashboard_widget_delete';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++; $y++;
$apps[$x]['permissions'][$y]['name'] = 'dashboard_parent_uuid'; $apps[$x]['permissions'][$y]['name'] = 'dashboard_widget_group_view';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'dashboard_widget_group_add';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'dashboard_widget_group_edit';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'dashboard_widget_group_delete';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++;
$apps[$x]['permissions'][$y]['name'] = 'dashboard_widget_parent_uuid';
$apps[$x]['permissions'][$y]['groups'][] = 'superadmin'; $apps[$x]['permissions'][$y]['groups'][] = 'superadmin';
$y++; $y++;
//dashboard //dashboards
$y = 0; $y = 0;
$apps[$x]['db'][$y]['table']['name'] = 'v_dashboard'; $apps[$x]['db'][$y]['table']['name'] = 'v_dashboards';
$apps[$x]['db'][$y]['table']['parent'] = ''; $apps[$x]['db'][$y]['table']['parent'] = '';
$z = 0; $z = 0;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "domain_uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = "foreign";
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = "v_domains";
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = "domain_uuid";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_uuid'; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid'; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)'; $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary'; $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
$z++; $z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_parent_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_name'; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_name';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = ''; $apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard name.'; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard name.';
$z++; $z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_path';
$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 dashboard path.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_icon';
$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 dashboard icon.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_icon_color';
$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 dashboard icon color.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_url';
$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 dashboard url.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_target';
$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 dashboard target.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_width';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard width.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_height';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard height.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_content';
$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 dashboard content.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_content_text_align';
$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'] = 'Select the dashboard content text alignment.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_content_details';
$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 dashboard content details.';
$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_label_enabled';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'boolean';
$apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false'];
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the label enabled';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'dashboard_label_text_color';
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'dashboard_heading_text_color';
$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 label text color.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'dashboard_label_text_color_hover';
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'dashboard_heading_text_color_hover';
$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 label text color hover.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'dashboard_label_background_color';
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'dashboard_heading_background_color';
$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 label background color.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name']['text'] = 'dashboard_label_background_color_hover';
$apps[$x]['db'][$y]['fields'][$z]['name']['deprecated'] = 'dashboard_heading_background_color_hover';
$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 label background color hover.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_number_text_color';
$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 number text color.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_number_text_color_hover';
$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 number text color hover.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_number_background_color';
$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 number background color.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_background_color';
$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 background color.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_background_color_hover';
$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 background color hover.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_detail_background_color';
$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 detail background color.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_background_gradient_style';
$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'] = 'Select a background gradient style.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_background_gradient_angle';
$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'] = 'Select a background gradient angle.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_column_span';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard column span.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_row_span';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard row span.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_details_state';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = 'expanded';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Set the default state of the widget details.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_order';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the dashboard order.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_enabled'; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_enabled';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'boolean'; $apps[$x]['db'][$y]['fields'][$z]['type'] = 'boolean';
$apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false']; $apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false'];
@@ -246,24 +117,232 @@
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)"; $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = ""; $apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
//dashboard groups //dashboard widgets
$y = 5; $y++;
$apps[$x]['db'][$y]['table']['name'] = 'v_dashboard_groups'; $apps[$x]['db'][$y]['table']['name'] = 'v_dashboard_widgets';
$apps[$x]['db'][$y]['table']['parent'] = 'v_dashboard'; $apps[$x]['db'][$y]['table']['parent'] = '';
$z = 0; $z = 0;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_group_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_uuid'; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid'; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text'; $apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)'; $apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign'; $apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_dashboard'; $z++;
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'dashboard_uuid'; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_widget_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_widget_parent_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_name';
$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 widget name.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_path';
$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 widget path.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_icon';
$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 widget icon.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_icon_color';
$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 widget icon color.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_url';
$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 widget url.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_target';
$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 widget target.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_width';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the widget width.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_height';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the widget height.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_content';
$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 widget content.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_content_text_align';
$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'] = 'Select the dashboard content text alignment.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_content_details';
$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 widget content details.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_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'] = 'widget_label_enabled';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'boolean';
$apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false'];
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the label enabled';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_label_text_color';
$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 label text color.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_label_text_color_hover';
$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 label text color hover.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_label_background_color';
$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 label background color.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_label_background_color_hover';
$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 label background color hover.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_number_text_color';
$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 number text color.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_number_text_color_hover';
$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 number text color hover.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_number_background_color';
$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 number background color.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_background_color';
$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 background color.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_background_color_hover';
$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 background color hover.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_detail_background_color';
$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 detail background color.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_background_gradient_style';
$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'] = 'Select a background gradient style.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_background_gradient_angle';
$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'] = 'Select a background gradient angle.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_column_span';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the widget column span.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_row_span';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the widget row span.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_details_state';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = 'expanded';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Set the default state of the widget details.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_order';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'numeric';
$apps[$x]['db'][$y]['fields'][$z]['search_by'] = '';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the widget order.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_enabled';
$apps[$x]['db'][$y]['fields'][$z]['type'] = 'boolean';
$apps[$x]['db'][$y]['fields'][$z]['toggle'] = ['true','false'];
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = 'Enter the widget enabled.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'widget_description';
$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 widget description.';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "insert_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_date";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'timestamptz';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'date';
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = "update_user";
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = "uuid";
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = "text";
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = "char(36)";
$apps[$x]['db'][$y]['fields'][$z]['description']['en-us'] = "";
//dashboard widget groups
$y++;
$apps[$x]['db'][$y]['table']['name'] = 'v_dashboard_widget_groups';
$apps[$x]['db'][$y]['table']['parent'] = 'v_dashboard_widgets';
$z = 0;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_widget_group_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'primary';
$z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'dashboard_widget_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['sqlite'] = 'text';
$apps[$x]['db'][$y]['fields'][$z]['type']['mysql'] = 'char(36)';
$apps[$x]['db'][$y]['fields'][$z]['key']['type'] = 'foreign';
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['table'] = 'v_dashboard_widgets';
$apps[$x]['db'][$y]['fields'][$z]['key']['reference']['field'] = 'dashboard_widget_uuid';
$z++; $z++;
$apps[$x]['db'][$y]['fields'][$z]['name'] = 'group_uuid'; $apps[$x]['db'][$y]['fields'][$z]['name'] = 'group_uuid';
$apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid'; $apps[$x]['db'][$y]['fields'][$z]['type']['pgsql'] = 'uuid';

View File

@@ -7,6 +7,133 @@ if ($domains_processed == 1) {
unset($array); unset($array);
} }
//migrate widget data
$sql = "select * from v_dashboard_widgets ";
$new_table = $database->select($sql, null, 'all');
unset($sql, $parameters);
$sql = "select * from v_dashboard ";
$old_table = $database->select($sql, null, 'all');
unset($sql, $parameters);
if (empty($new_table) && !empty($old_table)) {
$sql = "INSERT INTO v_dashboard_widgets ( ";
$sql .= " dashboard_uuid, ";
$sql .= " dashboard_widget_uuid, ";
$sql .= " dashboard_widget_parent_uuid, ";
$sql .= " widget_name, ";
$sql .= " widget_path, ";
$sql .= " widget_icon, ";
$sql .= " widget_icon_color, ";
$sql .= " widget_url, ";
$sql .= " widget_target, ";
$sql .= " widget_width, ";
$sql .= " widget_height, ";
$sql .= " widget_content, ";
$sql .= " widget_content_text_align, ";
$sql .= " widget_content_details, ";
$sql .= " widget_chart_type, ";
$sql .= " widget_label_enabled, ";
$sql .= " widget_label_text_color, ";
$sql .= " widget_label_text_color_hover, ";
$sql .= " widget_label_background_color, ";
$sql .= " widget_label_background_color_hover, ";
$sql .= " widget_number_text_color, ";
$sql .= " widget_number_text_color_hover, ";
$sql .= " widget_number_background_color, ";
$sql .= " widget_background_color, ";
$sql .= " widget_background_color_hover, ";
$sql .= " widget_detail_background_color, ";
$sql .= " widget_background_gradient_style, ";
$sql .= " widget_background_gradient_angle, ";
$sql .= " widget_column_span, ";
$sql .= " widget_row_span, ";
$sql .= " widget_details_state, ";
$sql .= " widget_order, ";
$sql .= " widget_enabled, ";
$sql .= " widget_description, ";
$sql .= " insert_date, ";
$sql .= " insert_user, ";
$sql .= " update_date, ";
$sql .= " update_user ";
$sql .= ") ";
$sql .= "SELECT ";
$sql .= " '3e2cbaa4-2bec-41b2-a626-999a59b8b19c', ";
$sql .= " dashboard_uuid, ";
$sql .= " dashboard_parent_uuid, ";
$sql .= " dashboard_name, ";
$sql .= " dashboard_path, ";
$sql .= " dashboard_icon, ";
$sql .= " dashboard_icon_color, ";
$sql .= " dashboard_url, ";
$sql .= " dashboard_target, ";
$sql .= " dashboard_width, ";
$sql .= " dashboard_height, ";
$sql .= " dashboard_content, ";
$sql .= " dashboard_content_text_align, ";
$sql .= " dashboard_content_details, ";
$sql .= " dashboard_chart_type, ";
$sql .= " dashboard_label_enabled, ";
$sql .= " dashboard_label_text_color, ";
$sql .= " dashboard_label_text_color_hover, ";
$sql .= " dashboard_label_background_color, ";
$sql .= " dashboard_label_background_color_hover, ";
$sql .= " dashboard_number_text_color, ";
$sql .= " dashboard_number_text_color_hover, ";
$sql .= " dashboard_number_background_color, ";
$sql .= " dashboard_background_color, ";
$sql .= " dashboard_background_color_hover, ";
$sql .= " dashboard_detail_background_color, ";
$sql .= " dashboard_background_gradient_style, ";
$sql .= " dashboard_background_gradient_angle, ";
$sql .= " dashboard_column_span, ";
$sql .= " dashboard_row_span, ";
$sql .= " dashboard_details_state, ";
$sql .= " dashboard_order, ";
$sql .= " dashboard_enabled, ";
$sql .= " dashboard_description, ";
$sql .= " insert_date, ";
$sql .= " insert_user, ";
$sql .= " update_date, ";
$sql .= " update_user ";
$sql .= "FROM v_dashboard; ";
$database->execute($sql);
unset($sql, $parameters);
}
$sql = "select * from v_dashboard_widget_groups ";
$new_groups = $database->select($sql, null, 'all');
unset($sql, $parameters);
$sql = "select * from v_dashboard_groups ";
$old_groups = $database->select($sql, null, 'all');
unset($sql, $parameters);
if (empty($new_groups) && !empty($old_groups)) {
$sql = "INSERT INTO v_dashboard_widget_groups ( ";
$sql .= " dashboard_uuid, ";
$sql .= " dashboard_widget_group_uuid, ";
$sql .= " dashboard_widget_uuid, ";
$sql .= " group_uuid, ";
$sql .= " insert_date, ";
$sql .= " insert_user, ";
$sql .= " update_date, ";
$sql .= " update_user ";
$sql .= ") ";
$sql .= "SELECT ";
$sql .= " '3e2cbaa4-2bec-41b2-a626-999a59b8b19c', ";
$sql .= " dashboard_group_uuid, ";
$sql .= " dashboard_uuid, ";
$sql .= " group_uuid, ";
$sql .= " insert_date, ";
$sql .= " insert_user, ";
$sql .= " update_date, ";
$sql .= " update_user ";
$sql .= "FROM v_dashboard_groups; ";
$database->execute($sql);
unset($sql, $parameters);
}
//make the default groups exist //make the default groups exist
$group = new groups; $group = new groups;
$group->defaults(); $group->defaults();
@@ -16,15 +143,67 @@ if ($domains_processed == 1) {
$sql .= "where domain_uuid is null "; $sql .= "where domain_uuid is null ";
$groups = $database->select($sql, null, 'all'); $groups = $database->select($sql, null, 'all');
//get the dashboards
$sql = "select ";
$sql .= "domain_uuid, ";
$sql .= "dashboard_uuid, ";
$sql .= "dashboard_name, ";
$sql .= "cast(dashboard_enabled as text), ";
$sql .= "dashboard_description, ";
$sql .= "domain_uuid ";
$sql .= "from v_dashboards ";
$dashboard_widgets = $database->select($sql, null, 'all');
unset($sql, $parameters);
//add the dashboards
$dashboard_config_file = glob($_SERVER["DOCUMENT_ROOT"].PROJECT_PATH.'/core/dashboard/resources/dashboard/config.php');
$x = 0;
foreach($dashboard_config_file as $file) {
include ($file);
$x++;
}
$dashboards = $array;
unset($array);
//build the array
$x = 0;
foreach($dashboards['dashboards'] as $row) {
//check if the dashboard is already in the database
$dashboard_found = false;
foreach($dashboard_widgets as $dashboard_widget) {
if ($dashboard_widget['dashboard_uuid'] == $row['dashboard_uuid']) {
$dashboard_found = true;
}
}
//add the dashboard to the array
if (!$dashboard_found) {
$array['dashboards'][$x]['dashboard_uuid'] = $row['dashboard_uuid'];
$array['dashboards'][$x]['dashboard_name'] = $row['dashboard_name'];
$array['dashboards'][$x]['dashboard_enabled'] = $row['dashboard_enabled'];
$array['dashboards'][$x]['dashboard_description'] = $row['dashboard_description'];
$x++;
}
}
//exit;
//save the data
if (!empty($array)) {
$database->app_name = 'dashboard';
$database->app_uuid = '55533bef-4f04-434a-92af-999c1e9927f7';
$database->save($array, false);
}
unset($array);
//get the dashboard //get the dashboard
$sql = "select "; $sql = "select ";
$sql .= "dashboard_uuid, "; $sql .= "dashboard_uuid, ";
$sql .= "dashboard_name, "; $sql .= "dashboard_widget_uuid, ";
$sql .= "dashboard_path, "; $sql .= "widget_name, ";
$sql .= "dashboard_order, "; $sql .= "widget_path, ";
$sql .= "cast(dashboard_enabled as text), "; $sql .= "widget_order, ";
$sql .= "dashboard_description "; $sql .= "cast(widget_enabled as text), ";
$sql .= "from v_dashboard "; $sql .= "widget_description ";
$sql .= "from v_dashboard_widgets ";
$dashboard_widgets = $database->select($sql, null, 'all'); $dashboard_widgets = $database->select($sql, null, 'all');
unset($sql, $parameters); unset($sql, $parameters);
@@ -40,55 +219,58 @@ if ($domains_processed == 1) {
//build the array //build the array
$x = 0; $x = 0;
foreach($widgets['dashboard'] as $row) { foreach($widgets['dashboard_widgets'] as $row) {
//check if the dashboard widget is already in the database //check if the dashboard widget is already in the database
$dashboard_found = false; $widget_found = false;
foreach($dashboard_widgets as $dashboard_widget) { foreach($dashboard_widgets as $dashboard_widget) {
if ($dashboard_widget['dashboard_uuid'] == $row['dashboard_uuid']) { if ($dashboard_widget['dashboard_widget_uuid'] == $row['dashboard_widget_uuid']) {
$dashboard_found = true; $widget_found = true;
} }
} }
//add the dashboard widget to the array //add the dashboard widget to the array
if (!$dashboard_found) { if (!$widget_found) {
$array['dashboard'][$x]['dashboard_uuid'] = $row['dashboard_uuid']; $array['dashboard_widgets'][$x]['dashboard_uuid'] = $row['dashboard_uuid'];
$array['dashboard'][$x]['dashboard_name'] = $row['dashboard_name']; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = $row['dashboard_widget_uuid'];
$array['dashboard'][$x]['dashboard_path'] = $row['dashboard_path']; $array['dashboard_widgets'][$x]['widget_name'] = $row['widget_name'];
$array['dashboard'][$x]['dashboard_chart_type'] = $row['dashboard_chart_type']; $array['dashboard_widgets'][$x]['widget_path'] = $row['widget_path'];
$array['dashboard'][$x]['dashboard_column_span'] = $row['dashboard_column_span'] ?? 1; $array['dashboard_widgets'][$x]['widget_chart_type'] = $row['widget_chart_type'];
$array['dashboard'][$x]['dashboard_row_span'] = $row['dashboard_row_span'] ?? 1; $array['dashboard_widgets'][$x]['widget_column_span'] = $row['widget_column_span'] ?? 1;
$array['dashboard'][$x]['dashboard_details_state'] = $row['dashboard_details_state']; $array['dashboard_widgets'][$x]['widget_row_span'] = $row['widget_row_span'] ?? 1;
$array['dashboard'][$x]['dashboard_order'] = $row['dashboard_order']; $array['dashboard_widgets'][$x]['widget_details_state'] = $row['widget_details_state'];
$array['dashboard'][$x]['dashboard_enabled'] = $row['dashboard_enabled']; $array['dashboard_widgets'][$x]['widget_order'] = $row['widget_order'];
$array['dashboard'][$x]['dashboard_description'] = $row['dashboard_description']; $array['dashboard_widgets'][$x]['widget_enabled'] = $row['widget_enabled'];
$array['dashboard'][$x]['dashboard_label_enabled'] = $row['dashboard_label_enabled'] ?? 'true'; $array['dashboard_widgets'][$x]['widget_description'] = $row['widget_description'];
if (!empty($row['dashboard_label_text_color'])) { $array['dashboard'][$x]['dashboard_label_text_color'] = $row['dashboard_label_text_color']; } $array['dashboard_widgets'][$x]['widget_label_enabled'] = $row['widget_label_enabled'] ?? 'true';
if (!empty($row['dashboard_label_text_color_hover'])) { $array['dashboard'][$x]['dashboard_label_text_color_hover'] = $row['dashboard_label_text_color_hover']; } if (!empty($row['widget_label_text_color'])) { $array['dashboard_widgets'][$x]['widget_label_text_color'] = $row['widget_label_text_color']; }
if (!empty($row['dashboard_number_text_color'])) { $array['dashboard'][$x]['dashboard_number_text_color'] = $row['dashboard_number_text_color']; } if (!empty($row['widget_label_text_color_hover'])) { $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = $row['widget_label_text_color_hover']; }
if (!empty($row['dashboard_number_text_color_hover'])) { $array['dashboard'][$x]['dashboard_number_text_color_hover'] = $row['dashboard_number_text_color_hover']; } if (!empty($row['widget_number_text_color'])) { $array['dashboard_widgets'][$x]['widget_number_text_color'] = $row['widget_number_text_color']; }
if (!empty($row['dashboard_number_background_color'])) { $array['dashboard'][$x]['dashboard_number_background_color'] = $row['dashboard_number_background_color']; } if (!empty($row['widget_number_text_color_hover'])) { $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = $row['widget_number_text_color_hover']; }
if (!empty($row['dashboard_icon'])) { $array['dashboard'][$x]['dashboard_icon'] = $row['dashboard_icon']; } if (!empty($row['widget_number_background_color'])) { $array['dashboard_widgets'][$x]['widget_number_background_color'] = $row['widget_number_background_color']; }
if (!empty($row['dashboard_icon_color'])) { $array['dashboard'][$x]['dashboard_icon_color'] = $row['dashboard_icon_color']; } if (!empty($row['widget_icon'])) { $array['dashboard_widgets'][$x]['widget_icon'] = $row['widget_icon']; }
if (!empty($row['dashboard_url'])) { $array['dashboard'][$x]['dashboard_url'] = $row['dashboard_url']; } if (!empty($row['widget_icon_color'])) { $array['dashboard_widgets'][$x]['widget_icon_color'] = $row['widget_icon_color']; }
if (!empty($row['dashboard_width'])) { $array['dashboard'][$x]['dashboard_width'] = $row['dashboard_width']; } if (!empty($row['widget_url'])) { $array['dashboard_widgets'][$x]['widget_url'] = $row['widget_url']; }
if (!empty($row['dashboard_height'])) { $array['dashboard'][$x]['dashboard_height'] = $row['dashboard_height']; } if (!empty($row['widget_width'])) { $array['dashboard_widgets'][$x]['widget_width'] = $row['widget_width']; }
if (!empty($row['dashboard_target'])) { $array['dashboard'][$x]['dashboard_target'] = $row['dashboard_target']; } if (!empty($row['widget_height'])) { $array['dashboard_widgets'][$x]['widget_height'] = $row['widget_height']; }
if (!empty($row['dashboard_label_background_color'])) { $array['dashboard'][$x]['dashboard_label_background_color'] = $row['dashboard_label_background_color']; } if (!empty($row['widget_target'])) { $array['dashboard_widgets'][$x]['widget_target'] = $row['widget_target']; }
if (!empty($row['dashboard_label_background_color_hover'])) { $array['dashboard'][$x]['dashboard_label_background_color_hover'] = $row['dashboard_label_background_color_hover']; } if (!empty($row['widget_label_background_color'])) { $array['dashboard_widgets'][$x]['widget_label_background_color'] = $row['widget_label_background_color']; }
if (!empty($row['dashboard_background_color'])) { $array['dashboard'][$x]['dashboard_background_color'] = $row['dashboard_background_color']; } if (!empty($row['widget_label_background_color_hover'])) { $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = $row['widget_label_background_color_hover']; }
if (!empty($row['dashboard_background_color_hover'])) { $array['dashboard'][$x]['dashboard_background_color_hover'] = $row['dashboard_background_color_hover']; } if (!empty($row['widget_background_color'])) { $array['dashboard_widgets'][$x]['widget_background_color'] = $row['widget_background_color']; }
if (!empty($row['dashboard_detail_background_color'])) { $array['dashboard'][$x]['dashboard_detail_background_color'] = $row['dashboard_detail_background_color']; } if (!empty($row['widget_background_color_hover'])) { $array['dashboard_widgets'][$x]['widget_background_color_hover'] = $row['widget_background_color_hover']; }
if (!empty($row['dashboard_content'])) { $array['dashboard'][$x]['dashboard_content'] = $row['dashboard_content']; } if (!empty($row['widget_detail_background_color'])) { $array['dashboard_widgets'][$x]['widget_detail_background_color'] = $row['widget_detail_background_color']; }
if (!empty($row['dashboard_content_details'])) { $array['dashboard'][$x]['dashboard_content_details'] = $row['dashboard_content_details']; } if (!empty($row['widget_content'])) { $array['dashboard_widgets'][$x]['widget_content'] = $row['widget_content']; }
if (!empty($row['widget_content_details'])) { $array['dashboard_widgets'][$x]['widget_content_details'] = $row['widget_content_details']; }
if (!empty($row['dashboard_widget_parent_uuid'])) { $array['dashboard_widgets'][$x]['dashboard_widget_parent_uuid'] = $row['dashboard_widget_parent_uuid']; }
$y = 0; $y = 0;
if (!empty($row['dashboard_groups'])) { if (!empty($row['dashboard_widget_groups'])) {
foreach ($row['dashboard_groups'] as $row) { foreach ($row['dashboard_widget_groups'] as $row) {
if (isset($row['group_name'])) { if (isset($row['group_name'])) {
foreach($groups as $field) { foreach($groups as $field) {
if ($row['group_name'] == $field['group_name']) { if ($row['group_name'] == $field['group_name']) {
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = $row['dashboard_group_uuid']; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = $row['dashboard_uuid'];
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = $row['dashboard_uuid']; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = $row['dashboard_widget_group_uuid'];
$array['dashboard'][$x]['dashboard_groups'][$y]['group_uuid'] = $field['group_uuid']; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = $row['dashboard_widget_uuid'];
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_uuid'] = $field['group_uuid'];
} }
} }
$y++; $y++;
@@ -118,10 +300,10 @@ if ($domains_processed == 1) {
$p->delete('dashboard_group_add', 'temp'); $p->delete('dashboard_group_add', 'temp');
//update dashboard icons to be prefixed with v6.x font awesome style class name (e.g. 'fa-solid ') //update dashboard icons to be prefixed with v6.x font awesome style class name (e.g. 'fa-solid ')
$queries[] = "update v_dashboard set dashboard_icon = concat('fa-solid ', dashboard_icon) where dashboard_icon is not null and dashboard_icon not like 'fa-solid fa-%' and dashboard_icon not like 'fa-regular fa-%' and dashboard_icon not like 'fa-brands fa-%' "; $queries[] = "update v_dashboard_widgets set widget_icon = concat('fa-solid ', widget_icon) where widget_icon is not null and widget_icon not like 'fa-solid fa-%' and widget_icon not like 'fa-regular fa-%' and widget_icon not like 'fa-brands fa-%' ";
//simplify the dashboard path //simplify the dashboard path
$queries[] = "update v_dashboard set dashboard_path = regexp_replace(dashboard_path, 'app/|core/|resources/dashboard/|\.php', '', 'g') where dashboard_path like '%.php';"; $queries[] = "update v_dashboard_widgets set widget_path = regexp_replace(widget_path, 'app/|core/|resources/dashboard/|\.php', '', 'g') where widget_path like '%.php';";
//execute array of queries //execute array of queries
foreach ($queries as $sql) { foreach ($queries as $sql) {

File diff suppressed because it is too large Load Diff

View File

@@ -38,33 +38,36 @@
$language = new text; $language = new text;
$text = $language->get(); $text = $language->get();
//set additional variables
$search = $_GET["search"] ?? '';
$show = $_GET["show"] ?? '';
//get the http post data //get the http post data
if (!empty($_POST['dashboard'])) { if (!empty($_POST['dashboards'])) {
$action = $_POST['action']; $action = $_POST['action'];
$search = $_POST['search']; $search = $_POST['search'];
$dashboard = $_POST['dashboard']; $dashboards = $_POST['dashboards'];
} }
//process the http post data by action //process the http post data by action
if (!empty($action) && is_array($dashboard) && @sizeof($dashboard) != 0) { if (!empty($action) && is_array($dashboards) && @sizeof($dashboards) != 0) {
switch ($action) { switch ($action) {
case 'copy': case 'copy':
if (permission_exists('dashboard_add')) { if (permission_exists('dashboard_add')) {
$obj = new dashboard; $obj = new dashboard;
$obj->copy($dashboard); $obj->copy($dashboards);
} }
break; break;
case 'toggle': case 'toggle':
if (permission_exists('dashboard_edit')) { if (permission_exists('dashboard_edit')) {
$obj = new dashboard; $obj = new dashboard;
$obj->toggle($dashboard); $obj->toggle($dashboards);
} }
break; break;
case 'delete': case 'delete':
if (permission_exists('dashboard_delete')) { if (permission_exists('dashboard_delete')) {
$obj = new dashboard; $obj = new dashboard;
$obj->delete($dashboard); $obj->delete($dashboards);
} }
break; break;
} }
@@ -78,20 +81,29 @@
$order_by = $_GET["order_by"] ?? null; $order_by = $_GET["order_by"] ?? null;
$order = $_GET["order"] ?? null; $order = $_GET["order"] ?? null;
//add the search
if (isset($_GET["search"])) {
$search = strtolower($_GET["search"]);
}
//get the count //get the count
$sql = "select count(dashboard_uuid) "; $sql = "select count(dashboard_uuid) ";
$sql .= "from v_dashboard "; $sql .= "from v_dashboards ";
if (isset($search)) { $sql .= "where true \n";
$sql .= "where (\n"; if ($show == "all" && permission_exists('dashboard_all')) {
$sql .= " dashboard_name = :search \n"; //$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
$sql .= " or dashboard_description = :search \n"; //$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
else {
$sql .= "and ( ";
$sql .= " domain_uuid = :domain_uuid ";
if (permission_exists('dashboard_domain')) {
$sql .= " or domain_uuid is null ";
}
$sql .= ") ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (isset($_GET["search"])) {
$sql .= "and (\n";
$sql .= " lower(dashboard_name) like :search \n";
$sql .= " or lower(dashboard_description) like :search \n";
$sql .= ")\n"; $sql .= ")\n";
$parameters['search'] = '%'.$search.'%'; $parameters['search'] = '%'.strtolower($search).'%';
} }
$database = new database; $database = new database;
$num_rows = $database->select($sql, $parameters ?? null, 'column'); $num_rows = $database->select($sql, $parameters ?? null, 'column');
@@ -99,34 +111,37 @@
//get the list //get the list
$sql = "select \n"; $sql = "select \n";
$sql .= "domain_uuid, \n";
$sql .= "dashboard_uuid, \n"; $sql .= "dashboard_uuid, \n";
$sql .= "dashboard_name, \n"; $sql .= "dashboard_name, \n";
$sql .= "dashboard_icon, \n";
$sql .= "( \n";
$sql .= " select \n";
$sql .= " string_agg(g.group_name, ', ') \n";
$sql .= " from \n";
$sql .= " v_dashboard_groups as dg, \n";
$sql .= " v_groups as g \n";
$sql .= " where \n";
$sql .= " dg.group_uuid = g.group_uuid \n";
$sql .= " and d.dashboard_uuid = dg.dashboard_uuid \n";
$sql .= ") AS dashboard_groups, \n";
$sql .= "dashboard_order, \n";
$sql .= "cast(dashboard_enabled as text), \n"; $sql .= "cast(dashboard_enabled as text), \n";
$sql .= "dashboard_description \n"; $sql .= "dashboard_description \n";
$sql .= "from v_dashboard as d \n"; $sql .= "from v_dashboards as d \n";
$sql .= "where true \n";
if ($show == "all" && permission_exists('dashboard_all')) {
//$sql .= "and (domain_uuid = :domain_uuid or domain_uuid is null) ";
//$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
else {
$sql .= "and ( ";
$sql .= " domain_uuid = :domain_uuid ";
if (permission_exists('dashboard_domain')) {
$sql .= " or domain_uuid is null ";
}
$sql .= ") ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
}
if (isset($_GET["search"])) { if (isset($_GET["search"])) {
$sql .= "where (\n"; $sql .= "and (\n";
$sql .= " lower(dashboard_name) like :search \n"; $sql .= " lower(dashboard_name) like :search \n";
$sql .= " or lower(dashboard_description) like :search \n"; $sql .= " or lower(dashboard_description) like :search \n";
$sql .= ")\n"; $sql .= ")\n";
$parameters['search'] = '%'.strtolower($search).'%'; $parameters['search'] = '%'.strtolower($search).'%';
} }
$sql .= order_by($order_by, $order, 'dashboard_order, dashboard_name', 'asc'); $sql .= order_by($order_by, $order, 'dashboard_name', 'asc');
$sql .= limit_offset($rows_per_page ?? null, $offset ?? null); $sql .= limit_offset($rows_per_page ?? null, $offset ?? null);
$database = new database; $database = new database;
$dashboard = $database->select($sql, $parameters ?? null, 'all'); $dashboards = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters); unset($sql, $parameters);
//create token //create token
@@ -134,26 +149,34 @@
$token = $object->create($_SERVER['PHP_SELF']); $token = $object->create($_SERVER['PHP_SELF']);
//additional includes //additional includes
$document['title'] = $text['title-dashboard']; $document['title'] = $text['title-dashboards'];
require_once "resources/header.php"; require_once "resources/header.php";
//show the content //show the content
echo "<div class='action_bar' id='action_bar'>\n"; echo "<div class='action_bar' id='action_bar'>\n";
echo " <div class='heading'><b>".$text['title-dashboard']."</b><div class='count'>".number_format($num_rows)."</div></div>\n"; echo " <div class='heading'><b>".$text['title-dashboards']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
echo " <div class='actions'>\n"; echo " <div class='actions'>\n";
echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$settings->get('theme', 'button_icon_back'),'id'=>'btn_back','name'=>'btn_back','style'=>'margin-right: 15px;','link'=>'index.php']); echo button::create(['type'=>'button','label'=>$text['button-back'],'icon'=>$settings->get('theme', 'button_icon_back'),'id'=>'btn_back','name'=>'btn_back','style'=>'margin-right: 15px;','link'=>'index.php']);
if (permission_exists('dashboard_add')) { if (permission_exists('dashboard_add')) {
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$settings->get('theme', 'button_icon_add'),'id'=>'btn_add','name'=>'btn_add','link'=>'dashboard_edit.php']); echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$settings->get('theme', 'button_icon_add'),'id'=>'btn_add','name'=>'btn_add','link'=>'dashboard_edit.php']);
} }
if (permission_exists('dashboard_add') && !empty($dashboard)) { if (permission_exists('dashboard_add') && !empty($dashboards)) {
echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$settings->get('theme', 'button_icon_copy'),'id'=>'btn_copy','name'=>'btn_copy','style'=>'display:none;','onclick'=>"modal_open('modal-copy','btn_copy');"]); echo button::create(['type'=>'button','label'=>$text['button-copy'],'icon'=>$settings->get('theme', 'button_icon_copy'),'id'=>'btn_copy','name'=>'btn_copy','style'=>'display:none;','onclick'=>"modal_open('modal-copy','btn_copy');"]);
} }
if (permission_exists('dashboard_edit') && !empty($dashboard)) { if (permission_exists('dashboard_edit') && !empty($dashboards)) {
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$settings->get('theme', 'button_icon_toggle'),'id'=>'btn_toggle','name'=>'btn_toggle','style'=>'display:none;','onclick'=>"modal_open('modal-toggle','btn_toggle');"]); echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$settings->get('theme', 'button_icon_toggle'),'id'=>'btn_toggle','name'=>'btn_toggle','style'=>'display:none;','onclick'=>"modal_open('modal-toggle','btn_toggle');"]);
} }
if (permission_exists('dashboard_delete') && !empty($dashboard)) { if (permission_exists('dashboard_delete') && !empty($dashboards)) {
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$settings->get('theme', 'button_icon_delete'),'id'=>'btn_delete','name'=>'btn_delete','style'=>'display:none;','onclick'=>"modal_open('modal-delete','btn_delete');"]); echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$settings->get('theme', 'button_icon_delete'),'id'=>'btn_delete','name'=>'btn_delete','style'=>'display:none;','onclick'=>"modal_open('modal-delete','btn_delete');"]);
} }
if (permission_exists('domain_all')) {
if ($show == 'all') {
echo " <input type='hidden' name='show' value='all'>";
}
else {
echo button::create(['type'=>'button','label'=>$text['button-show_all'],'icon'=>$settings->get('theme', 'button_icon_all'),'link'=>'?type='.urlencode($destination_type ?? '').'&show=all'.($search != '' ? "&search=".urlencode($search ?? '') : null)]);
}
}
echo "<form id='form_search' class='inline' method='get'>\n"; echo "<form id='form_search' class='inline' method='get'>\n";
echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search ?? '')."\" placeholder=\"".$text['label-search']."\" onkeydown=''>"; echo "<input type='text' class='txt list-search' name='search' id='search' value=\"".escape($search ?? '')."\" placeholder=\"".$text['label-search']."\" onkeydown=''>";
echo button::create(['label'=>$text['button-search'],'icon'=>$settings->get('theme', 'button_icon_search'),'type'=>'submit','id'=>'btn_search']); echo button::create(['label'=>$text['button-search'],'icon'=>$settings->get('theme', 'button_icon_search'),'type'=>'submit','id'=>'btn_search']);
@@ -166,13 +189,13 @@
echo " <div style='clear: both;'></div>\n"; echo " <div style='clear: both;'></div>\n";
echo "</div>\n"; echo "</div>\n";
if (permission_exists('dashboard_add') && !empty($dashboard)) { if (permission_exists('dashboard_add') && !empty($dashboards)) {
echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('copy'); list_form_submit('form_list');"])]); echo modal::create(['id'=>'modal-copy','type'=>'copy','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_copy','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('copy'); list_form_submit('form_list');"])]);
} }
if (permission_exists('dashboard_edit') && !empty($dashboard)) { if (permission_exists('dashboard_edit') && !empty($dashboards)) {
echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]); echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]);
} }
if (permission_exists('dashboard_delete') && !empty($dashboard)) { if (permission_exists('dashboard_delete') && !empty($dashboards)) {
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]); echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
} }
@@ -185,13 +208,13 @@
echo "<tr class='list-header'>\n"; echo "<tr class='list-header'>\n";
if (permission_exists('dashboard_add') || permission_exists('dashboard_edit') || permission_exists('dashboard_delete')) { if (permission_exists('dashboard_add') || permission_exists('dashboard_edit') || permission_exists('dashboard_delete')) {
echo " <th class='checkbox'>\n"; echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($dashboard) ?: "style='visibility: hidden;'").">\n"; echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($dashboards) ?: "style='visibility: hidden;'").">\n";
echo " </th>\n"; echo " </th>\n";
} }
if ($show == 'all' && permission_exists('dashboard_all')) {
echo th_order_by('domain_name', $text['label-domain'], $order_by, $order);
}
echo th_order_by('dashboard_name', $text['label-dashboard_name'], $order_by, $order); echo th_order_by('dashboard_name', $text['label-dashboard_name'], $order_by, $order);
echo th_order_by('dashboard_groups', $text['label-dashboard_groups'], $order_by, $order);
echo th_order_by('dashboard_icon', $text['label-icons'], $order_by, $order);
echo th_order_by('dashboard_order', $text['label-dashboard_order'], $order_by, $order);
echo th_order_by('dashboard_enabled', $text['label-dashboard_enabled'], $order_by, $order, null, "class='center'"); echo th_order_by('dashboard_enabled', $text['label-dashboard_enabled'], $order_by, $order, null, "class='center'");
echo " <th class='hide-sm-dn'>".$text['label-dashboard_description']."</th>\n"; echo " <th class='hide-sm-dn'>".$text['label-dashboard_description']."</th>\n";
if (permission_exists('dashboard_edit') && $settings->get('theme', 'list_row_edit_button', false)) { if (permission_exists('dashboard_edit') && $settings->get('theme', 'list_row_edit_button', false)) {
@@ -199,9 +222,9 @@
} }
echo "</tr>\n"; echo "</tr>\n";
if (!empty($dashboard)) { if (!empty($dashboards)) {
$x = 0; $x = 0;
foreach ($dashboard as $row) { foreach ($dashboards as $row) {
$list_row_url = ''; $list_row_url = '';
if (permission_exists('dashboard_edit')) { if (permission_exists('dashboard_edit')) {
$list_row_url = "dashboard_edit.php?id=".urlencode($row['dashboard_uuid']); $list_row_url = "dashboard_edit.php?id=".urlencode($row['dashboard_uuid']);
@@ -212,10 +235,18 @@
echo "<tr class='list-row' href='".$list_row_url."'>\n"; echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('dashboard_add') || permission_exists('dashboard_edit') || permission_exists('dashboard_delete')) { if (permission_exists('dashboard_add') || permission_exists('dashboard_edit') || permission_exists('dashboard_delete')) {
echo " <td class='checkbox'>\n"; echo " <td class='checkbox'>\n";
echo " <input type='checkbox' name='dashboard[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"checkbox_on_change(this); if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n"; echo " <input type='checkbox' name='dashboards[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"checkbox_on_change(this); if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
echo " <input type='hidden' name='dashboard[$x][dashboard_uuid]' value='".escape($row['dashboard_uuid'])."' />\n"; echo " <input type='hidden' name='dashboards[$x][dashboard_uuid]' value='".escape($row['dashboard_uuid'])."' />\n";
echo " </td>\n"; echo " </td>\n";
} }
if (!empty($show) && $show == 'all' && permission_exists('domain_all')) {
if (!empty($row['domain_uuid']) && is_uuid($row['domain_uuid'])) {
echo " <td>".escape($_SESSION['domains'][$row['domain_uuid']]['domain_name'])."</td>\n";
}
else {
echo " <td>".$text['label-global']."</td>\n";
}
}
echo " <td>\n"; echo " <td>\n";
if (permission_exists('dashboard_edit')) { if (permission_exists('dashboard_edit')) {
echo " <a href='".$list_row_url."' title=\"".$text['button-edit']."\">".escape($row['dashboard_name'])."</a>\n"; echo " <a href='".$list_row_url."' title=\"".$text['button-edit']."\">".escape($row['dashboard_name'])."</a>\n";
@@ -224,9 +255,6 @@
echo " ".escape($row['dashboard_name']); echo " ".escape($row['dashboard_name']);
} }
echo " </td>\n"; echo " </td>\n";
echo " <td>".escape($row['dashboard_groups'])."</td>\n";
echo " <td>".escape($row['dashboard_icon'])."</td>\n";
echo " <td>".escape($row['dashboard_order'])."</td>\n";
if (permission_exists('dashboard_edit')) { if (permission_exists('dashboard_edit')) {
echo " <td class='no-link center'>\n"; echo " <td class='no-link center'>\n";
echo " <input type='hidden' name='number_translations[$x][dashboard_enabled]' value='".escape($row['dashboard_enabled'])."' />\n"; echo " <input type='hidden' name='number_translations[$x][dashboard_enabled]' value='".escape($row['dashboard_enabled'])."' />\n";
@@ -246,7 +274,7 @@
echo "</tr>\n"; echo "</tr>\n";
$x++; $x++;
} }
unset($dashboard); unset($dashboards);
} }
echo "</table>\n"; echo "</table>\n";

View File

@@ -1,5 +1,4 @@
<?php <?php
/* /*
FusionPBX FusionPBX
Version: MPL 1.1 Version: MPL 1.1
@@ -36,27 +35,27 @@
} }
//find the widget config //find the widget config
if (!empty($_GET['dashboard_path'])) { if (!empty($_GET['widget_path'])) {
$dashboard_path = $_GET['dashboard_path']; $widget_path = $_GET['widget_path'];
if (!preg_match('/^[a-zA-Z0-9\/_]+$/', $dashboard_path)) { if (!preg_match('/^[a-zA-Z0-9\/_]+$/', $widget_path)) {
echo json_encode(['error' => 'Invalid dashboard path']); echo json_encode(['error' => 'Invalid widget path']);
exit; exit;
} }
//find the application and widget //find the application and widget
$dashboard_path_array = explode('/', $dashboard_path); $dashboard_path_array = explode('/', $widget_path);
$application_name = $dashboard_path_array[0]; $application_name = $dashboard_path_array[0];
$widget_name = $dashboard_path_array[1]; $widget_path_name = $dashboard_path_array[1];
$path_array = glob(dirname(__DIR__, 2) . '/*/' . $application_name . '/resources/dashboard/config.php'); $path_array = glob(dirname(__DIR__, 2) . '/*/' . $application_name . '/resources/dashboard/config.php');
if (file_exists($path_array[0])) { if (file_exists($path_array[0])) {
include($path_array[0]); include($path_array[0]);
foreach ($array['dashboard'] as $index => $row) { foreach ($array['dashboard_widgets'] as $index => $row) {
if ($row['dashboard_path'] === "$application_name/$widget_name") { if ($row['widget_path'] === "$application_name/$widget_path_name") {
echo json_encode([ echo json_encode([
'chart_type_options' => $row['dashboard_chart_type_options'], 'chart_type_options' => $row['widget_chart_type_options'],
]); ]);
exit; exit;
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,275 @@
<?php
/*
FusionPBX
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the
License.
The Original Code is FusionPBX
The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2021-2025
the Initial Developer. All Rights Reserved.
*/
//includes files
require_once dirname(__DIR__, 2) . "/resources/require.php";
require_once "resources/check_auth.php";
//check permissions
if (permission_exists('dashboard_widget_view')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
$text = $language->get();
//get the http post data
if (!empty($_POST['dashboard_widgets'])) {
$action = $_POST['action'];
$dashboard_uuid = $_POST['dashboard_uuid'];
$dashboard_widgets = $_POST['dashboard_widgets'];
}
//process the http post data by action
if (!empty($action) && !empty($dashboard_widgets)) {
switch ($action) {
case 'toggle':
if (permission_exists('dashboard_widget_edit')) {
$obj = new dashboard;
$obj->toggle_items($dashboard_widgets);
}
break;
case 'delete':
if (permission_exists('dashboard_widget_delete')) {
$obj = new dashboard;
$obj->delete_items($dashboard_widgets);
}
break;
}
//redirect the user
header('Location: dashboard_edit.php?id='.urlencode($dashboard_uuid));
exit;
}
//get order and order by
$order_by = $_GET["order_by"] ?? null;
$order = $_GET["order"] ?? null;
//get the count
$sql = "select count(dashboard_widget_uuid) ";
$sql .= "from v_dashboard_widgets ";
$sql .= "where dashboard_uuid = :dashboard_uuid ";
$parameters['dashboard_uuid'] = $dashboard_uuid;
$database = new database;
$num_rows = $database->select($sql, $parameters ?? null, 'column');
unset($sql, $parameters);
//get the list
$sql = "select \n";
$sql .= "dashboard_widget_uuid, \n";
$sql .= "widget_name, \n";
$sql .= "widget_path, \n";
$sql .= "widget_icon, \n";
$sql .= "( \n";
$sql .= " select \n";
$sql .= " string_agg(g.group_name, ', ') \n";
$sql .= " from \n";
$sql .= " v_dashboard_widget_groups as dg, \n";
$sql .= " v_groups as g \n";
$sql .= " where \n";
$sql .= " dg.group_uuid = g.group_uuid \n";
$sql .= " and d.dashboard_widget_uuid = dg.dashboard_widget_uuid \n";
$sql .= ") AS dashboard_widget_groups, \n";
$sql .= "dashboard_widget_parent_uuid, \n";
$sql .= "widget_order, \n";
$sql .= "cast(widget_enabled as text), \n";
$sql .= "widget_description \n";
$sql .= "from v_dashboard_widgets as d \n";
$sql .= "where dashboard_uuid = :dashboard_uuid ";
$sql .= order_by($order_by, $order, 'widget_order, widget_name', 'asc');
$sql .= limit_offset($rows_per_page ?? null, $offset ?? null);
$database = new database;
$parameters['dashboard_uuid'] = $dashboard_uuid;
$widget_data = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters);
//get the list of widget uuids
$widget_uuid_list = [];
foreach ($widget_data as $row) {
$widget_uuid_list[] = $row['dashboard_widget_uuid'];
}
$widgets = [];
foreach ($widget_data as $row) {
//skip child widgets unless the parent doesn't exist
if (!empty($row['dashboard_widget_parent_uuid']) && in_array($row['dashboard_widget_parent_uuid'], $widget_uuid_list)) {
continue;
}
//add the widget to the array
$widgets[] = $row;
//add child widgets under parent widgets
if ($row['widget_path'] == 'dashboard/parent') {
foreach ($widget_data as $child) {
if ($child['dashboard_widget_parent_uuid'] == $row['dashboard_widget_uuid']) {
$widgets[] = $child;
}
}
}
}
//create token
$object = new token;
$token = $object->create('/core/dashboard/dashboard_widget_list.php');
//show the content
echo "<div class='action_bar' id='action_bar_sub'>\n";
echo " <div class='heading'><b>".$text['title-widgets']."</b><div class='count'>".number_format($num_rows)."</div></div>\n";
echo " <div class='actions'>\n";
echo button::create(['type'=>'button','id'=>'action_bar_sub_button_back','label'=>$text['button-back'],'icon'=>$settings->get('theme', 'button_icon_back'),'collapse'=>'hide-xs','style'=>'margin-right: 15px; display: none;','link'=>'dashboard.php']);
if (permission_exists('dashboard_widget_add')) {
echo button::create(['type'=>'button','label'=>$text['button-add'],'icon'=>$settings->get('theme', 'button_icon_add'),'id'=>'btn_add','name'=>'btn_add','link'=>'dashboard_widget_edit.php?id='.escape($dashboard_uuid).'&widget_uuid='.escape($widget_uuid)]);
}
if (permission_exists('dashboard_widget_edit') && !empty($widgets)) {
echo button::create(['type'=>'button','label'=>$text['button-toggle'],'icon'=>$settings->get('theme', 'button_icon_toggle'),'id'=>'btn_toggle','name'=>'btn_toggle','onclick'=>"modal_open('modal-toggle','btn_toggle');"]);
}
if (permission_exists('dashboard_widget_delete') && !empty($widgets)) {
echo button::create(['type'=>'button','label'=>$text['button-delete'],'icon'=>$settings->get('theme', 'button_icon_delete'),'id'=>'btn_delete','name'=>'btn_delete','onclick'=>"modal_open('modal-delete','btn_delete');"]);
}
if (!empty($paging_controls_mini)) {
echo "<span style='margin-left: 15px;'>".$paging_controls_mini."</span>\n";
}
echo " </form>\n";
echo " </div>\n";
echo " <div style='clear: both;'></div>\n";
echo "</div>\n";
if (permission_exists('dashboard_widget_edit') && !empty($widgets)) {
echo modal::create(['id'=>'modal-toggle','type'=>'toggle','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_toggle','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('toggle'); list_form_submit('form_list');"])]);
}
if (permission_exists('dashboard_widget_delete') && !empty($widgets)) {
echo modal::create(['id'=>'modal-delete','type'=>'delete','actions'=>button::create(['type'=>'button','label'=>$text['button-continue'],'icon'=>'check','id'=>'btn_delete','style'=>'float: right; margin-left: 15px;','collapse'=>'never','onclick'=>"modal_close(); list_action_set('delete'); list_form_submit('form_list');"])]);
}
echo "<form id='form_list' method='post' action='dashboard_widget_list.php?'>\n";
echo "<input type='hidden' id='action' name='action' value=''>\n";
echo "<input type='hidden' name='dashboard_uuid' value='".escape($dashboard_uuid)."'>\n";
echo "<div class='card'>\n";
echo "<table class='list'>\n";
echo "<tr class='list-header'>\n";
if (permission_exists('dashboard_widget_add') || permission_exists('dashboard_widget_edit') || permission_exists('dashboard_widget_delete')) {
echo " <th class='checkbox'>\n";
echo " <input type='checkbox' id='checkbox_all' name='checkbox_all' onclick='list_all_toggle(); checkbox_on_change(this);' ".(!empty($widgets) ?: "style='visibility: hidden;'").">\n";
echo " </th>\n";
}
echo th_order_by('widget_name', $text['label-widget_name'], $order_by, $order);
echo th_order_by('dashboard_widget_groups', $text['label-widget_groups'], $order_by, $order);
//echo th_order_by('widget_icon', $text['label-icons'], $order_by, $order);
echo th_order_by('widget_order', $text['label-widget_order'], $order_by, $order);
echo th_order_by('widget_enabled', $text['label-widget_enabled'], $order_by, $order, null, "class='center'");
echo " <th class='hide-sm-dn'>".$text['label-widget_description']."</th>\n";
if (permission_exists('dashboard_widget_edit') && $settings->get('theme', 'list_row_edit_button', false)) {
echo " <td class='action-button'>&nbsp;</td>\n";
}
echo "</tr>\n";
if (!empty($widgets)) {
$x = 0;
foreach ($widgets as $row) {
$list_row_url = '';
if (permission_exists('dashboard_widget_edit')) {
$list_row_url = "dashboard_widget_edit.php?id=".urlencode($dashboard_uuid)."&widget_uuid=".urlencode($row['dashboard_widget_uuid']);
if ($row['domain_uuid'] != $_SESSION['domain_uuid'] && permission_exists('domain_select')) {
$list_row_url .= '&domain_uuid='.urlencode($row['domain_uuid']).'&domain_change=true';
}
}
echo "<tr class='list-row' href='".$list_row_url."'>\n";
if (permission_exists('dashboard_widget_add') || permission_exists('dashboard_widget_edit') || permission_exists('dashboard_widget_delete')) {
echo " <td class='checkbox'>\n";
echo " <input type='checkbox' name='dashboard_widgets[$x][checked]' id='checkbox_".$x."' value='true' onclick=\"checkbox_on_change(this); if (!this.checked) { document.getElementById('checkbox_all').checked = false; }\">\n";
echo " <input type='hidden' name='dashboard_widgets[$x][dashboard_widget_uuid]' value='".escape($row['dashboard_widget_uuid'])."' />\n";
echo " </td>\n";
}
$widget_icon = (!empty($row['widget_icon']) ? "<i class='fas ".$row['widget_icon']."' style='margin-left: 7px; margin-top: 2px; text-indent: initial; ".(!empty($row['widget_icon_color']) ? "color: ".$row['widget_icon_color'].";" : "opacity: 0.4;")."'></i>\n" : null);
echo " <td ".(!empty($row['dashboard_widget_parent_uuid']) && in_array($row['dashboard_widget_parent_uuid'], $widget_uuid_list) ? "style='text-indent: 1rem;'" : null).">\n";//indent child widgets
if (permission_exists('dashboard_widget_edit')) {
echo " <a href='".$list_row_url."' title=\"".$text['button-edit']."\">".escape($row['widget_name'])."</a>\n";
echo $widget_icon;
}
else {
echo " ".escape($row['widget_name']);
echo $widget_icon;
}
echo " </td>\n";
echo " <td>".escape($row['dashboard_widget_groups'])."</td>\n";
//echo " <td>".escape($row['widget_icon'])."</td>\n";
echo " <td>".escape($row['widget_order'])."</td>\n";
if (permission_exists('dashboard_widget_edit')) {
echo " <td class='no-link center'>\n";
echo " <input type='hidden' name='dashboard_widgets[$x][widget_enabled]' value='".escape($row['widget_enabled'])."' />\n";
echo button::create(['type'=>'submit','class'=>'link','label'=>$text['label-'.($row['widget_enabled']?:'false')],'title'=>$text['button-toggle'],'onclick'=>"list_self_check('checkbox_".$x."'); list_action_set('toggle'); list_form_submit('form_list')"]);
}
else {
echo " <td class='center'>\n";
echo $text['label-'.($row['widget_enabled']?:'false')];
}
echo " </td>\n";
echo " <td class='description overflow hide-sm-dn'>".escape($row['widget_description'])."</td>\n";
if (permission_exists('dashboard_widget_edit') && $settings->get('theme', 'list_row_edit_button', false)) {
echo " <td class='action-button'>\n";
echo button::create(['type'=>'button','title'=>$text['button-edit'],'icon'=>$settings->get('theme', 'button_icon_edit'),'link'=>$list_row_url]);
echo " </td>\n";
}
echo "</tr>\n";
$x++;
}
unset($widgets);
}
echo "</table>\n";
echo "</div>\n";
echo "<br />\n";
echo "<div align='center'>".($paging_controls ?? '')."</div>\n";
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
echo "</form>\n";
//make sub action bar sticky
echo "<script>\n";
echo " window.addEventListener('scroll', function(){\n";
echo " action_bar_scroll('action_bar_sub', 350, heading_modify, heading_restore);\n";
echo " }, false);\n";
echo " function heading_modify() {\n";
echo " document.getElementById('action_bar_sub_button_back').style.display = 'inline-block';\n";
echo " }\n";
echo " function heading_restore() {\n";
echo " document.getElementById('action_bar_sub_button_back').style.display = 'none';\n";
echo " }\n";
echo "</script>\n";
//include the footer
require_once "resources/footer.php";
?>

View File

@@ -72,88 +72,114 @@
$group_uuids_in = "'".implode("','", $group_uuids)."'"; $group_uuids_in = "'".implode("','", $group_uuids)."'";
} }
//get the dashboard uuid
$sql = "select dashboard_uuid ";
$sql .= "from v_dashboards ";
$sql .= "where dashboard_enabled = 'true' ";
$sql .= "and domain_uuid = :domain_uuid ";
$parameters['domain_uuid'] = $_SESSION['domain_uuid'];
$result = $database->select($sql, $parameters ?? null, 'all');
if (empty($result)) {
$sql = "select dashboard_uuid ";
$sql .= "from v_dashboards ";
$sql .= "where dashboard_enabled = 'true' ";
$sql .= "and domain_uuid is null";
$result = $database->select($sql, null, 'all');
}
$dashboard_uuid = $result[0]['dashboard_uuid'] ?? null;
unset($sql, $parameters);
//get the list //get the list
$sql = "select "; $sql = "select ";
$sql .= "dashboard_uuid, "; $sql .= "dashboard_uuid, ";
$sql .= "dashboard_name, "; $sql .= "dashboard_widget_uuid, ";
$sql .= "dashboard_path, "; $sql .= "widget_name, ";
$sql .= "dashboard_icon, "; $sql .= "widget_path, ";
$sql .= "dashboard_icon_color, "; $sql .= "widget_icon, ";
$sql .= "dashboard_url, "; $sql .= "widget_icon_color, ";
$sql .= "dashboard_target, "; $sql .= "widget_url, ";
$sql .= "dashboard_width, "; $sql .= "widget_target, ";
$sql .= "dashboard_height, "; $sql .= "widget_width, ";
$sql .= "dashboard_content, "; $sql .= "widget_height, ";
$sql .= "dashboard_content_text_align, "; $sql .= "widget_content, ";
$sql .= "dashboard_content_details, "; $sql .= "widget_content_text_align, ";
$sql .= "dashboard_chart_type, "; $sql .= "widget_content_details, ";
$sql .= "cast(dashboard_label_enabled as text), "; $sql .= "widget_chart_type, ";
$sql .= "dashboard_label_text_color, "; $sql .= "cast(widget_label_enabled as text), ";
$sql .= "dashboard_label_text_color_hover, "; $sql .= "widget_label_text_color, ";
$sql .= "dashboard_label_background_color, "; $sql .= "widget_label_text_color_hover, ";
$sql .= "dashboard_label_background_color_hover, "; $sql .= "widget_label_background_color, ";
$sql .= "dashboard_number_text_color, "; $sql .= "widget_label_background_color_hover, ";
$sql .= "dashboard_number_text_color_hover, "; $sql .= "widget_number_text_color, ";
$sql .= "dashboard_number_background_color, "; $sql .= "widget_number_text_color_hover, ";
$sql .= "dashboard_background_color, "; $sql .= "widget_number_background_color, ";
$sql .= "dashboard_background_color_hover, "; $sql .= "widget_background_color, ";
$sql .= "dashboard_detail_background_color, "; $sql .= "widget_background_color_hover, ";
$sql .= "dashboard_background_gradient_style, "; $sql .= "widget_detail_background_color, ";
$sql .= "dashboard_background_gradient_angle, "; $sql .= "widget_background_gradient_style, ";
$sql .= "dashboard_column_span, "; $sql .= "widget_background_gradient_angle, ";
$sql .= "dashboard_row_span, "; $sql .= "widget_column_span, ";
$sql .= "dashboard_details_state, "; $sql .= "widget_row_span, ";
$sql .= "dashboard_order, "; $sql .= "widget_details_state, ";
$sql .= "cast(dashboard_enabled as text), "; $sql .= "dashboard_widget_parent_uuid, ";
$sql .= "dashboard_description, "; $sql .= "widget_order, ";
$sql .= "dashboard_parent_uuid "; $sql .= "cast(widget_enabled as text), ";
$sql .= "from v_dashboard as d "; $sql .= "widget_description ";
$sql .= "where dashboard_enabled = 'true' "; $sql .= "from v_dashboard_widgets as d ";
$sql .= "and dashboard_uuid in ( "; $sql .= "where widget_enabled = 'true' ";
$sql .= " select dashboard_uuid from v_dashboard_groups where group_uuid in ( "; $sql .= "and dashboard_widget_uuid in ( ";
$sql .= " select dashboard_widget_uuid from v_dashboard_widget_groups where group_uuid in ( ";
$sql .= " ".$group_uuids_in." "; $sql .= " ".$group_uuids_in." ";
$sql .= " ) "; $sql .= " ) ";
$sql .= ") "; $sql .= ") ";
$sql .= "order by dashboard_order, dashboard_name asc "; $sql .= "and dashboard_uuid = :dashboard_uuid ";
$dashboard = $database->select($sql, $parameters ?? null, 'all'); $sql .= "order by widget_order, widget_name asc ";
$parameters['dashboard_uuid'] = $dashboard_uuid;
$widgets = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters); unset($sql, $parameters);
//get the list of widget uuids
$widget_uuid_list = [];
foreach ($widgets as $row) {
$widget_uuid_list[] = $row['dashboard_widget_uuid'];
}
//get http post variables and set them to php variables //get http post variables and set them to php variables
if (count($_POST) > 0 && permission_exists('dashboard_edit')) { if (count($_POST) > 0 && permission_exists('dashboard_edit')) {
//set the variables from the http values //set the variables from the http values
if (isset($_POST["widget_order"])) { if (isset($_POST["widget_order"])) {
$widgets = explode(",", $_POST["widget_order"]); $widget_order = explode(",", $_POST["widget_order"]);
$x = 0; $x = 0;
foreach ($widgets as $widget) { foreach ($widget_order as $widget) {
list($widget_id, $parent_id, $order) = explode("|", $widget); list($widget_id, $parent_id, $order) = explode("|", $widget);
$parent_uuid = null; $parent_uuid = null;
foreach ($dashboard as $row) { foreach ($widgets as $row) {
$dashboard_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $row['dashboard_uuid'])); $dashboard_widget_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $row['dashboard_widget_uuid']));
if ($widget_id == $dashboard_id) { if ($widget_id == $dashboard_widget_id) {
if (!empty($parent_id)) { if (!empty($parent_id)) {
//find parent uuid //find parent uuid
foreach ($dashboard as $parent_row) { foreach ($widgets as $parent_row) {
$parent_dashboard_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $parent_row['dashboard_uuid'])); $parent_widget_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $parent_row['dashboard_widget_uuid']));
if ($parent_dashboard_id === $parent_id) { if ($parent_widget_id === $parent_id) {
$parent_uuid = $parent_row['dashboard_uuid']; $parent_uuid = $parent_row['dashboard_widget_uuid'];
break; break;
} }
} }
} }
$array['dashboard'][$x]['dashboard_uuid'] = $row['dashboard_uuid']; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = $row['dashboard_widget_uuid'];
$array['dashboard'][$x]['dashboard_name'] = $row['dashboard_name']; $array['dashboard_widgets'][$x]['widget_name'] = $row['widget_name'];
$array['dashboard'][$x]['dashboard_icon'] = $row['dashboard_icon']; $array['dashboard_widgets'][$x]['widget_icon'] = $row['widget_icon'];
$array['dashboard'][$x]['dashboard_url'] = $row['dashboard_url']; $array['dashboard_widgets'][$x]['widget_url'] = $row['widget_url'];
$array['dashboard'][$x]['dashboard_content'] = $row['dashboard_content']; $array['dashboard_widgets'][$x]['widget_content'] = $row['widget_content'];
$array['dashboard'][$x]['dashboard_content_text_align'] = $row['dashboard_content_text_align']; $array['dashboard_widgets'][$x]['widget_content_text_align'] = $row['widget_content_text_align'];
$array['dashboard'][$x]['dashboard_content_details'] = $row['dashboard_content_details']; $array['dashboard_widgets'][$x]['widget_content_details'] = $row['widget_content_details'];
$array['dashboard'][$x]['dashboard_target'] = $row['dashboard_target']; $array['dashboard_widgets'][$x]['widget_target'] = $row['widget_target'];
$array['dashboard'][$x]['dashboard_width'] = $row['dashboard_width']; $array['dashboard_widgets'][$x]['widget_width'] = $row['widget_width'];
$array['dashboard'][$x]['dashboard_height'] = $row['dashboard_height']; $array['dashboard_widgets'][$x]['widget_height'] = $row['widget_height'];
$array['dashboard'][$x]['dashboard_order'] = $order; $array['dashboard_widgets'][$x]['widget_order'] = $order;
$array['dashboard'][$x]['dashboard_parent_uuid'] = $parent_uuid; $array['dashboard_widgets'][$x]['dashboard_widget_parent_uuid'] = $parent_uuid;
$x++; $x++;
break; break;
} }
@@ -207,9 +233,9 @@
//determine initial state all button to display //determine initial state all button to display
$expanded_all = true; $expanded_all = true;
if (!empty($dashboard)) { if (!empty($widgets)) {
foreach ($dashboard as $row) { foreach ($widgets as $row) {
if ($row['dashboard_details_state'] == 'contracted' || $row['dashboard_details_state'] == 'hidden' || $row['dashboard_details_state'] == 'disabled') { $expanded_all = false; } if ($row['widget_details_state'] == 'contracted' || $row['widget_details_state'] == 'hidden' || $row['widget_details_state'] == 'disabled') { $expanded_all = false; }
} }
} }
@@ -288,152 +314,152 @@ div.hud_chart {
/* dashboard settings */ /* dashboard settings */
<?php <?php
foreach ($dashboard as $row) { foreach ($widgets as $row) {
$dashboard_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $row['dashboard_uuid'])); $widget_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $row['dashboard_widget_uuid']));
if (!empty($row['dashboard_icon_color'])) { if (!empty($row['widget_icon_color'])) {
echo "#".$dashboard_id." .hud_stat .fas {\n"; echo "#".$widget_id." .hud_stat .fas {\n";
echo " color: ".$row['dashboard_icon_color'].";\n"; echo " color: ".$row['widget_icon_color'].";\n";
echo "}\n"; echo "}\n";
} }
if ($row['dashboard_label_enabled'] == 'false' && $row['dashboard_path'] != 'dashboard/parent') { if ($row['widget_label_enabled'] == 'false' && $row['widget_path'] != 'dashboard/parent') {
echo "#".$dashboard_id." .hud_title:first-of-type {\n"; echo "#".$widget_id." .hud_title:first-of-type {\n";
echo " display: none;\n"; echo " display: none;\n";
echo "}\n"; echo "}\n";
echo "#".$dashboard_id." .hud_content {\n"; echo "#".$widget_id." .hud_content {\n";
echo " align-content: center;\n"; echo " align-content: center;\n";
echo "}\n"; echo "}\n";
echo "#".$dashboard_id." .hud_chart {\n"; echo "#".$widget_id." .hud_chart {\n";
echo " padding-top: 0;\n"; echo " padding-top: 0;\n";
echo "}\n"; echo "}\n";
} }
if (!empty($row['dashboard_label_text_color']) || !empty($row['dashboard_label_background_color'])) { if (!empty($row['widget_label_text_color']) || !empty($row['widget_label_background_color'])) {
echo "#".$dashboard_id." > .hud_box > .hud_content > .hud_title:first-of-type {\n"; echo "#".$widget_id." > .hud_box > .hud_content > .hud_title:first-of-type {\n";
if (!empty($row['dashboard_label_text_color'])) { echo " color: ".$row['dashboard_label_text_color'].";\n"; } if (!empty($row['widget_label_text_color'])) { echo " color: ".$row['widget_label_text_color'].";\n"; }
if (!empty($row['dashboard_label_background_color'])) { echo " background-color: ".$row['dashboard_label_background_color'].";\n"; } if (!empty($row['widget_label_background_color'])) { echo " background-color: ".$row['widget_label_background_color'].";\n"; }
echo "}\n"; echo "}\n";
} }
if (!empty($row['dashboard_label_text_color_hover']) || !empty($row['dashboard_label_background_color_hover'])) { if (!empty($row['widget_label_text_color_hover']) || !empty($row['widget_label_background_color_hover'])) {
echo "#".$dashboard_id.":hover > .hud_box > .hud_content > .hud_title:first-of-type {\n"; echo "#".$widget_id.":hover > .hud_box > .hud_content > .hud_title:first-of-type {\n";
if (!empty($row['dashboard_label_text_color_hover'])) { echo " color: ".$row['dashboard_label_text_color_hover'].";\n"; } if (!empty($row['widget_label_text_color_hover'])) { echo " color: ".$row['widget_label_text_color_hover'].";\n"; }
if (!empty($row['dashboard_label_background_color_hover'])) { echo " background-color: ".$row['dashboard_label_background_color_hover'].";\n"; } if (!empty($row['widget_label_background_color_hover'])) { echo " background-color: ".$row['widget_label_background_color_hover'].";\n"; }
echo "}\n"; echo "}\n";
} }
if (!empty($row['dashboard_number_text_color'])) { if (!empty($row['widget_number_text_color'])) {
echo "#".$dashboard_id." > .hud_box > .hud_content > .hud_stat {\n"; echo "#".$widget_id." > .hud_box > .hud_content > .hud_stat {\n";
echo " color: ".$row['dashboard_number_text_color'].";\n"; echo " color: ".$row['widget_number_text_color'].";\n";
echo "}\n"; echo "}\n";
} }
if (!empty($row['dashboard_number_text_color_hover'])) { if (!empty($row['widget_number_text_color_hover'])) {
echo "#".$dashboard_id.":hover > .hud_box > .hud_content > .hud_stat {\n"; echo "#".$widget_id.":hover > .hud_box > .hud_content > .hud_stat {\n";
echo " color: ".$row['dashboard_number_text_color_hover'].";\n"; echo " color: ".$row['widget_number_text_color_hover'].";\n";
echo "}\n"; echo "}\n";
} }
if (!empty($row['dashboard_background_color'])) { if (!empty($row['widget_background_color'])) {
$background_color = json_decode($row['dashboard_background_color'], true); $background_color = json_decode($row['widget_background_color'], true);
echo "#".$dashboard_id." > .hud_box:first-of-type {\n"; echo "#".$widget_id." > .hud_box:first-of-type {\n";
echo " background: ".$background_color[0].";\n"; echo " background: ".$background_color[0].";\n";
if (empty($row['dashboard_background_gradient_style']) || $row['dashboard_background_gradient_style'] == 'mirror') { if (empty($row['widget_background_gradient_style']) || $row['widget_background_gradient_style'] == 'mirror') {
echo " background-image: linear-gradient(".(empty($row['dashboard_background_gradient_angle']) ? '0deg' : $row['dashboard_background_gradient_angle'].'deg').", ".$background_color[1]." 0%, ".$background_color[0]." 30%, ".$background_color[0]." 70%, ".$background_color[1]." 100%);\n"; echo " background-image: linear-gradient(".(empty($row['widget_background_gradient_angle']) ? '0deg' : $row['widget_background_gradient_angle'].'deg').", ".$background_color[1]." 0%, ".$background_color[0]." 30%, ".$background_color[0]." 70%, ".$background_color[1]." 100%);\n";
} }
else { //simple else { //simple
echo " background-image: linear-gradient(".(empty($row['dashboard_background_gradient_angle']) ? '0deg' : $row['dashboard_background_gradient_angle'].'deg').", ".$background_color[0]." 0%, ".$background_color[1]." 100%);\n"; echo " background-image: linear-gradient(".(empty($row['widget_background_gradient_angle']) ? '0deg' : $row['widget_background_gradient_angle'].'deg').", ".$background_color[0]." 0%, ".$background_color[1]." 100%);\n";
} }
echo "}\n"; echo "}\n";
} }
if (!empty($row['dashboard_background_color_hover'])) { if (!empty($row['widget_background_color_hover'])) {
$background_color_hover = json_decode($row['dashboard_background_color_hover'], true); $background_color_hover = json_decode($row['widget_background_color_hover'], true);
echo "#".$dashboard_id.":hover > .hud_box:first-of-type {\n"; echo "#".$widget_id.":hover > .hud_box:first-of-type {\n";
echo " background: ".$background_color_hover[0].";\n"; echo " background: ".$background_color_hover[0].";\n";
if (empty($row['dashboard_background_gradient_style']) || $row['dashboard_background_gradient_style'] == 'mirror') { if (empty($row['widget_background_gradient_style']) || $row['widget_background_gradient_style'] == 'mirror') {
echo " background-image: linear-gradient(".(empty($row['dashboard_background_gradient_angle']) ? '0deg' : $row['dashboard_background_gradient_angle'].'deg').", ".$background_color_hover[1]." 0%, ".$background_color_hover[0]." 30%, ".$background_color_hover[0]." 70%, ".$background_color_hover[1]." 100%);\n"; echo " background-image: linear-gradient(".(empty($row['widget_background_gradient_angle']) ? '0deg' : $row['widget_background_gradient_angle'].'deg').", ".$background_color_hover[1]." 0%, ".$background_color_hover[0]." 30%, ".$background_color_hover[0]." 70%, ".$background_color_hover[1]." 100%);\n";
} }
else { //simple else { //simple
echo " background-image: linear-gradient(".(empty($row['dashboard_background_gradient_angle']) ? '0deg' : $row['dashboard_background_gradient_angle'].'deg').", ".$background_color_hover[0]." 0%, ".$background_color_hover[1]." 100%);\n"; echo " background-image: linear-gradient(".(empty($row['widget_background_gradient_angle']) ? '0deg' : $row['widget_background_gradient_angle'].'deg').", ".$background_color_hover[0]." 0%, ".$background_color_hover[1]." 100%);\n";
} }
echo "}\n"; echo "}\n";
} }
if (!empty($row['dashboard_detail_background_color'])) { if (!empty($row['widget_detail_background_color'])) {
$detail_background_color = json_decode($row['dashboard_detail_background_color'], true); $detail_background_color = json_decode($row['widget_detail_background_color'], true);
echo "#".$dashboard_id." > .hud_box > .hud_details {\n"; echo "#".$widget_id." > .hud_box > .hud_details {\n";
echo " background: ".$detail_background_color[0].";\n"; echo " background: ".$detail_background_color[0].";\n";
if (empty($row['dashboard_background_gradient_style']) || $row['dashboard_background_gradient_style'] == 'mirror') { if (empty($row['widget_background_gradient_style']) || $row['widget_background_gradient_style'] == 'mirror') {
echo " background-image: linear-gradient(".(empty($row['dashboard_background_gradient_angle']) ? '0deg' : $row['dashboard_background_gradient_angle'].'deg').", ".$detail_background_color[1]." 0%, ".$detail_background_color[0]." 30%, ".$detail_background_color[0]." 70%, ".$detail_background_color[1]." 100%);\n"; echo " background-image: linear-gradient(".(empty($row['widget_background_gradient_angle']) ? '0deg' : $row['widget_background_gradient_angle'].'deg').", ".$detail_background_color[1]." 0%, ".$detail_background_color[0]." 30%, ".$detail_background_color[0]." 70%, ".$detail_background_color[1]." 100%);\n";
} }
else { //simple else { //simple
echo " background-image: linear-gradient(".(empty($row['dashboard_background_gradient_angle']) ? '0deg' : $row['dashboard_background_gradient_angle'].'deg').", ".$detail_background_color[0]." 0%, ".$detail_background_color[1]." 100%);\n"; echo " background-image: linear-gradient(".(empty($row['widget_background_gradient_angle']) ? '0deg' : $row['widget_background_gradient_angle'].'deg').", ".$detail_background_color[0]." 0%, ".$detail_background_color[1]." 100%);\n";
} }
echo "}\n"; echo "}\n";
} }
if ($row['dashboard_path'] == "dashboard/icon") { if ($row['widget_path'] == "dashboard/icon") {
echo "#".$dashboard_id." div.hud_content,\n"; echo "#".$widget_id." div.hud_content,\n";
echo "#".$dashboard_id." span.hud_title,\n"; echo "#".$widget_id." span.hud_title,\n";
echo "#".$dashboard_id." span.hud_stat {\n"; echo "#".$widget_id." span.hud_stat {\n";
echo " transition: .4s;\n"; echo " transition: .4s;\n";
echo "}\n"; echo "}\n";
} }
switch ($row['dashboard_row_span']) { switch ($row['widget_row_span']) {
case 1: case 1:
echo "#".$dashboard_id." > .hud_box > .hud_content {\n"; echo "#".$widget_id." > .hud_box > .hud_content {\n";
echo " height: var(--row-height);\n"; echo " height: var(--row-height);\n";
echo "}\n"; echo "}\n";
echo "#".$dashboard_id." .hud_stat {\n"; echo "#".$widget_id." .hud_stat {\n";
echo " line-height: 0;\n"; echo " line-height: 0;\n";
echo " font-size: 30pt;\n"; echo " font-size: 30pt;\n";
echo "}\n"; echo "}\n";
echo "#".$dashboard_id." .hud_stat .fas {\n"; echo "#".$widget_id." .hud_stat .fas {\n";
echo " line-height: 0;\n"; echo " line-height: 0;\n";
echo " font-size: 24pt;\n"; echo " font-size: 24pt;\n";
echo "}\n"; echo "}\n";
echo "#".$dashboard_id.".widget > .hud_box > .hud_content > .hud_chart {\n"; echo "#".$widget_id." > .hud_box > .hud_content > .hud_chart {\n";
echo " height: 54px;\n"; echo " height: 54px;\n";
echo " width: 180px;\n"; echo " width: 180px;\n";
echo " padding-top: 0;\n"; echo " padding-top: 0;\n";
echo "}\n"; echo "}\n";
break; break;
case 2: case 2:
echo "#".$dashboard_id." > .hud_box > .hud_content {\n"; echo "#".$widget_id." > .hud_box > .hud_content {\n";
echo " height: calc((var(--row-height) * 2) + var(--grid-gap));\n"; echo " height: calc((var(--row-height) * 2) + var(--grid-gap));\n";
echo "}\n"; echo "}\n";
break; break;
case 3: case 3:
echo "#".$dashboard_id." > .hud_box > .hud_content {\n"; echo "#".$widget_id." > .hud_box > .hud_content {\n";
echo " height: calc((var(--row-height) * 3) + (var(--grid-gap) * 2));\n"; echo " height: calc((var(--row-height) * 3) + (var(--grid-gap) * 2));\n";
echo "}\n"; echo "}\n";
break; break;
case 4: case 4:
echo "#".$dashboard_id." > .hud_box > .hud_content {\n"; echo "#".$widget_id." > .hud_box > .hud_content {\n";
echo " height: calc((var(--row-height) * 4) + (var(--grid-gap) * 3));\n"; echo " height: calc((var(--row-height) * 4) + (var(--grid-gap) * 3));\n";
echo "}\n"; echo "}\n";
break; break;
default: //if empty default: //if empty
echo "#".$dashboard_id." > .hud_box > .hud_content {\n"; echo "#".$widget_id." > .hud_box > .hud_content {\n";
echo " height: calc((var(--row-height) * 2) + var(--grid-gap));\n"; echo " height: calc((var(--row-height) * 2) + var(--grid-gap));\n";
echo "}\n"; echo "}\n";
} }
$row_span = $row['dashboard_row_span'] * 4; $row_span = $row['widget_row_span'] * 4;
$expanded_row_span = $row_span + 13; $expanded_row_span = $row_span + 13;
if ($row['dashboard_details_state'] === "expanded" || $row['dashboard_details_state'] === "contracted") { if ($row['widget_details_state'] === "expanded" || $row['widget_details_state'] === "contracted") {
$row_span += 1; $row_span += 1;
$expanded_row_span += 1; $expanded_row_span += 1;
} }
if (!empty($row['dashboard_row_span'])) { if (!empty($row['widget_row_span'])) {
echo "#".$dashboard_id." {\n"; echo "#".$widget_id." {\n";
echo " --row-span: ".$row['dashboard_row_span'].";\n"; echo " --row-span: ".$row['widget_row_span'].";\n";
echo "}\n"; echo "}\n";
echo "#".$dashboard_id." {\n"; echo "#".$widget_id." {\n";
echo " grid-row: span ".$row_span.";\n"; echo " grid-row: span ".$row_span.";\n";
echo "}\n"; echo "}\n";
echo "#".$dashboard_id.".expanded {\n"; echo "#".$widget_id.".expanded {\n";
echo " grid-row: span ".$expanded_row_span.";\n"; echo " grid-row: span ".$expanded_row_span.";\n";
echo "}\n"; echo "}\n";
} }
if (!empty($row['dashboard_column_span'])) { if (!empty($row['widget_column_span'])) {
echo "#".$dashboard_id." {\n"; echo "#".$widget_id." {\n";
echo " grid-column: span ".$row['dashboard_column_span'].";\n"; echo " grid-column: span ".$row['widget_column_span'].";\n";
echo "}\n"; echo "}\n";
} }
if ($row['dashboard_path'] != "dashboard/icon" && $row['dashboard_chart_type'] != "icon" && $row['dashboard_column_span'] == 1) { if ($row['widget_path'] != "dashboard/icon" && $row['widget_chart_type'] != "icon" && $row['widget_column_span'] == 1) {
echo "#".$dashboard_id.".child_widget {\n"; echo "#".$widget_id.".child_widget {\n";
echo " grid-column: span 2;\n"; echo " grid-column: span 2;\n";
echo "}\n"; echo "}\n";
} }
@@ -445,16 +471,16 @@ foreach ($dashboard as $row) {
.widgets { grid-template-columns: repeat(1, minmax(100px, 1fr)); } .widgets { grid-template-columns: repeat(1, minmax(100px, 1fr)); }
.col-num { grid-column: span 1; } .col-num { grid-column: span 1; }
<?php <?php
foreach ($dashboard as $row) { foreach ($widgets as $row) {
$dashboard_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $row['dashboard_uuid'])); $widget_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $row['dashboard_widget_uuid']));
if (!empty($row['dashboard_column_span'])) { if (!empty($row['widget_column_span'])) {
echo "#".$dashboard_id." {\n"; echo "#".$widget_id." {\n";
echo " grid-column: span 1;\n"; echo " grid-column: span 1;\n";
echo "}\n"; echo "}\n";
} }
if ($row['dashboard_details_state'] == "hidden" || $row['dashboard_details_state'] == "disabled") { if ($row['widget_details_state'] == "hidden" || $row['widget_details_state'] == "disabled") {
echo "#".$dashboard_id." .hud_box .hud_expander, \n"; echo "#".$widget_id." .hud_box .hud_expander, \n";
echo "#".$dashboard_id." .hud_box .hud_details {\n"; echo "#".$widget_id." .hud_box .hud_details {\n";
echo " display: none;\n"; echo " display: none;\n";
echo "}\n"; echo "}\n";
} }
@@ -467,26 +493,26 @@ foreach ($dashboard as $row) {
.widgets { grid-template-columns: repeat(2, minmax(100px, 1fr)); } .widgets { grid-template-columns: repeat(2, minmax(100px, 1fr)); }
.col-num { grid-column: span 2; } .col-num { grid-column: span 2; }
<?php <?php
foreach ($dashboard as $row) { foreach ($widgets as $row) {
$dashboard_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $row['dashboard_uuid'])); $widget_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $row['dashboard_widget_uuid']));
if ($row['dashboard_column_span'] > 2) { if ($row['widget_column_span'] > 2) {
echo "#".$dashboard_id." {\n"; echo "#".$widget_id." {\n";
echo " grid-column: span 2;\n"; echo " grid-column: span 2;\n";
echo "}\n"; echo "}\n";
} }
if ($row['dashboard_details_state'] == "expanded") { if ($row['widget_details_state'] == "expanded") {
echo "#".$dashboard_id." .hud_box .hud_details {\n"; echo "#".$widget_id." .hud_box .hud_details {\n";
echo " display: block;\n"; echo " display: block;\n";
echo "}\n"; echo "}\n";
} }
if ($row['dashboard_details_state'] == "contracted") { if ($row['widget_details_state'] == "contracted") {
echo "#".$dashboard_id." .widget .hud_box .hud_details {\n"; echo "#".$widget_id." .widget .hud_box .hud_details {\n";
echo " display: none;\n"; echo " display: none;\n";
echo "}\n"; echo "}\n";
} }
if ($row['dashboard_details_state'] == "hidden" || $row['dashboard_details_state'] == "disabled") { if ($row['widget_details_state'] == "hidden" || $row['widget_details_state'] == "disabled") {
echo "#".$dashboard_id." .hud_box .hud_expander, \n"; echo "#".$widget_id." .hud_box .hud_expander, \n";
echo "#".$dashboard_id." .hud_box .hud_details {\n"; echo "#".$widget_id." .hud_box .hud_details {\n";
echo " display: none;\n"; echo " display: none;\n";
echo "}\n"; echo "}\n";
} }
@@ -499,10 +525,10 @@ foreach ($dashboard as $row) {
.widgets { grid-template-columns: repeat(3, minmax(100px, 1fr)); } .widgets { grid-template-columns: repeat(3, minmax(100px, 1fr)); }
.col-num { grid-column: span 2; } .col-num { grid-column: span 2; }
<?php <?php
foreach ($dashboard as $row) { foreach ($widgets as $row) {
$dashboard_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $row['dashboard_uuid'])); $widget_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $row['dashboard_widget_uuid']));
if ($row['dashboard_column_span'] > 3) { if ($row['widget_column_span'] > 3) {
echo "#".$dashboard_id." {\n"; echo "#".$widget_id." {\n";
echo " grid-column: span 3;\n"; echo " grid-column: span 3;\n";
echo "}\n"; echo "}\n";
} }
@@ -515,11 +541,11 @@ foreach ($dashboard as $row) {
.widgets { grid-template-columns: repeat(4, minmax(100px, 1fr)); } .widgets { grid-template-columns: repeat(4, minmax(100px, 1fr)); }
.col-num { grid-column: span 2; } .col-num { grid-column: span 2; }
<?php <?php
foreach ($dashboard as $row) { foreach ($widgets as $row) {
$dashboard_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $row['dashboard_uuid'])); $widget_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $row['dashboard_widget_uuid']));
if (!empty($row['dashboard_column_span'])) { if (!empty($row['widget_column_span'])) {
echo "#".$dashboard_id." {\n"; echo "#".$widget_id." {\n";
echo " grid-column: span ".$row['dashboard_column_span'].";\n"; echo " grid-column: span ".$row['widget_column_span'].";\n";
echo "}\n"; echo "}\n";
} }
} }
@@ -553,8 +579,8 @@ document.addEventListener('click', function(event) {
} }
}); });
function toggle_grid_row_span(dashboard_id) { function toggle_grid_row_span(widget_id) {
let widget = document.getElementById(dashboard_id); let widget = document.getElementById(widget_id);
if (widget.classList.contains('expanded')) { if (widget.classList.contains('expanded')) {
widget.classList.remove('expanded'); widget.classList.remove('expanded');
@@ -628,29 +654,29 @@ window.addEventListener('resize', update_parent_height);
//include the dashboards //include the dashboards
echo "<div class='widgets' id='widgets' style='padding: 0 5px;'>\n"; echo "<div class='widgets' id='widgets' style='padding: 0 5px;'>\n";
$x = 0; $x = 0;
foreach ($dashboard as $row) { foreach ($widgets as $row) {
//skip child widgets //skip child widgets unless the parent doesn't exist
if (!empty($row['dashboard_parent_uuid'])) { if (!empty($row['dashboard_widget_parent_uuid']) && in_array($row['dashboard_widget_parent_uuid'], $widget_uuid_list)) {
continue; continue;
} }
//set the variables //set the variables
$dashboard_uuid = $row['dashboard_uuid'] ?? ''; $widget_uuid = $row['dashboard_widget_uuid'] ?? '';
$dashboard_name = $row['dashboard_name'] ?? ''; $widget_name = $row['widget_name'] ?? '';
$dashboard_icon = $row['dashboard_icon'] ?? ''; $widget_icon = $row['widget_icon'] ?? '';
$dashboard_url = $row['dashboard_url'] ?? ''; $widget_url = $row['widget_url'] ?? '';
$dashboard_target = $row['dashboard_target'] ?? ''; $widget_target = $row['widget_target'] ?? '';
$dashboard_width = $row['dashboard_width'] ?? ''; $widget_width = $row['widget_width'] ?? '';
$dashboard_height = $row['dashboard_height'] ?? ''; $widget_height = $row['widget_height'] ?? '';
$dashboard_content = $row['dashboard_content'] ?? ''; $widget_content = $row['widget_content'] ?? '';
$dashboard_content_text_align = $row['dashboard_content_text_align'] ?? ''; $widget_content_text_align = $row['widget_content_text_align'] ?? '';
$dashboard_content_details = $row['dashboard_content_details'] ?? ''; $widget_content_details = $row['widget_content_details'] ?? '';
$dashboard_chart_type = $row['dashboard_chart_type'] ?? ''; $widget_chart_type = $row['widget_chart_type'] ?? '';
$dashboard_label_text_color = $row['dashboard_label_text_color'] ?? $settings->get('theme', 'dashboard_label_text_color', ''); $widget_label_text_color = $row['widget_label_text_color'] ?? $settings->get('theme', 'dashboard_label_text_color', '');
$dashboard_number_text_color = $row['dashboard_number_text_color'] ?? $settings->get('theme', 'dashboard_number_text_color', ''); $widget_number_text_color = $row['widget_number_text_color'] ?? $settings->get('theme', 'dashboard_number_text_color', '');
$dashboard_number_background_color = $row['dashboard_number_background_color'] ?? $settings->get('theme', 'dashboard_number_background_color', ''); $widget_number_background_color = $row['widget_number_background_color'] ?? $settings->get('theme', 'dashboard_number_background_color', '');
$dashboard_details_state = $row['dashboard_details_state'] ?? 'hidden'; $widget_details_state = $row['widget_details_state'] ?? 'hidden';
$dashboard_row_span = $row['dashboard_row_span'] ?? ''; $widget_row_span = $row['widget_row_span'] ?? '';
//define the regex patterns //define the regex patterns
$uuid_pattern = '/[^-A-Fa-f0-9]/'; $uuid_pattern = '/[^-A-Fa-f0-9]/';
@@ -658,40 +684,39 @@ window.addEventListener('resize', update_parent_height);
$text_pattern = '/[^a-zA-Z0-9 _\-\/.\?:\=#\n]/'; $text_pattern = '/[^a-zA-Z0-9 _\-\/.\?:\=#\n]/';
//sanitize the data //sanitize the data
$dashboard_uuid = preg_replace($uuid_pattern, '', $dashboard_uuid); $widget_uuid = preg_replace($uuid_pattern, '', $widget_uuid);
$dashboard_id = 'id_'.md5($dashboard_uuid); $widget_id = 'id_'.md5($widget_uuid);
$dashboard_name = trim(preg_replace($text_pattern, '', $dashboard_name)); $widget_name = trim(preg_replace($text_pattern, '', $widget_name));
$dashboard_icon = preg_replace($text_pattern, '', $dashboard_icon); $widget_icon = preg_replace($text_pattern, '', $widget_icon);
$dashboard_url = trim(preg_replace($text_pattern, '', $dashboard_url)); $widget_url = trim(preg_replace($text_pattern, '', $widget_url));
$dashboard_target = trim(preg_replace($text_pattern, '', $dashboard_target)); $widget_target = trim(preg_replace($text_pattern, '', $widget_target));
$dashboard_width = trim(preg_replace($text_pattern, '', $dashboard_width)); $widget_width = trim(preg_replace($text_pattern, '', $widget_width));
$dashboard_height = trim(preg_replace($text_pattern, '', $dashboard_height)); $widget_height = trim(preg_replace($text_pattern, '', $widget_height));
$dashboard_content = preg_replace($text_pattern, '', $dashboard_content); $widget_content = preg_replace($text_pattern, '', $widget_content);
$dashboard_content = str_replace("\n", '<br />', $dashboard_content); $widget_content = str_replace("\n", '<br />', $widget_content);
$dashboard_content_text_align = trim(preg_replace($text_pattern, '', $dashboard_content_text_align)); $widget_content_text_align = trim(preg_replace($text_pattern, '', $widget_content_text_align));
$dashboard_content_details = preg_replace($text_pattern, '', $dashboard_content_details); $widget_content_details = preg_replace($text_pattern, '', $widget_content_details);
$dashboard_content_details = str_replace("\n", '<br />', $dashboard_content_details); $widget_content_details = str_replace("\n", '<br />', $widget_content_details);
$dashboard_chart_type = preg_replace($text_pattern, '', $dashboard_chart_type); $widget_chart_type = preg_replace($text_pattern, '', $widget_chart_type);
$dashboard_label_text_color = preg_replace($text_pattern, '', $dashboard_label_text_color); $widget_label_text_color = preg_replace($text_pattern, '', $widget_label_text_color);
$dashboard_number_text_color = preg_replace($text_pattern, '', $dashboard_number_text_color); $widget_number_text_color = preg_replace($text_pattern, '', $widget_number_text_color);
$dashboard_number_background_color = preg_replace($text_pattern, '', $dashboard_number_background_color); $widget_number_background_color = preg_replace($text_pattern, '', $widget_number_background_color);
$dashboard_details_state = preg_replace($text_pattern, '', $dashboard_details_state); $widget_details_state = preg_replace($text_pattern, '', $widget_details_state);
$dashboard_row_span = preg_replace($number_pattern, '', $dashboard_row_span); $widget_row_span = preg_replace($number_pattern, '', $widget_row_span);
$dashboard_path = preg_replace($text_pattern, '', strtolower($row['dashboard_path'])); $widget_path = preg_replace($text_pattern, '', strtolower($row['widget_path']));
//find the application and widget //find the application and widget
$dashboard_path_array = explode('/', $dashboard_path); $widget_path_array = explode('/', $widget_path);
$application_name = $dashboard_path_array[0]; $application_name = $widget_path_array[0];
$widget_name = $dashboard_path_array[1]; $widget_path_name = $widget_path_array[1];
$path_array = glob(dirname(__DIR__, 2).'/*/'.$application_name.'/resources/dashboard/'.$widget_name.'.php'); $path_array = glob(dirname(__DIR__, 2).'/*/'.$application_name.'/resources/dashboard/'.$widget_path_name.'.php');
echo "<div class='widget ".$dashboard_details_state."' id='".$dashboard_id."' ".($dashboard_path == 'dashboard/parent' ? "data-is-parent='true'" : null)." draggable='false'>\n"; echo "<div class='widget ".$widget_details_state."' id='".$widget_id."' ".($widget_path == 'dashboard/parent' ? "data-is-parent='true'" : null)." draggable='false'>\n";
if (file_exists($path_array[0])) { if (file_exists($path_array[0])) {
include $path_array[0]; include $path_array[0];
} }
echo "</div>\n"; echo "</div>\n";
$x++; $x++;
} }
echo "</div>\n"; echo "</div>\n";

View File

@@ -17,7 +17,7 @@
The Initial Developer of the Original Code is The Initial Developer of the Original Code is
Mark J Crane <markjcrane@fusionpbx.com> Mark J Crane <markjcrane@fusionpbx.com>
Portions created by the Initial Developer are Copyright (C) 2019 - 2021 Portions created by the Initial Developer are Copyright (C) 2019-2025
the Initial Developer. All Rights Reserved. the Initial Developer. All Rights Reserved.
Contributor(s): Contributor(s):
@@ -36,10 +36,12 @@
private $app_uuid; private $app_uuid;
private $name; private $name;
private $table; private $table;
private $tables;
private $toggle_field; private $toggle_field;
private $toggle_values; private $toggle_values;
private $description_field; private $description_field;
private $location; private $location;
private $uuid_prefix;
/** /**
* called when the object is created * called when the object is created
@@ -48,18 +50,24 @@
//assign the variables //assign the variables
$this->app_name = 'dashboard'; $this->app_name = 'dashboard';
$this->app_uuid = '55533bef-4f04-434a-92af-999c1e9927f7'; $this->app_uuid = '55533bef-4f04-434a-92af-999c1e9927f7';
$this->name = 'dashboard'; $this->tables[] = 'dashboards';
$this->table = 'dashboard'; $this->tables[] = 'dashboard_widgets';
$this->tables[] = 'dashboard_widget_groups';
$this->toggle_field = 'dashboard_enabled'; $this->toggle_field = 'dashboard_enabled';
$this->toggle_values = ['true','false']; $this->toggle_values = ['true','false'];
$this->description_field = 'dashboard_description'; $this->description_field = 'dashboard_description';
$this->location = 'dashboard.php'; $this->location = 'dashboard.php';
$this->uuid_prefix = 'dashboard_';
} }
/** /**
* delete rows from the database * delete rows from the database
*/ */
public function delete($records) { public function delete($records) {
//assign the variables
$this->name = 'dashboard';
$this->table = 'dashboards';
if (permission_exists($this->name.'_delete')) { if (permission_exists($this->name.'_delete')) {
//add multi-lingual support //add multi-lingual support
@@ -76,21 +84,28 @@
//delete multiple records //delete multiple records
if (is_array($records) && @sizeof($records) != 0) { if (is_array($records) && @sizeof($records) != 0) {
//build the delete array
$x = 0;
foreach ($records as $record) {
//add to the array
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['dashboard_uuid'])) {
$array[$this->table][$x]['dashboard_uuid'] = $record['dashboard_uuid'];
$array[$this->table.'_groups'][$x]['dashboard_uuid'] = $record['dashboard_uuid'];
}
//increment the id //build the delete array
$x++; foreach ($records as $x => $record) {
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['dashboard_uuid'])) {
if (is_array($this->tables) && @sizeof($this->tables) != 0) {
foreach ($this->tables as $table) {
$array[$table][$x][$this->uuid_prefix.'uuid'] = $record['dashboard_uuid'];
}
}
}
} }
//delete the checked rows //delete the checked rows
if (is_array($array) && @sizeof($array) != 0) { if (is_array($array) && @sizeof($array) != 0) {
//grant temp permissions
$p = permissions::new();
$database = new database;
foreach ($this->tables as $table) {
$p->add(database::singular($table).'_delete', 'temp');
}
//execute delete //execute delete
$database = new database; $database = new database;
$database->app_name = $this->app_name; $database->app_name = $this->app_name;
@@ -98,6 +113,12 @@
$database->delete($array); $database->delete($array);
unset($array); unset($array);
//revoke temp permissions
$database = new database;
foreach ($this->tables as $table) {
$p->delete(database::singular($table).'_delete', 'temp');
}
//set message //set message
message::add($text['message-delete']); message::add($text['message-delete']);
} }
@@ -110,6 +131,10 @@
* toggle a field between two values * toggle a field between two values
*/ */
public function toggle($records) { public function toggle($records) {
//assign the variables
$this->name = 'dashboard';
$this->table = 'dashboards';
if (permission_exists($this->name.'_edit')) { if (permission_exists($this->name.'_edit')) {
//add multi-lingual support //add multi-lingual support
@@ -177,6 +202,10 @@
* copy rows from the database * copy rows from the database
*/ */
public function copy($records) { public function copy($records) {
//assign the variables
$this->name = 'dashboard';
$this->table = 'dashboards';
if (permission_exists($this->name.'_add')) { if (permission_exists($this->name.'_add')) {
//add multi-lingual support //add multi-lingual support
@@ -241,4 +270,124 @@
} }
} }
public function delete_items($records) {
//assign the variables
$this->name = 'dashboard_widget';
$this->table = 'dashboard_widgets';
if (permission_exists($this->name.'_delete')) {
//validate the token
$token = new token;
if (!$token->validate('/core/dashboard/dashboard_widget_list.php')) {
message::add($this->text['message-invalid_token'],'negative');
header('Location: '.$this->location);
exit;
}
//add multi-lingual support
$language = new text;
$text = $language->get();
//delete multiple records
if (is_array($records) && @sizeof($records) != 0) {
//build the delete array
$x = 0;
foreach ($records as $record) {
//add to the array
if (!empty($record['checked']) && $record['checked'] == 'true' && is_uuid($record['dashboard_widget_uuid'])) {
$array[$this->table][$x]['dashboard_widget_uuid'] = $record['dashboard_widget_uuid'];
$array[$this->name.'_groups'][$x]['dashboard_widget_uuid'] = $record['dashboard_widget_uuid'];
}
//increment the id
$x++;
}
//delete the checked rows
if (is_array($array) && @sizeof($array) != 0) {
//execute delete
$database = new database;
$database->app_name = $this->app_name;
$database->app_uuid = $this->app_uuid;
$database->delete($array);
unset($array);
//set message
message::add($text['message-delete']);
}
unset($records);
}
}
}
public function toggle_items($records) {
//assign the variables
$this->name = 'dashboard_widget';
$this->table = 'dashboard_widgets';
$this->toggle_field = 'widget_enabled';
if (permission_exists($this->name.'_edit')) {
//add multi-lingual support
$language = new text;
$text = $language->get();
//validate the token
$token = new token;
if (!$token->validate('/core/dashboard/dashboard_widget_list.php')) {
message::add($this->text['message-invalid_token'],'negative');
header('Location: '.$this->location);
exit;
}
//toggle the checked records
if (is_array($records) && @sizeof($records) != 0) {
//get current toggle state
foreach($records as $record) {
if (isset($record['checked']) && $record['checked'] == 'true' && is_uuid($record['dashboard_widget_uuid'])) {
$uuids[] = "'".$record['dashboard_widget_uuid']."'";
}
}
if (is_array($uuids) && @sizeof($uuids) != 0) {
$sql = "select ".$this->name."_uuid as uuid, ".$this->toggle_field." as toggle from v_".$this->table." ";
$sql .= "where ".$this->name."_uuid in (".implode(', ', $uuids).") ";
$database = new database;
$rows = $database->select($sql, $parameters ?? null, 'all');
if (is_array($rows) && @sizeof($rows) != 0) {
foreach ($rows as $row) {
$states[$row['uuid']] = $row['toggle'];
}
}
unset($sql, $parameters, $rows, $row);
}
//build update array
$x = 0;
foreach($states as $uuid => $state) {
//create the array
$array[$this->table][$x][$this->name.'_uuid'] = $uuid;
$array[$this->table][$x][$this->toggle_field] = $state == $this->toggle_values[0] ? $this->toggle_values[1] : $this->toggle_values[0];
//increment the id
$x++;
}
//save the changes
if (is_array($array) && @sizeof($array) != 0) {
//save the array
$database = new database;
$database->app_name = $this->app_name;
$database->app_uuid = $this->app_uuid;
$database->save($array);
unset($array);
//set message
message::add($text['message-toggle']);
}
unset($records, $states);
}
}
}
} }

View File

@@ -0,0 +1,9 @@
<?php
//default dashboard
$array['dashboards'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboards'][$x]['dashboard_name'] = 'default';
$array['dashboards'][$x]['dashboard_enabled'] = 'true';
$array['dashboards'][$x]['dashboard_description'] = 'Default Dashboard';
?>

View File

@@ -9,27 +9,27 @@
$text = $language->get($_SESSION['domain']['language']['code'], 'core/dashboard'); $text = $language->get($_SESSION['domain']['language']['code'], 'core/dashboard');
//prepare the settings //prepare the settings
$dashboard_content_length = strlen($dashboard_content); $widget_content_length = strlen($widget_content);
$dashboard_content_text_vertical_align = 'top'; $widget_content_text_vertical_align = 'top';
if ($dashboard_content_length < 30) { $dashboard_content_text_vertical_align = 'middle'; } if ($widget_content_length < 30) { $widget_content_text_vertical_align = 'middle'; }
$dashboard_content_height = $dashboard_row_span * 120 . 'px'; $widget_content_height = $widget_row_span * 120 . 'px';
//escape the content and details //escape the content and details
$dashboard_content = escape($dashboard_content); $widget_content = escape($widget_content);
$dashboard_content_details = escape($dashboard_content_details); $widget_content_details = escape($widget_content_details);
//allow line breaks //allow line breaks
$dashboard_content = str_replace('&lt;br &sol;&gt;', '<br />', $dashboard_content); $widget_content = str_replace('&lt;br &sol;&gt;', '<br />', $widget_content);
$dashboard_content_details = str_replace('&lt;br &sol;&gt;', '<br />', $dashboard_content_details); $widget_content_details = str_replace('&lt;br &sol;&gt;', '<br />', $widget_content_details);
//dashboard icon //dashboard icon
echo "<div class='hud_box'>\n"; echo "<div class='hud_box'>\n";
echo " <div class='hud_content' ".(!empty($row['dashboard_background_color']) ? "style='background: ".$row['dashboard_background_color'].";'" : null)." ".(empty($dashboard_details_state) || $dashboard_details_state != "disabled" ? "onclick=\"$('#hud_content_details').slideToggle('fast');\"" : null).">\n"; echo " <div class='hud_content' ".(!empty($row['widget_background_color']) ? "style='background: ".$row['widget_background_color'].";'" : null)." ".(empty($widget_details_state) || $widget_details_state != "disabled" ? "onclick=\"$('#hud_content_details').slideToggle('fast');\"" : null).">\n";
echo " <span class='hud_title' ".(!empty($row['dashboard_label_background_color']) ? "style='background: ".$row['dashboard_label_background_color'].";'" : null).">".escape($dashboard_name)."</span>"; echo " <span class='hud_title' ".(!empty($row['widget_label_background_color']) ? "style='background: ".$row['widget_label_background_color'].";'" : null).">".escape($widget_name)."</span>";
echo " <span style='padding: 12px; height: ".$dashboard_content_height."; max-height: ".$dashboard_content_height."; text-align: ".$row['dashboard_content_text_align']."; vertical-align: ".$dashboard_content_text_vertical_align."; overflow: auto; ".(!empty($row['dashboard_number_text_color']) ? "color: ".$row['dashboard_number_text_color'].";" : null)."'>".$dashboard_content."</span>\n"; echo " <span style='padding: 12px; height: ".$widget_content_height."; max-height: ".$widget_content_height."; text-align: ".$row['widget_content_text_align']."; vertical-align: ".$widget_content_text_vertical_align."; overflow: auto; ".(!empty($row['widget_number_text_color']) ? "color: ".$row['widget_number_text_color'].";" : null)."'>".$widget_content."</span>\n";
echo " </div>\n"; echo " </div>\n";
if (empty($dashboard_details_state) || $dashboard_details_state != "disabled") { if (empty($widget_details_state) || $widget_details_state != "disabled") {
echo " <div class='hud_details hud_box' id='hud_content_details' style='padding: 20px; 10%; overflow: auto; ".(!empty($row['dashboard_detail_background_color']) ? "background: ".$row['dashboard_detail_background_color'].";" : null)."'>".$dashboard_content_details."</div>\n"; echo " <div class='hud_details hud_box' id='hud_content_details' style='padding: 20px; 10%; overflow: auto; ".(!empty($row['widget_detail_background_color']) ? "background: ".$row['widget_detail_background_color'].";" : null)."'>".$widget_content_details."</div>\n";
} }
echo " <span class='hud_expander' onclick=\"$('#hud_content_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>"; echo " <span class='hud_expander' onclick=\"$('#hud_content_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
echo "</div>\n"; echo "</div>\n";

View File

@@ -5,31 +5,31 @@
require_once "resources/check_auth.php"; require_once "resources/check_auth.php";
//convert to a key //convert to a key
$dashboard_key = str_replace(' ', '_', strtolower($dashboard_name)); $widget_key = str_replace(' ', '_', strtolower($widget_name));
//add multi-lingual support //add multi-lingual support
$language = new text; $language = new text;
$text = $language->get($_SESSION['domain']['language']['code'], dirname($dashboard_url)); $text = $language->get($_SESSION['domain']['language']['code'], dirname($widget_url));
//get the dashboard label //get the dashboard label
$dashboard_label = $text['title-'.$dashboard_key] ?? $dashboard_name; $widget_label = $text['title-'.$widget_key] ?? $widget_name;
//prepare variables //prepare variables
$dashboard_target = ($dashboard_target == 'new') ? '_blank' : '_self'; $widget_target = ($widget_target == 'new') ? '_blank' : '_self';
$window_parameters = ''; $window_parameters = '';
if (!empty($dashboard_width) && !empty($dashboard_height)) { if (!empty($widget_width) && !empty($widget_height)) {
$window_parameters .= "width=".$dashboard_width.",height=".$dashboard_height; $window_parameters .= "width=".$widget_width.",height=".$widget_height;
} }
//dashboard icon //dashboard icon
echo "<div class='hud_box'>\n"; echo "<div class='hud_box'>\n";
echo " <div class='hud_content' ".(empty($dashboard_details_state) || $dashboard_details_state != "disabled" ? "onclick=\"$('#hud_icon_details').slideToggle('fast');\"" : null).">\n"; echo " <div class='hud_content' ".(empty($widget_details_state) || $widget_details_state != "disabled" ? "onclick=\"$('#hud_icon_details').slideToggle('fast');\"" : null).">\n";
echo " <span class='hud_title'><a style='padding: 10px 0;' onclick=\"window.open('".$dashboard_url."', '".$dashboard_target."', '".$window_parameters."'); return false;\">".escape($dashboard_label)."</a></span>\n"; echo " <span class='hud_title'><a style='padding: 10px 0;' onclick=\"window.open('".$widget_url."', '".$widget_target."', '".$window_parameters."'); return false;\">".escape($widget_label)."</a></span>\n";
echo " <span class='hud_stat'><a style='padding: 10px 20px;' onclick=\"window.open('".$dashboard_url."', '".$dashboard_target."', '".$window_parameters."'); return false;\"><i class=\"fas ".$dashboard_icon."\"></i></a></span>\n"; echo " <span class='hud_stat'><a style='padding: 10px 20px;' onclick=\"window.open('".$widget_url."', '".$widget_target."', '".$window_parameters."'); return false;\"><i class=\"fas ".$widget_icon."\"></i></a></span>\n";
echo " </div>\n"; echo " </div>\n";
if (empty($dashboard_details_state) || $dashboard_details_state != "disabled") { if (empty($widget_details_state) || $widget_details_state != "disabled") {
echo " <div class='hud_details hud_box' id='hud_icon_details' style='padding: 20px; 10%; overflow: auto; ".(!empty($row['dashboard_detail_background_color']) ? "background: ".$row['dashboard_detail_background_color'].";" : null)."'>".str_replace("\r", '<br>', escape($dashboard_content_details))."</div>\n"; echo " <div class='hud_details hud_box' id='hud_icon_details' style='padding: 20px; 10%; overflow: auto; ".(!empty($row['widget_detail_background_color']) ? "background: ".$row['widget_detail_background_color'].";" : null)."'>".str_replace("\r", '<br>', escape($widget_content_details))."</div>\n";
} }
echo " <span class='hud_expander' onclick=\"$('#hud_icon_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>"; echo " <span class='hud_expander' onclick=\"$('#hud_icon_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
echo "</div>\n"; echo "</div>\n";

View File

@@ -5,63 +5,64 @@
require_once "resources/check_auth.php"; require_once "resources/check_auth.php";
//convert to a key //convert to a key
$dashboard_key = str_replace(' ', '_', strtolower($dashboard_name)); $widget_key = str_replace(' ', '_', strtolower($widget_name));
//add multi-lingual support //add multi-lingual support
$language = new text; $language = new text;
$text = $language->get($_SESSION['domain']['language']['code'], dirname($dashboard_url)); $text = $language->get($_SESSION['domain']['language']['code'], dirname($widget_url));
//get the dashboard label //get the dashboard label
$dashboard_label = $text['title-'.$dashboard_key]; $widget_label = $text['title-'.$widget_key];
if (empty($dashboard_label)) { if (empty($widget_label)) {
$dashboard_label = $dashboard_name; $widget_label = $widget_name;
} }
//get the list //get the list
$sql = "select "; $sql = "select ";
$sql .= "dashboard_uuid, "; $sql .= "dashboard_uuid, ";
$sql .= "dashboard_name, "; $sql .= "dashboard_widget_uuid, ";
$sql .= "dashboard_path, "; $sql .= "widget_name, ";
$sql .= "dashboard_icon, "; $sql .= "widget_path, ";
$sql .= "dashboard_icon_color, "; $sql .= "widget_icon, ";
$sql .= "dashboard_url, "; $sql .= "widget_icon_color, ";
$sql .= "dashboard_target, "; $sql .= "widget_url, ";
$sql .= "dashboard_width, "; $sql .= "widget_target, ";
$sql .= "dashboard_height, "; $sql .= "widget_width, ";
$sql .= "dashboard_content, "; $sql .= "widget_height, ";
$sql .= "dashboard_content_text_align, "; $sql .= "widget_content, ";
$sql .= "dashboard_content_details, "; $sql .= "widget_content_text_align, ";
$sql .= "dashboard_chart_type, "; $sql .= "widget_content_details, ";
$sql .= "cast(dashboard_label_enabled as text), "; $sql .= "widget_chart_type, ";
$sql .= "dashboard_label_text_color, "; $sql .= "cast(widget_label_enabled as text), ";
$sql .= "dashboard_label_text_color_hover, "; $sql .= "widget_label_text_color, ";
$sql .= "dashboard_label_background_color, "; $sql .= "widget_label_text_color_hover, ";
$sql .= "dashboard_label_background_color_hover, "; $sql .= "widget_label_background_color, ";
$sql .= "dashboard_number_text_color, "; $sql .= "widget_label_background_color_hover, ";
$sql .= "dashboard_number_text_color_hover, "; $sql .= "widget_number_text_color, ";
$sql .= "dashboard_number_background_color, "; $sql .= "widget_number_text_color_hover, ";
$sql .= "dashboard_background_color, "; $sql .= "widget_number_background_color, ";
$sql .= "dashboard_background_color_hover, "; $sql .= "widget_background_color, ";
$sql .= "dashboard_detail_background_color, "; $sql .= "widget_background_color_hover, ";
$sql .= "dashboard_background_gradient_style, "; $sql .= "widget_detail_background_color, ";
$sql .= "dashboard_background_gradient_angle, "; $sql .= "widget_background_gradient_style, ";
$sql .= "dashboard_column_span, "; $sql .= "widget_background_gradient_angle, ";
$sql .= "dashboard_row_span, "; $sql .= "widget_column_span, ";
$sql .= "dashboard_details_state, "; $sql .= "widget_row_span, ";
$sql .= "dashboard_order, "; $sql .= "widget_details_state, ";
$sql .= "cast(dashboard_enabled as text), "; $sql .= "widget_order, ";
$sql .= "dashboard_description "; $sql .= "cast(widget_enabled as text), ";
$sql .= "from v_dashboard as d "; $sql .= "widget_description ";
$sql .= "where dashboard_enabled = 'true' "; $sql .= "from v_dashboard_widgets as d ";
$sql .= "and dashboard_uuid in ("; $sql .= "where widget_enabled = 'true' ";
$sql .= " select dashboard_uuid from v_dashboard_groups where group_uuid in ("; $sql .= "and dashboard_widget_uuid in (";
$sql .= " select dashboard_widget_uuid from v_dashboard_widget_groups where group_uuid in (";
$sql .= " ".$group_uuids_in." "; $sql .= " ".$group_uuids_in." ";
$sql .= " )"; $sql .= " )";
$sql .= ")"; $sql .= ")";
$sql .= "and dashboard_parent_uuid = :dashboard_uuid "; $sql .= "and dashboard_widget_parent_uuid = :dashboard_widget_uuid ";
$sql .= "order by dashboard_order, dashboard_name asc "; $sql .= "order by widget_order, widget_name asc ";
$parameters['dashboard_uuid'] = $dashboard_uuid; $parameters['dashboard_widget_uuid'] = $widget_uuid;
$parent_widgets = $database->select($sql, $parameters ?? null, 'all'); $child_widgets = $database->select($sql, $parameters ?? null, 'all');
unset($sql, $parameters); unset($sql, $parameters);
?> ?>
@@ -101,11 +102,11 @@ div.child_widget div.hud_chart {
/* dashboard settings */ /* dashboard settings */
<?php <?php
foreach ($parent_widgets as $row) { foreach ($child_widgets as $row) {
$dashboard_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $row['dashboard_uuid'])); $widget_id = 'id_'.md5(preg_replace('/[^-A-Fa-f0-9]/', '', $row['dashboard_widget_uuid']));
if ($row['dashboard_path'] === "dashboard/icon" || $row['dashboard_chart_type'] === "icon") { if ($row['widget_path'] === "dashboard/icon" || $row['widget_chart_type'] === "icon") {
echo "#".$dashboard_id.":hover div.hud_box:first-of-type,\n"; echo "#".$widget_id.":hover div.hud_box:first-of-type,\n";
echo "#".$dashboard_id.".editable:hover div.hud_box:first-of-type {\n"; echo "#".$widget_id.".editable:hover div.hud_box:first-of-type {\n";
echo " transform: scale(1.05, 1.05);\n"; echo " transform: scale(1.05, 1.05);\n";
echo " -webkit-transition: .1s;\n"; echo " -webkit-transition: .1s;\n";
echo " -moz-transition: .1s;\n"; echo " -moz-transition: .1s;\n";
@@ -124,25 +125,25 @@ foreach ($parent_widgets as $row) {
echo " <div class='hud_content parent_widget'>\n"; echo " <div class='hud_content parent_widget'>\n";
$x = 0; $x = 0;
foreach ($parent_widgets as $row) { foreach ($child_widgets as $row) {
//set the variables //set the variables
$dashboard_uuid = $row['dashboard_uuid'] ?? ''; $widget_uuid = $row['dashboard_widget_uuid'] ?? '';
$dashboard_name = $row['dashboard_name'] ?? ''; $widget_name = $row['widget_name'] ?? '';
$dashboard_label = $row['dashboard_name'] ?? ''; $widget_label = $row['widget_name'] ?? '';
$dashboard_icon = $row['dashboard_icon'] ?? ''; $widget_icon = $row['widget_icon'] ?? '';
$dashboard_url = $row['dashboard_url'] ?? ''; $widget_url = $row['widget_url'] ?? '';
$dashboard_target = $row['dashboard_target'] ?? ''; $widget_target = $row['widget_target'] ?? '';
$dashboard_width = $row['dashboard_width'] ?? ''; $widget_width = $row['widget_width'] ?? '';
$dashboard_height = $row['dashboard_height'] ?? ''; $widget_height = $row['widget_height'] ?? '';
$dashboard_content = $row['dashboard_content'] ?? ''; $widget_content = $row['widget_content'] ?? '';
$dashboard_content_text_align = $row['dashboard_content_text_align'] ?? ''; $widget_content_text_align = $row['widget_content_text_align'] ?? '';
$dashboard_content_details = $row['dashboard_content_details'] ?? ''; $widget_content_details = $row['widget_content_details'] ?? '';
$dashboard_chart_type = $row['dashboard_chart_type'] ?? ''; $widget_chart_type = $row['widget_chart_type'] ?? '';
$dashboard_label_text_color = $row['dashboard_label_text_color'] ?? $settings->get('theme', 'dashboard_label_text_color', ''); $widget_label_text_color = $row['widget_label_text_color'] ?? $settings->get('theme', 'dashboard_label_text_color', '');
$dashboard_number_text_color = $row['dashboard_number_text_color'] ?? $settings->get('theme', 'dashboard_number_text_color', ''); $widget_number_text_color = $row['widget_number_text_color'] ?? $settings->get('theme', 'dashboard_number_text_color', '');
$dashboard_number_background_color = $row['dashboard_number_background_color'] ?? $settings->get('theme', 'dashboard_number_background_color', ''); $widget_number_background_color = $row['widget_number_background_color'] ?? $settings->get('theme', 'dashboard_number_background_color', '');
$dashboard_details_state = $row['dashboard_details_state'] ?? 'disabled'; $widget_details_state = $row['widget_details_state'] ?? 'disabled';
$dashboard_row_span = $row['dashboard_row_span'] ?? ''; $widget_row_span = $row['widget_row_span'] ?? '';
//define the regex patterns //define the regex patterns
$uuid_pattern = '/[^-A-Fa-f0-9]/'; $uuid_pattern = '/[^-A-Fa-f0-9]/';
@@ -150,34 +151,34 @@ foreach ($parent_widgets as $row) {
$text_pattern = '/[^a-zA-Z0-9 _\-\/.\?:\=#\n]/'; $text_pattern = '/[^a-zA-Z0-9 _\-\/.\?:\=#\n]/';
//sanitize the data //sanitize the data
$dashboard_uuid = preg_replace($uuid_pattern, '', $dashboard_uuid); $widget_uuid = preg_replace($uuid_pattern, '', $widget_uuid);
$dashboard_id = 'id_'.md5($dashboard_uuid); $widget_id = 'id_'.md5($widget_uuid);
$dashboard_name = trim(preg_replace($text_pattern, '', $dashboard_name)); $widget_name = trim(preg_replace($text_pattern, '', $widget_name));
$dashboard_icon = preg_replace($text_pattern, '', $dashboard_icon); $widget_icon = preg_replace($text_pattern, '', $widget_icon);
$dashboard_url = trim(preg_replace($text_pattern, '', $dashboard_url)); $widget_url = trim(preg_replace($text_pattern, '', $widget_url));
$dashboard_target = trim(preg_replace($text_pattern, '', $dashboard_target)); $widget_target = trim(preg_replace($text_pattern, '', $widget_target));
$dashboard_width = trim(preg_replace($text_pattern, '', $dashboard_width)); $widget_width = trim(preg_replace($text_pattern, '', $widget_width));
$dashboard_height = trim(preg_replace($text_pattern, '', $dashboard_height)); $widget_height = trim(preg_replace($text_pattern, '', $widget_height));
$dashboard_content = preg_replace($text_pattern, '', $dashboard_content); $widget_content = preg_replace($text_pattern, '', $widget_content);
$dashboard_content = str_replace("\n", '<br />', $dashboard_content); $widget_content = str_replace("\n", '<br />', $widget_content);
$dashboard_content_text_align = trim(preg_replace($text_pattern, '', $dashboard_content_text_align)); $widget_content_text_align = trim(preg_replace($text_pattern, '', $widget_content_text_align));
$dashboard_content_details = preg_replace($text_pattern, '', $dashboard_content_details); $widget_content_details = preg_replace($text_pattern, '', $widget_content_details);
$dashboard_content_details = str_replace("\n", '<br />', $dashboard_content_details); $widget_content_details = str_replace("\n", '<br />', $widget_content_details);
$dashboard_chart_type = preg_replace($text_pattern, '', $dashboard_chart_type); $widget_chart_type = preg_replace($text_pattern, '', $widget_chart_type);
$dashboard_label_text_color = preg_replace($text_pattern, '', $dashboard_label_text_color); $widget_label_text_color = preg_replace($text_pattern, '', $widget_label_text_color);
$dashboard_number_text_color = preg_replace($text_pattern, '', $dashboard_number_text_color); $widget_number_text_color = preg_replace($text_pattern, '', $widget_number_text_color);
$dashboard_number_background_color = preg_replace($text_pattern, '', $dashboard_number_background_color); $widget_number_background_color = preg_replace($text_pattern, '', $widget_number_background_color);
$dashboard_details_state = preg_replace($text_pattern, '', $dashboard_details_state); $widget_details_state = preg_replace($text_pattern, '', $widget_details_state);
$dashboard_row_span = preg_replace($number_pattern, '', $dashboard_row_span); $widget_row_span = preg_replace($number_pattern, '', $widget_row_span);
$dashboard_path = preg_replace($text_pattern, '', strtolower($row['dashboard_path'])); $widget_path = preg_replace($text_pattern, '', strtolower($row['widget_path']));
//find the application and widget //find the application and widget
$dashboard_path_array = explode('/', $dashboard_path); $widget_path_array = explode('/', $widget_path);
$application_name = $dashboard_path_array[0]; $application_name = $widget_path_array[0];
$child_widget_name = $dashboard_path_array[1]; $child_widget_name = $widget_path_array[1];
$path_array = glob(dirname(__DIR__, 4).'/*/'.$application_name.'/resources/dashboard/'.$child_widget_name.'.php'); $path_array = glob(dirname(__DIR__, 4).'/*/'.$application_name.'/resources/dashboard/'.$child_widget_name.'.php');
echo "<div class='child_widget ".$dashboard_details_state."' id='".$dashboard_id."' draggable='false'>\n"; echo "<div class='child_widget ".$widget_details_state."' id='".$widget_id."' draggable='false'>\n";
if (file_exists($path_array[0])) { if (file_exists($path_array[0])) {
include $path_array[0]; include $path_array[0];
} }
@@ -185,8 +186,8 @@ foreach ($parent_widgets as $row) {
} }
echo " </div>\n"; echo " </div>\n";
//if (empty($dashboard_details_state) || $dashboard_details_state != "disabled") { //if (empty($widget_details_state) || $widget_details_state != "disabled") {
// echo " <div class='hud_details hud_box' id='hud_icon_details' style='padding: 20px; 10%; overflow: auto; ".(!empty($row['dashboard_detail_background_color']) ? "background: ".$row['dashboard_detail_background_color'].";" : null)."'>".str_replace("\r", '<br>', escape($dashboard_content_details))."</div>\n"; // echo " <div class='hud_details hud_box' id='hud_icon_details' style='padding: 20px; 10%; overflow: auto; ".(!empty($row['widget_detail_background_color']) ? "background: ".$row['widget_detail_background_color'].";" : null)."'>".str_replace("\r", '<br>', escape($widget_content_details))."</div>\n";
//} //}
//echo " <span class='hud_expander' onclick=\"$('#hud_icon_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>"; //echo " <span class='hud_expander' onclick=\"$('#hud_icon_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
echo "</div>\n"; echo "</div>\n";

View File

@@ -1,41 +1,43 @@
<?php <?php
//domains icon //domains icon
$array['dashboard'][$x]['dashboard_uuid'] = 'c41e7619-e213-49fd-a82f-df8fb8c46ad0'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Domains'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'c41e7619-e213-49fd-a82f-df8fb8c46ad0';
$array['dashboard'][$x]['dashboard_path'] = 'domains/domains.php'; $array['dashboard_widgets'][$x]['widget_name'] = 'Domains';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-earth-americas'; $array['dashboard_widgets'][$x]['widget_path'] = 'domains/domains';
$array['dashboard'][$x]['dashboard_icon_color'] = '#bfbfbf'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-solid fa-earth-americas';
$array['dashboard'][$x]['dashboard_url'] = '/core/domains/domains.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#bfbfbf';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/core/domains/domains.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = 'icon'; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = ['icon']; $array['dashboard_widgets'][$x]['widget_chart_type'] = 'icon';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = ['icon'];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_number_background_color'] = '#0292FF'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '#0292FF';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '65'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '65';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'd66a5e22-6d5a-49a8-8e7d-3785247d8dfa'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'c41e7619-e213-49fd-a82f-df8fb8c46ad0'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'd66a5e22-6d5a-49a8-8e7d-3785247d8dfa';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'c41e7619-e213-49fd-a82f-df8fb8c46ad0';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
?> ?>

View File

@@ -5,23 +5,23 @@
require_once "resources/check_auth.php"; require_once "resources/check_auth.php";
//convert to a key //convert to a key
$dashboard_key = str_replace(' ', '_', strtolower($dashboard_name)); $widget_key = str_replace(' ', '_', strtolower($widget_name));
//add multi-lingual support //add multi-lingual support
$language = new text; $language = new text;
$text = $language->get($_SESSION['domain']['language']['code'], dirname($dashboard_url)); $text = $language->get($_SESSION['domain']['language']['code'], dirname($widget_url));
//get the dashboard label //get the dashboard label
$dashboard_label = $text['title-'.$dashboard_key]; $widget_label = $text['title-'.$widget_key];
if (empty($dashboard_label)) { if (empty($widget_label)) {
$dashboard_label = $dashboard_name; $widget_label = $widget_name;
} }
//prepare variables //prepare variables
$dashboard_target = ($dashboard_target == 'new') ? '_blank' : '_self'; $widget_target = ($widget_target == 'new') ? '_blank' : '_self';
$window_parameters = ''; $window_parameters = '';
if (!empty($dashboard_width) && !empty($dashboard_height)) { if (!empty($widget_width) && !empty($widget_height)) {
$window_parameters .= "width=".$dashboard_width.",height=".$dashboard_height; $window_parameters .= "width=".$widget_width.",height=".$widget_height;
} }
//get the domain count for enabled domains //get the domain count for enabled domains
@@ -33,15 +33,15 @@
//dashboard icon //dashboard icon
echo "<div class='hud_box'>\n"; echo "<div class='hud_box'>\n";
echo " <div class='hud_content' ".(empty($dashboard_details_state) || $dashboard_details_state != "disabled" ? "onclick=\"$('#hud_icon_details').slideToggle('fast');\"" : null).">\n"; echo " <div class='hud_content' ".(empty($widget_details_state) || $widget_details_state != "disabled" ? "onclick=\"$('#hud_icon_details').slideToggle('fast');\"" : null).">\n";
echo " <span class='hud_title' onclick=\"window.open('".$dashboard_url."', '".$dashboard_target."', '".$window_parameters."')\">".escape($dashboard_label)."</span>"; echo " <span class='hud_title' onclick=\"window.open('".$widget_url."', '".$widget_target."', '".$window_parameters."')\">".escape($widget_label)."</span>";
echo " <div style='position: relative; display: inline-block;'>\n"; echo " <div style='position: relative; display: inline-block;'>\n";
echo " <span class='hud_stat' onclick=\"window.open('".$dashboard_url."', '".$dashboard_target."', '".$window_parameters."')\"><i class=\"fas ".$dashboard_icon."\"></i></span>\n"; echo " <span class='hud_stat' onclick=\"window.open('".$widget_url."', '".$widget_target."', '".$window_parameters."')\"><i class=\"fas ".$widget_icon."\"></i></span>\n";
echo " <span style=\"background-color: ".(!empty($dashboard_number_background_color) ? $dashboard_number_background_color : '#0292FF')."; color: ".(!empty($dashboard_number_text_color) ? $dashboard_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 22px; left: 25px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$domain_count."</span>\n"; echo " <span style=\"background-color: ".(!empty($widget_number_background_color) ? $widget_number_background_color : '#0292FF')."; color: ".(!empty($widget_number_text_color) ? $widget_number_text_color : '#ffffff')."; font-size: 12px; font-weight: bold; text-align: center; position: absolute; top: 22px; left: 25px; padding: 2px 7px 1px 7px; border-radius: 10px; white-space: nowrap;\">".$domain_count."</span>\n";
echo " </div>\n"; echo " </div>\n";
echo " </div>\n"; echo " </div>\n";
if (empty($dashboard_details_state) || $dashboard_details_state != "disabled") { if (empty($widget_details_state) || $widget_details_state != "disabled") {
echo " <div class='hud_details hud_box' id='hud_icon_details' style='padding: 20px; 10%; overflow: auto; ".(!empty($row['dashboard_detail_background_color']) ? "background: ".$row['dashboard_detail_background_color'].";" : null)."'>".str_replace("\r", '<br>', escape($dashboard_content_details))."</div>\n"; echo " <div class='hud_details hud_box' id='hud_icon_details' style='padding: 20px; 10%; overflow: auto; ".(!empty($row['widget_detail_background_color']) ? "background: ".$row['widget_detail_background_color'].";" : null)."'>".str_replace("\r", '<br>', escape($widget_content_details))."</div>\n";
} }
echo " <span class='hud_expander' onclick=\"$('#hud_icon_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>"; echo " <span class='hud_expander' onclick=\"$('#hud_icon_details').slideToggle('fast');\"><span class='fas fa-ellipsis-h'></span></span>";
echo "</div>\n"; echo "</div>\n";

View File

@@ -1,132 +1,142 @@
<?php <?php
//users icon //users icon
$array['dashboard'][$x]['dashboard_uuid'] = '57fd7761-6ffb-4a11-bdf0-4ce632f50c3c'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Users'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '57fd7761-6ffb-4a11-bdf0-4ce632f50c3c';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard_widgets'][$x]['widget_name'] = 'Users';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-user-group'; $array['dashboard_widgets'][$x]['widget_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon_color'] = '#0292FF'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-solid fa-user-group';
$array['dashboard'][$x]['dashboard_url'] = '/core/users/users.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#0292FF';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/core/users/users.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'bde17db3-9944-45bb-a556-fc93463fab92'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '57fd7761-6ffb-4a11-bdf0-4ce632f50c3c'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'bde17db3-9944-45bb-a556-fc93463fab92';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '57fd7761-6ffb-4a11-bdf0-4ce632f50c3c';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'eb38610d-0dab-42e7-ac50-317a2d374c01'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '57fd7761-6ffb-4a11-bdf0-4ce632f50c3c'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'eb38610d-0dab-42e7-ac50-317a2d374c01';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '57fd7761-6ffb-4a11-bdf0-4ce632f50c3c';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$x++; $x++;
//account settings icon //account settings icon
$array['dashboard'][$x]['dashboard_uuid'] = '8aa9bb66-7a62-4a90-b52e-68bd4ccf325f'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Account Settings'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = '8aa9bb66-7a62-4a90-b52e-68bd4ccf325f';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard_widgets'][$x]['widget_name'] = 'Account Settings';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-user-gear'; $array['dashboard_widgets'][$x]['widget_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon_color'] = '#0292FF'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-solid fa-user-gear';
$array['dashboard'][$x]['dashboard_url'] = '/core/users/user_edit.php?id=user'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#0292FF';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/core/users/user_edit.php?id=user';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '50'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '50';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'bbb4790c-bbaf-4497-984f-610e6ee473eb'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '8aa9bb66-7a62-4a90-b52e-68bd4ccf325f'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'bbb4790c-bbaf-4497-984f-610e6ee473eb';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'superadmin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '8aa9bb66-7a62-4a90-b52e-68bd4ccf325f';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'superadmin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '342510b4-1402-4cd4-b514-b73836828feb'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '8aa9bb66-7a62-4a90-b52e-68bd4ccf325f'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '342510b4-1402-4cd4-b514-b73836828feb';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '8aa9bb66-7a62-4a90-b52e-68bd4ccf325f';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = 'aecc2944-4a09-484e-ae00-85b70bc7e5b8'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = '8aa9bb66-7a62-4a90-b52e-68bd4ccf325f'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = 'aecc2944-4a09-484e-ae00-85b70bc7e5b8';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = '8aa9bb66-7a62-4a90-b52e-68bd4ccf325f';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'user';
$x++; $x++;
//logout icon //logout icon
$array['dashboard'][$x]['dashboard_uuid'] = 'b04ad600-9acc-45e5-a89a-d7a59a6fcb4c'; $array['dashboard_widgets'][$x]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_name'] = 'Logout'; $array['dashboard_widgets'][$x]['dashboard_widget_uuid'] = 'b04ad600-9acc-45e5-a89a-d7a59a6fcb4c';
$array['dashboard'][$x]['dashboard_path'] = 'dashboard/icon'; $array['dashboard_widgets'][$x]['widget_name'] = 'Logout';
$array['dashboard'][$x]['dashboard_icon'] = 'fa-solid fa-right-from-bracket'; $array['dashboard_widgets'][$x]['widget_path'] = 'dashboard/icon';
$array['dashboard'][$x]['dashboard_icon_color'] = '#0292FF'; $array['dashboard_widgets'][$x]['widget_icon'] = 'fa-solid fa-right-from-bracket';
$array['dashboard'][$x]['dashboard_url'] = '/logout.php'; $array['dashboard_widgets'][$x]['widget_icon_color'] = '#0292FF';
$array['dashboard'][$x]['dashboard_target'] = 'self'; $array['dashboard_widgets'][$x]['widget_url'] = '/logout.php';
$array['dashboard'][$x]['dashboard_width'] = ''; $array['dashboard_widgets'][$x]['widget_target'] = 'self';
$array['dashboard'][$x]['dashboard_height'] = ''; $array['dashboard_widgets'][$x]['widget_width'] = '';
$array['dashboard'][$x]['dashboard_content'] = ''; $array['dashboard_widgets'][$x]['widget_height'] = '';
$array['dashboard'][$x]['dashboard_content_text_align'] = ''; $array['dashboard_widgets'][$x]['widget_content'] = '';
$array['dashboard'][$x]['dashboard_content_details'] = ''; $array['dashboard_widgets'][$x]['widget_content_text_align'] = '';
$array['dashboard'][$x]['dashboard_chart_type'] = ''; $array['dashboard_widgets'][$x]['widget_content_details'] = '';
$array['dashboard'][$x]['dashboard_chart_type_options'] = []; $array['dashboard_widgets'][$x]['widget_chart_type'] = '';
$array['dashboard'][$x]['dashboard_label_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_chart_type_options'] = [];
$array['dashboard'][$x]['dashboard_label_text_color'] = '#444444'; $array['dashboard_widgets'][$x]['widget_label_enabled'] = 'true';
$array['dashboard'][$x]['dashboard_label_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color'] = '#444444';
$array['dashboard'][$x]['dashboard_label_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_label_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_label_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_number_text_color'] = ''; $array['dashboard_widgets'][$x]['widget_number_background_color'] = '';
$array['dashboard'][$x]['dashboard_number_text_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_number_text_color'] = '';
$array['dashboard'][$x]['dashboard_background_color'] = '#ffffff'; $array['dashboard_widgets'][$x]['widget_number_text_color_hover'] = '';
$array['dashboard'][$x]['dashboard_background_color_hover'] = ''; $array['dashboard_widgets'][$x]['widget_background_color'] = '#ffffff';
$array['dashboard'][$x]['dashboard_detail_background_color'] = ''; $array['dashboard_widgets'][$x]['widget_background_color_hover'] = '';
$array['dashboard'][$x]['dashboard_column_span'] = '1'; $array['dashboard_widgets'][$x]['widget_detail_background_color'] = '';
$array['dashboard'][$x]['dashboard_row_span'] = '1'; $array['dashboard_widgets'][$x]['widget_column_span'] = '1';
$array['dashboard'][$x]['dashboard_details_state'] = 'disabled'; $array['dashboard_widgets'][$x]['widget_row_span'] = '1';
$array['dashboard'][$x]['dashboard_order'] = '55'; $array['dashboard_widgets'][$x]['widget_details_state'] = 'disabled';
$array['dashboard'][$x]['dashboard_enabled'] = 'true'; $array['dashboard_widgets'][$x]['widget_order'] = '55';
$array['dashboard'][$x]['dashboard_description'] = ''; $array['dashboard_widgets'][$x]['widget_enabled'] = 'true';
$array['dashboard_widgets'][$x]['widget_description'] = '';
$y = 0; $y = 0;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '226ba3a9-ba3c-46f9-ab9e-05e89bdaa7fd'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'b04ad600-9acc-45e5-a89a-d7a59a6fcb4c'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '226ba3a9-ba3c-46f9-ab9e-05e89bdaa7fd';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'admin'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'b04ad600-9acc-45e5-a89a-d7a59a6fcb4c';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'admin';
$y++; $y++;
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = '3cf3a248-c3e4-4403-9150-687771e85b10'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_uuid'] = '3e2cbaa4-2bec-41b2-a626-999a59b8b19c';
$array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = 'b04ad600-9acc-45e5-a89a-d7a59a6fcb4c'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_group_uuid'] = '3cf3a248-c3e4-4403-9150-687771e85b10';
$array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = 'user'; $array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['dashboard_widget_uuid'] = 'b04ad600-9acc-45e5-a89a-d7a59a6fcb4c';
$array['dashboard_widgets'][$x]['dashboard_widget_groups'][$y]['group_name'] = 'user';
?> ?>

View File

@@ -947,7 +947,7 @@
//list page functions //list page functions
{literal} {literal}
function list_all_toggle(modifier) { function list_all_toggle(modifier) {
var checkboxes = (modifier !== undefined) ? document.getElementsByClassName('checkbox_'+modifier) : document.querySelectorAll("input[type='checkbox']"); var checkboxes = (modifier !== undefined) ? document.getElementsByClassName('checkbox_'+modifier) : document.querySelectorAll("input[type='checkbox']:not([id*='_enabled'])");
var checkbox_checked = document.getElementById('checkbox_all' + (modifier !== undefined ? '_'+modifier : '')).checked; var checkbox_checked = document.getElementById('checkbox_all' + (modifier !== undefined ? '_'+modifier : '')).checked;
for (var i = 0, max = checkboxes.length; i < max; i++) { for (var i = 0, max = checkboxes.length; i < max; i++) {
checkboxes[i].checked = checkbox_checked; checkboxes[i].checked = checkbox_checked;