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"
347
347
name: ' # Peak Connections'
348
348
},
349
349
{
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 ,
352
352
type: ' bar' ,
353
353
name: ' # Websocket Messages'
354
354
},
355
355
{
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 ,
358
358
type: ' bar' ,
359
359
name: ' # API Messages'
360
360
},
Original file line number Diff line number Diff line change @@ -128,12 +128,6 @@ protected function configureStatistics()
128
128
return new $ class ;
129
129
});
130
130
131
- $ this ->laravel ->singleton (StatisticsStore::class, function () {
132
- $ class = config ('websockets.statistics.store ' );
133
-
134
- return new $ class ;
135
- });
136
-
137
131
if (! $ this ->option ('disable-statistics ' )) {
138
132
$ intervalInSeconds = $ this ->option ('statistics-interval ' ) ?: config ('websockets.statistics.interval_in_seconds ' , 3600 );
139
133
Original file line number Diff line number Diff line change 2
2
3
3
namespace BeyondCode \LaravelWebSockets ;
4
4
5
+ use BeyondCode \LaravelWebSockets \Contracts \StatisticsStore ;
5
6
use BeyondCode \LaravelWebSockets \Dashboard \Http \Controllers \AuthenticateDashboard ;
6
7
use BeyondCode \LaravelWebSockets \Dashboard \Http \Controllers \SendMessage ;
7
8
use BeyondCode \LaravelWebSockets \Dashboard \Http \Controllers \ShowDashboard ;
@@ -34,6 +35,8 @@ public function boot()
34
35
__DIR__ .'/../database/migrations/0000_00_00_000000_rename_statistics_counters.php ' => database_path ('migrations/0000_00_00_000000_rename_statistics_counters.php ' ),
35
36
], 'migrations ' );
36
37
38
+ $ this ->registerStatistics ();
39
+
37
40
$ this ->registerDashboard ();
38
41
39
42
$ this ->registerCommands ();
@@ -50,6 +53,20 @@ public function register()
50
53
$ this ->registerManagers ();
51
54
}
52
55
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
+
53
70
/**
54
71
* Regsiter the dashboard components.
55
72
*
You can’t perform that action at this time.
0 commit comments