N°8641 - Dashboard editor front-end first commit for Form SDK integration.

* No dashlet edition
* Dashboard are not persisted
* Unable to load a dashboard from an endpoint (refresh)
* Grid library need proper npm integration
This commit is contained in:
Stephen Abello
2026-01-06 15:23:51 +01:00
parent 3e879c64a7
commit a713e1b56e
167 changed files with 32266 additions and 763 deletions

View File

@@ -0,0 +1,36 @@
<?php
namespace Combodo\iTop\Application\UI\Base\Layout\DashletPanel;
use Combodo\iTop\Service\Dashboard\DashletService;
class DashletPanelFactory {
public static function MakeForDashboardEditor(string $sId = null): DashletPanel
{
$oDashletPanel = new DashletPanel($sId);
$aAvailableDashlets = DashletService::GetAvailableDashlets();
foreach ($aAvailableDashlets as $sDashletClass => $aDashletInformation) {
$oDashletEntry = new DashletEntry($sDashletClass, $aDashletInformation['label'], $aDashletInformation['description'], $aDashletInformation['icon']);
if(isset($aDashletInformation['min_width'])) {
$oDashletEntry->SetDashletMinWidth($aDashletInformation['min_width']);
}
if(isset($aDashletInformation['min_height'])) {
$oDashletEntry->SetDashletMinHeight($aDashletInformation['min_height']);
}
if(isset($aDashletInformation['preferred_width'])) {
$oDashletEntry->SetDashletPreferredWidth($aDashletInformation['preferred_width']);
}
if(isset($aDashletInformation['preferred_height'])) {
$oDashletEntry->SetDashletPreferredHeight($aDashletInformation['preferred_height']);
}
$oDashletPanel->AddDashletEntry($oDashletEntry);
}
return $oDashletPanel;
}
}