@@ -23,7 +23,7 @@ public function handle(): int
2323 $ connectionName = $ this ->option ('connection ' );
2424
2525 $ this ->newLine ();
26- $ this ->omni ->roundedBox ('Elasticsearch Status ' , 'text- cyan-500 ' , ' text-cyan-500 ' );
26+ $ this ->omni ->titleBar ('Elasticsearch Status ' , 'cyan ' );
2727 $ this ->newLine ();
2828
2929 try {
@@ -58,8 +58,7 @@ public function handle(): int
5858 $ this ->omni ->tableRow ('Index Prefix ' , $ prefix );
5959 $ this ->newLine ();
6060
61- $ this ->omni ->newLoader ('dots ' );
62- $ result = $ this ->omni ->runTask ('Connecting to Elasticsearch ' , function () use ($ connection ) {
61+ $ result = $ this ->omni ->task ('Connecting to Elasticsearch ' , function () use ($ connection ) {
6362 try {
6463 $ info = $ connection ->getClientInfo ();
6564
@@ -84,11 +83,11 @@ public function handle(): int
8483 }
8584 });
8685
87- if (empty ( $ result[ ' data ' ] )) {
86+ if (! $ result || $ result -> isError ( )) {
8887 $ this ->newLine ();
8988 $ this ->omni ->statusError (
9089 'CONNECTION FAILED ' ,
91- $ result[ ' details ' ] ?? 'Unable to connect ' ,
90+ $ result ? $ result -> details : 'Unable to connect ' ,
9291 [
9392 'Check that Elasticsearch is running ' ,
9493 'Verify hosts, credentials, and auth_type in config/database.php ' ,
@@ -99,8 +98,8 @@ public function handle(): int
9998 return self ::FAILURE ;
10099 }
101100
102- $ info = $ result[ ' data ' ] ['info ' ];
103- $ license = $ result[ ' data ' ] ['license ' ];
101+ $ info = $ result-> data ['info ' ];
102+ $ license = $ result-> data ['license ' ];
104103
105104 $ this ->newLine ();
106105 $ this ->omni ->tableHeader ('Cluster ' , 'Value ' );
0 commit comments