From a31484d414637b334d7af4003eb2e1a5bc540d37 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 14 Sep 2024 03:55:20 -0600 Subject: [PATCH] Update dashboard.php --- core/dashboard/dashboard.php | 105 ++--------------------------------- 1 file changed, 5 insertions(+), 100 deletions(-) diff --git a/core/dashboard/dashboard.php b/core/dashboard/dashboard.php index c205a801ee..941287d813 100644 --- a/core/dashboard/dashboard.php +++ b/core/dashboard/dashboard.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2021-2023 + Portions created by the Initial Developer are Copyright (C) 2021-2024 the Initial Developer. All Rights Reserved. */ @@ -83,103 +83,6 @@ $search = strtolower($_GET["search"]); } - -//action add or update -// if (isset($_REQUEST["export"])) { -// $export = $_REQUEST["export"]; -// } -// -//expore settings -// if (isset($export) && $export == 'true') { -// -// //get the dashboard -// $sql = "select "; -// $sql .= "dashboard_uuid, "; -// $sql .= "dashboard_name, "; -// $sql .= "dashboard_path, "; -// $sql .= "dashboard_order, "; -// $sql .= "cast(dashboard_enabled as text), "; -// $sql .= "dashboard_description "; -// $sql .= "from v_dashboard "; -// $database = new database; -// $dashboard_widgets = $database->select($sql, $parameters, 'all'); -// unset($sql, $parameters); -// -// //prepare the array -// if (is_array($dashboard_widgets)) { -// $x = 0; -// $y = 0; -// foreach ($dashboard_widgets as $row) { -// //add to the array -// $array['dashboard'][$x]['dashboard_uuid'] = $row["dashboard_uuid"]; -// $array['dashboard'][$x]['dashboard_name'] = $row["dashboard_name"]; -// $array['dashboard'][$x]['dashboard_path'] = $row["dashboard_path"]; -// $array['dashboard'][$x]['dashboard_order'] = $row["dashboard_order"]; -// $array['dashboard'][$x]['dashboard_enabled'] = $row["dashboard_enabled"] ?? 'false'; -// $array['dashboard'][$x]['dashboard_description'] = $row["dashboard_description"]; -// -// //get the dashboard groups -// $sql = "select "; -// $sql .= "dashboard_group_uuid, "; -// $sql .= "dashboard_uuid, "; -// $sql .= "group_uuid, "; -// $sql .= "(select group_name from v_groups where v_dashboard_groups.group_uuid = group_uuid) as group_name "; -// $sql .= "from v_dashboard_groups "; -// $sql .= "where dashboard_uuid = :dashboard_uuid "; -// $parameters['dashboard_uuid'] = $row["dashboard_uuid"]; -// $database = new database; -// $dashboard_groups = $database->select($sql, $parameters, 'all'); -// unset($sql, $parameters); -// if (is_array($dashboard_groups)) { -// $y = 0; -// foreach ($dashboard_groups as $row) { -// $array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_group_uuid'] = $row["dashboard_group_uuid"]; -// $array['dashboard'][$x]['dashboard_groups'][$y]['dashboard_uuid'] = $row["dashboard_uuid"]; -// //$array['dashboard'][$x]['dashboard_groups'][$y]['group_uuid'] = $row["group_uuid"]; -// $array['dashboard'][$x]['dashboard_groups'][$y]['group_name'] = $row["group_name"]; -// $y++; -// } -// } -// -// $x++; -// } -// } -// -// //write the code -// echo "\n"; -// exit; -// } - //get the count $sql = "select count(dashboard_uuid) "; $sql .= "from v_dashboard "; @@ -197,7 +100,8 @@ //get the list $sql = "select \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"; @@ -272,7 +176,6 @@ 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 "
\n"; echo "\n"; echo "\n"; @@ -287,6 +190,7 @@ } 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', '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 " ".$text['label-dashboard_description']."\n"; @@ -317,6 +221,7 @@ } echo " \n"; echo " ".escape($row['dashboard_groups'])."\n"; + //echo " ".escape($row['dashboard_icon'])."\n"; echo " ".escape($row['dashboard_order'])."\n"; if (permission_exists('dashboard_edit')) { echo " \n";