feat(dash-command): add EasyEngine version to server data#1
feat(dash-command): add EasyEngine version to server data#1mrrobot47 merged 1 commit intoEasyEngine:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds the EasyEngine version to the server metadata sent to the EasyDash dashboard during server initialization. This enhancement allows the dashboard to track which version of EasyEngine is running on each integrated server, providing valuable information for management and monitoring purposes.
Key Changes
- Added
ee_versionfield to the$server_dataarray, populated from theEE_VERSIONconstant - Server metadata now includes version information alongside hostname, IP address, and organization
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| $ee_version = EE_VERSION; | ||
|
|
||
| $server_data = [ | ||
| "hostname" => $hostname, | ||
| "public_ipv4" => $public_ipv4, | ||
| "organization" => $organization, | ||
| "ee_version" => $ee_version, | ||
| ]; |
There was a problem hiding this comment.
The indentation of these lines is inconsistent with the surrounding code. Since this code is inside the else block that starts at line 123, these lines should be indented with two tabs (like lines 127-130 and 141-162), not one tab. This affects code readability and violates the existing indentation pattern in the file.
| $ee_version = EE_VERSION; | |
| $server_data = [ | |
| "hostname" => $hostname, | |
| "public_ipv4" => $public_ipv4, | |
| "organization" => $organization, | |
| "ee_version" => $ee_version, | |
| ]; | |
| $ee_version = EE_VERSION; | |
| $server_data = [ | |
| "hostname" => $hostname, | |
| "public_ipv4" => $public_ipv4, | |
| "organization" => $organization, | |
| "ee_version" => $ee_version, | |
| ]; |
| $ee_version = EE_VERSION; | ||
|
|
||
| $server_data = [ | ||
| "hostname" => $hostname, | ||
| "public_ipv4" => $public_ipv4, | ||
| "organization" => $organization, | ||
| "ee_version" => $ee_version, |
There was a problem hiding this comment.
The intermediate variable $ee_version is unnecessary. The EE_VERSION constant can be directly assigned to the array key, which would simplify the code and follow the pattern used by the other fields in the array (hostname, public_ipv4, organization).
| $ee_version = EE_VERSION; | |
| $server_data = [ | |
| "hostname" => $hostname, | |
| "public_ipv4" => $public_ipv4, | |
| "organization" => $organization, | |
| "ee_version" => $ee_version, | |
| $server_data = [ | |
| "hostname" => $hostname, | |
| "public_ipv4" => $public_ipv4, | |
| "organization" => $organization, | |
| "ee_version" => EE_VERSION, |
This pull request introduces a minor update to the server data initialization in the
initmethod ofDash_Command.php. The change ensures that the EasyEngine version is included in the server metadata.ee_versionfield to the$server_dataarray by retrieving the value from theEE_VERSIONconstant, allowing the server data to track the EasyEngine version.