File tree Expand file tree Collapse file tree 3 files changed +61
-2
lines changed Expand file tree Collapse file tree 3 files changed +61
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,13 @@ foo@bar:~/MultigamingPanel$ npm run prod && php artisan migrate
52
52
53
53
###### Step 6 Configure your webserver to point to the public/ sub-directory
54
54
55
+ ###### Step 6 Open the required ports
56
+ ``` console
57
+ foo@bar:~/MultigamingPanel $ ufw allow 443
58
+ foo@bar:~/MultigamingPanel $ ufw allow 6001
59
+ foo@bar:~/MultigamingPanel $ ufw allow 6660
60
+ ```
61
+
55
62
## Emodyz Sponsors
56
63
57
64
You can sponsor us through various means.
Original file line number Diff line number Diff line change 4
4
5
5
use App \Actions \Emodyz \Settings \EditSettings ;
6
6
use App \Http \Requests \Settings \EditVoiceSettingsRequest ;
7
+ use App \Services \Bridge \BridgeClientService ;
7
8
use App \Settings \VoiceSettings ;
9
+ use Exception ;
8
10
use Illuminate \Http \RedirectResponse ;
9
11
use Illuminate \Http \Request ;
10
12
use Inertia \Response ;
@@ -22,13 +24,18 @@ public function __construct()
22
24
/**
23
25
* Display a listing of the resource.
24
26
*
25
- * @param VoiceSettings $voiceSettings
27
+ * @param VoiceSettings $voiceSettings
26
28
* @return Response|ResponseFactory
29
+ * @throws Exception
27
30
*/
28
31
public function edit (VoiceSettings $ voiceSettings )
29
32
{
33
+ $ bridgeClient = new BridgeClientService ();
34
+
35
+ $ version = $ bridgeClient ->getControlPanelVersion ();
36
+
30
37
return inertia ('Settings/Edit ' , [
31
- 'currentVersion ' => ' v0.21.0 ' ,
38
+ 'currentVersion ' => $ version ,
32
39
'voiceSettings ' => $ voiceSettings ->toArray ()
33
40
]);
34
41
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace App \Services \Bridge ;
4
+
5
+ use Bridge \BridgeClient ;
6
+ use Bridge \GetVersionRequest ;
7
+ use Exception ;
8
+ use Illuminate \Contracts \Filesystem \FileNotFoundException ;
9
+ use Illuminate \Support \Facades \Storage ;
10
+
11
+ class BridgeClientService
12
+ {
13
+ /**
14
+ * @var BridgeClient
15
+ */
16
+ private BridgeClient $ client ;
17
+
18
+ /**
19
+ * BridgeClientService constructor.
20
+ * @throws FileNotFoundException
21
+ */
22
+ public function __construct ()
23
+ {
24
+ $ this ->client = new BridgeClient ('host.docker.internal:6660 ' , [
25
+ 'credentials ' => \Grpc \ChannelCredentials::createSsl (
26
+ Storage::disk ('bridge ' )->get ('ca.pem ' ),
27
+ Storage::disk ('bridge ' )->get ('cert.key ' ),
28
+ Storage::disk ('bridge ' )->get ('cert.crt ' )
29
+ ),
30
+ ]);
31
+ }
32
+
33
+ /**
34
+ * @throws Exception
35
+ * @return string
36
+ */
37
+ public function getControlPanelVersion (): string {
38
+ $ request = new GetVersionRequest ();
39
+ list ($ response , $ status ) = $ this ->client ->getVersion ($ request )->wait ();
40
+ if ($ status ->code !== \Grpc \STATUS_OK ) {
41
+ throw new Exception ('Error while getting version: ' . $ status ->code . ", " . $ status ->details . PHP_EOL );
42
+ }
43
+ return $ response ->getVersion ();
44
+ }
45
+ }
You can’t perform that action at this time.
0 commit comments