raspberrydisplay v2 init

This commit is contained in:
Luca Haid
2026-02-03 15:52:55 +01:00
parent 0cdb2140a9
commit 68e86f74f8
4 changed files with 241 additions and 232 deletions

View File

@@ -70,6 +70,9 @@ class RaspberryDisplayController extends mfBaseController {
}
protected function createDisplayApi(): array|bool {
$monitorSize = $this->request->monitor_size ?? '27';
if (!in_array($monitorSize, ['27', '42', '55', '65'])) $monitorSize = '27';
$data = [
'display_label' => $this->request->display_label ?? '',
'hostname' => $this->request->hostname ?? '',
@@ -77,7 +80,7 @@ class RaspberryDisplayController extends mfBaseController {
'display_url' => $this->request->display_url ?? '',
'group_name' => $this->request->group_name ?? '',
'group_order' => (int)($this->request->group_order ?? 0),
'monitor_size' => $this->request->monitor_size ?? '27',
'monitor_size' => $monitorSize,
'hdmi_port' => (int)($this->request->hdmi_port ?? 0),
'agent_port' => (int)($this->request->agent_port ?? 5000),
'custom_style' => $this->request->custom_style ?? null,
@@ -234,10 +237,10 @@ class RaspberryDisplayController extends mfBaseController {
"BASE_URL" => self::getUrl("RaspberryDisplay"),
"DASHBOARD_URL" => self::getUrl("Dashboard"),
"MFAPPNAME" => MFAPPNAME_SLUG,
"PAGE_TITLE" => "NOC Display Manager",
"PAGE_TITLE" => "NOC Display Verwaltung",
"PATH" => [
["text" => MFAPPNAME_SLUG, "href" => self::getUrl("Dashboard")],
["text" => "NOC Display Manager", "href" => self::getUrl("RaspberryDisplay")]
["text" => "NOC Display Verwaltung", "href" => self::getUrl("RaspberryDisplay")]
]
]);
$this->layout()->set("additionalCSS", ["css/views/RaspberryDisplay.css"]);