From 19defb95a38fd985a3d57c2e092ec033245dc1f7 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 16 Dec 2024 19:33:32 +0100 Subject: [PATCH] Added update script --- piusv/webif/__init__.py | 8 ++++---- piusv/webif/templates/index.html | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/piusv/webif/__init__.py b/piusv/webif/__init__.py index e58430c8d..c89a8f6c3 100755 --- a/piusv/webif/__init__.py +++ b/piusv/webif/__init__.py @@ -102,10 +102,10 @@ def get_data_html(self, dataSet=None): data['items'] = {} for item in self.plugin.item_list: - data['items'][item.property.path] = {} - data['items'][item.property.path]['value'] = item.property.value - data['items'][item.property.path]['last_update'] = item.property.last_update.strftime('%d.%m.%Y %H:%M:%S') - data['items'][item.property.path]['last_change'] = item.property.last_change.strftime('%d.%m.%Y %H:%M:%S') + data['items'][item.id()] = {} + data['items'][item.id()]['value'] = item.property.value + data['items'][item.id()]['last_update'] = item.property.last_update.strftime('%d.%m.%Y %H:%M:%S') + data['items'][item.id()]['last_change'] = item.property.last_change.strftime('%d.%m.%Y %H:%M:%S') data['plugin_suspended'] = self.plugin.suspended data['maintenance'] = True if self.plugin.log_level <= 20 else False try: diff --git a/piusv/webif/templates/index.html b/piusv/webif/templates/index.html index ffcad4fe5..e06ed6669 100755 --- a/piusv/webif/templates/index.html +++ b/piusv/webif/templates/index.html @@ -12,10 +12,24 @@ Additional script tag for plugin specific javascript code go into this block --> {% block pluginscripts %} + + {% endblock pluginscripts %} {% block headtable %} - +{{ p.suspended }}