This repository was archived by the owner on Feb 7, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +21
-10
lines changed
Expand file tree Collapse file tree 3 files changed +21
-10
lines changed Original file line number Diff line number Diff line change @@ -347,14 +347,14 @@ class="rounded-full px-3 py-1 inline-block text-sm"
347347 name: ' # Peak Connections'
348348 },
349349 {
350- x: data .websocket_message_count .x ,
351- y: data .websocket_message_count .y ,
350+ x: data .websocket_messages_count .x ,
351+ y: data .websocket_messages_count .y ,
352352 type: ' bar' ,
353353 name: ' # Websocket Messages'
354354 },
355355 {
356- x: data .api_message_count .x ,
357- y: data .api_message_count .y ,
356+ x: data .api_messages_count .x ,
357+ y: data .api_messages_count .y ,
358358 type: ' bar' ,
359359 name: ' # API Messages'
360360 },
Original file line number Diff line number Diff line change @@ -128,12 +128,6 @@ protected function configureStatistics()
128128 return new $ class ;
129129 });
130130
131- $ this ->laravel ->singleton (StatisticsStore::class, function () {
132- $ class = config ('websockets.statistics.store ' );
133-
134- return new $ class ;
135- });
136-
137131 if (! $ this ->option ('disable-statistics ' )) {
138132 $ intervalInSeconds = $ this ->option ('statistics-interval ' ) ?: config ('websockets.statistics.interval_in_seconds ' , 3600 );
139133
Original file line number Diff line number Diff line change 22
33namespace BeyondCode \LaravelWebSockets ;
44
5+ use BeyondCode \LaravelWebSockets \Contracts \StatisticsStore ;
56use BeyondCode \LaravelWebSockets \Dashboard \Http \Controllers \AuthenticateDashboard ;
67use BeyondCode \LaravelWebSockets \Dashboard \Http \Controllers \SendMessage ;
78use BeyondCode \LaravelWebSockets \Dashboard \Http \Controllers \ShowDashboard ;
@@ -34,6 +35,8 @@ public function boot()
3435 __DIR__ .'/../database/migrations/0000_00_00_000000_rename_statistics_counters.php ' => database_path ('migrations/0000_00_00_000000_rename_statistics_counters.php ' ),
3536 ], 'migrations ' );
3637
38+ $ this ->registerStatistics ();
39+
3740 $ this ->registerDashboard ();
3841
3942 $ this ->registerCommands ();
@@ -50,6 +53,20 @@ public function register()
5053 $ this ->registerManagers ();
5154 }
5255
56+ /**
57+ * Register the statistics-related contracts.
58+ *
59+ * @return void
60+ */
61+ protected function registerStatistics ()
62+ {
63+ $ this ->app ->singleton (StatisticsStore::class, function () {
64+ $ class = config ('websockets.statistics.store ' );
65+
66+ return new $ class ;
67+ });
68+ }
69+
5370 /**
5471 * Regsiter the dashboard components.
5572 *
You can’t perform that action at this time.
0 commit comments