diff --git a/public_html/pages/components.php b/public_html/pages/components.php index ebdbab3..6ab9387 100644 --- a/public_html/pages/components.php +++ b/public_html/pages/components.php @@ -48,103 +48,54 @@ try { // list of all component events (default) -//if ($jitsi_component) { - try { - $component = new Component($db); +$component = new Component($db); - // prepare the result - $search = $component->jitsiComponents($jitsi_component, $component_id, $from_time, $until_time); +// prepare the result +$search = $component->jitsiComponents($jitsi_component, $component_id, $from_time, $until_time); - if (!empty($search)) { - $components = array(); - $components['records'] = array(); +if (!empty($search)) { + $components = array(); + $components['records'] = array(); - foreach ($search as $item) { - extract($item); - $component_record = array( - // assign title to the field in the array record - 'component' => $jitsi_component, - 'loglevel' => $loglevel, - 'time' => $time, - 'component ID' => $component_id, - 'event' => $event_type, - 'param' => $event_param, - ); - // populate the result array - array_push($components['records'], $component_record); - } - } - - } catch (Exception $e) { - $error = 'Error: ' . $e->getMessage(); - include 'templates/message.php'; - exit(); + foreach ($search as $item) { + extract($item); + $component_record = array( + // assign title to the field in the array record + 'component' => $jitsi_component, + 'loglevel' => $loglevel, + 'time' => $time, + 'component ID' => $component_id, + 'event' => $event_type, + 'param' => $event_param, + ); + // populate the result array + array_push($components['records'], $component_record); } +} - // display the result +// prepare the widget +$widget['full'] = false; +$widget['name'] = 'AllComponents'; +$widget['collapsible'] = false; +$widget['collapsed'] = false; +$widget['filter'] = true; - // format the header message - echo "