diff --git a/app/pages/graphs.php b/app/pages/graphs.php new file mode 100644 index 0000000..3bf08ca --- /dev/null +++ b/app/pages/graphs.php @@ -0,0 +1,96 @@ + 'conferences', + 'graph_title' => 'Conferences in "' . htmlspecialchars($platformDetails[0]['name']) . '" over time', + 'datasets' => [] + ], + [ + 'graph_name' => 'participants', + 'graph_title' => 'Participants in "' . htmlspecialchars($platformDetails[0]['name']) . '" over time', + 'datasets' => [] + ] +]; + +// Get Jitsi API data +$conferences_api = $agentObject->getHistoricalData( + $platform_id, + 'jicofo', + 'conferences', + $from_time, + $until_time +); +$graphs[0]['datasets'][] = [ + 'data' => $conferences_api, + 'label' => 'Conferences from Jitsi API', + 'color' => 'rgba(75, 192, 192, 1)' +]; + +// Get conference data from logs +$conferences_logs = $conferenceObject->conferenceNumber( + $from_time, + $until_time +); +$graphs[0]['datasets'][] = [ + 'data' => $conferences_logs, + 'label' => 'Conferences from Logs', + 'color' => 'rgba(255, 99, 132, 1)' +]; + +// Get participants data +$participants_api = $agentObject->getHistoricalData( + $platform_id, + 'jicofo', + 'participants', + $from_time, + $until_time +); +$graphs[1]['datasets'][] = [ + 'data' => $participants_api, + 'label' => 'Participants from Jitsi API', + 'color' => 'rgba(75, 192, 192, 1)' +]; + +// Prepare data for template +$graph = $graphs; + +// prepare the widget +$widget['full'] = false; +$widget['name'] = 'Graphs'; +$widget['title'] = 'Jitsi graphs'; + +// Get any new messages +include '../app/includes/messages.php'; +include '../app/includes/messages-show.php'; + +// Load the template +include '../app/templates/graphs.php'; + +?> diff --git a/app/templates/graphs.php b/app/templates/graphs.php new file mode 100644 index 0000000..01830c3 --- /dev/null +++ b/app/templates/graphs.php @@ -0,0 +1,144 @@ + + +
+
+
+

Jitsi graphs

+ usage graphs for platform () +
+
+ +
+
+
+ + + + + + + + +
+
+
+
+ + + + + + + +