diff --git a/composer.json b/composer.json index e13de570..92886ba2 100755 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "php": "^8.4", "php-http/guzzle7-adapter": "^1.1", "php-di/php-di": "7.1.1", - "dhope0000/lxd": "^1.2.0", + "dhope0000/lxd": "^1.3.0", "vlucas/phpdotenv": "^5.6", "symfony/http-foundation": "^7.3.6", "symfony/filesystem": "^7.3.6", diff --git a/composer.lock b/composer.lock index dd58cdb7..df9f6927 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a3f4139e1fdc87de3e8b66b5f846f8d2", + "content-hash": "fa97b2bd4a8bc092159f9cde216e15d4", "packages": [ { "name": "cakephp/chronos", @@ -488,16 +488,16 @@ }, { "name": "dhope0000/lxd", - "version": "v1.2.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/turtle0x1/php-lxd.git", - "reference": "5df1967e69f3b86aebb1194d7d6ade704e45a464" + "reference": "d5da20962a4b7f7ce71ce6fc890041d227c2ea4c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/turtle0x1/php-lxd/zipball/5df1967e69f3b86aebb1194d7d6ade704e45a464", - "reference": "5df1967e69f3b86aebb1194d7d6ade704e45a464", + "url": "https://api.github.com/repos/turtle0x1/php-lxd/zipball/d5da20962a4b7f7ce71ce6fc890041d227c2ea4c", + "reference": "d5da20962a4b7f7ce71ce6fc890041d227c2ea4c", "shasum": "" }, "require": { @@ -556,9 +556,9 @@ ], "support": { "issues": "https://github.com/turtle0x1/php-lxd/issues", - "source": "https://github.com/turtle0x1/php-lxd/tree/v1.2.0" + "source": "https://github.com/turtle0x1/php-lxd/tree/v1.3.0" }, - "time": "2025-11-06T23:21:57+00:00" + "time": "2026-03-14T17:52:09+00:00" }, { "name": "doctrine/lexer", diff --git a/src/classes/Controllers/Hosts/OS/Applications/GetApplicationController.php b/src/classes/Controllers/Hosts/OS/Applications/GetApplicationController.php new file mode 100755 index 00000000..341bdf12 --- /dev/null +++ b/src/classes/Controllers/Hosts/OS/Applications/GetApplicationController.php @@ -0,0 +1,27 @@ +fetchUserDetails->isAdmin($userId); + if (!$isAdmin) { + throw new \Exception('No access', 1); + } + return $host->incusOS->applications->info($application); + } +} diff --git a/src/classes/Controllers/Hosts/OS/GetHostOSController.php b/src/classes/Controllers/Hosts/OS/GetHostOSController.php new file mode 100755 index 00000000..2e21c822 --- /dev/null +++ b/src/classes/Controllers/Hosts/OS/GetHostOSController.php @@ -0,0 +1,27 @@ +fetchUserDetails->isAdmin($userId); + if (!$isAdmin) { + throw new \Exception('No access', 1); + } + return $this->getOSOverview->get($host); + } +} diff --git a/src/classes/Controllers/Hosts/OS/Services/GetServiceController.php b/src/classes/Controllers/Hosts/OS/Services/GetServiceController.php new file mode 100755 index 00000000..afbef7d5 --- /dev/null +++ b/src/classes/Controllers/Hosts/OS/Services/GetServiceController.php @@ -0,0 +1,27 @@ +fetchUserDetails->isAdmin($userId); + if (!$isAdmin) { + throw new \Exception('No access', 1); + } + return $host->incusOS->services->info($service); + } +} diff --git a/src/classes/Controllers/Hosts/OS/System/GetSystemEndpointController.php b/src/classes/Controllers/Hosts/OS/System/GetSystemEndpointController.php new file mode 100755 index 00000000..0ac48429 --- /dev/null +++ b/src/classes/Controllers/Hosts/OS/System/GetSystemEndpointController.php @@ -0,0 +1,27 @@ +fetchUserDetails->isAdmin($userId); + if (!$isAdmin) { + throw new \Exception('No access', 1); + } + return $host->incusOS->system->$endpoint->info(); + } +} diff --git a/src/classes/Tools/Hosts/OS/GetOSOverview.php b/src/classes/Tools/Hosts/OS/GetOSOverview.php new file mode 100644 index 00000000..c3b13c6e --- /dev/null +++ b/src/classes/Tools/Hosts/OS/GetOSOverview.php @@ -0,0 +1,23 @@ +incusOS->system->endpoints(); + $applications = $host->incusOS->applications->all(); + $services = $host->incusOS->services->all(); + return [ + "applications"=>$applications, + "systemEndpoints"=>$systemEndpoints, + "services"=>$services + ]; + } +} diff --git a/src/classes/Tools/Hosts/OS/System/GetSystemEndpoint.php b/src/classes/Tools/Hosts/OS/System/GetSystemEndpoint.php new file mode 100644 index 00000000..01328355 --- /dev/null +++ b/src/classes/Tools/Hosts/OS/System/GetSystemEndpoint.php @@ -0,0 +1,17 @@ +incusOS->system->$endpoint->info(); + + } +} diff --git a/src/views/boxes/server.php b/src/views/boxes/server.php index 4770e1a1..3d27b5d7 100644 --- a/src/views/boxes/server.php +++ b/src/views/boxes/server.php @@ -62,6 +62,11 @@ Proxy Devices +