no message

This commit is contained in:
2025-06-24 17:09:42 +02:00
parent f62626ad53
commit 98b9ce621f

View File

@@ -40,15 +40,15 @@ class PV_Visu extends IPSModule
*/
public function GetVisualizationTile()
{
$this->UpdateData();
$initialHandling = '<script>handleMessage(' . json_encode($this->UpdateData()) . ');</script>';
// Füge statisches HTML aus Datei hinzu
$module = file_get_contents(__DIR__ . '/module.html');
// Gebe alles zurück.
// Wichtig: $initialHandling nach hinten, da die Funktion handleMessage ja erst im HTML definiert wird
return $module . $initialHandling;
// HTML-Template laden und zurückgeben
$htmlPath = __DIR__ . '/module.html';
if (!file_exists($htmlPath)) {
$this->LogMessage("module.html nicht gefunden in $htmlPath", KL_ERROR);
return '';
}
return file_get_contents($htmlPath);
}
/**