Fixes: Simplify PageController, fix config API, update deployment package (2026-02-17)

- Removed service dependencies from PageController constructor
- Fixed AdminController config API signatures
- Cleaned up Application.php resource loading
- Updated template with proper resource includes
- Simplified routes.php
- Reduced analyticshub.zip from 50KB to 27KB
- Status: Fixed and ready for redeployment
This commit is contained in:
WLTBAgent
2026-02-22 06:56:57 +00:00
parent 69dfdc5f87
commit 49b6b37277
8 changed files with 94 additions and 59 deletions

View File

@@ -5,7 +5,6 @@ declare(strict_types=1);
namespace OCA\AnalyticsHub\AppInfo;
use OCP\AppFramework\App;
use OCP\Util;
/**
* Application class for Mini-CMO Analytics Hub
@@ -18,9 +17,5 @@ class Application extends App {
public function __construct(array $urlParams = []) {
parent::__construct(self::APP_ID, $urlParams);
// Load scripts and styles for admin page
Util::addStyle(self::APP_ID, 'admin');
Util::addScript(self::APP_ID, 'admin');
}
}

View File

@@ -13,6 +13,6 @@
<php min-version="7.4"/>
</dependencies>
<navigation>
<admin>analyticshub.page.index</admin>
<admin>page#index</admin>
</navigation>
</info>

View File

@@ -10,24 +10,22 @@ namespace OCA\AnalyticsHub;
return [
'routes' => [
// Admin routes
// Main page route
[
'name' => 'page#index',
'url' => '/',
'verb' => 'GET',
'requirements' => [],
],
// Admin configuration routes (AJAX)
[
'name' => 'admin#load',
'url' => '/admin/load',
'verb' => 'GET',
'requirements' => [],
],
[
'name' => 'admin#save',
'url' => '/admin/save',
'verb' => 'POST',
'requirements' => [],
],
],
];