remove test fake code

This commit is contained in:
Stefan Allius
2025-04-24 22:40:32 +02:00
parent 503ca8719d
commit 267e25a071

View File

@@ -1,23 +1,8 @@
from inverter_base import InverterBase
def _get_row2():
icon1 = 'fa-upload fa-rotate-180'
ip1 = '192.168.200.194'
port1 = '39000'
icon2 = 'fa-cloud'
ip2 = '188.168.200.194'
port2 = '10000'
row = []
row.append(f'<i class="fa {icon1}"></i> {ip1}:{port1}')
row.append(f'<i class="fa {icon1}"></i> {ip1}')
row.append("Y170000000000001")
row.append(f'<i class="fa {icon2}"></i> {ip2}:{port2}')
row.append(f'<i class="fa {icon2}"></i> {ip2}')
return row
def _get_device_icon(client_mode: bool):
'''returns the icon for the device conntection'''
if client_mode:
return 'fa-download fa-rotate-180'
@@ -25,6 +10,7 @@ def _get_device_icon(client_mode: bool):
def _get_cloud_icon(emu_mode: bool):
'''returns the icon for the cloud conntection'''
if emu_mode:
return 'fa-cloud-arrow-down-alt'
@@ -32,6 +18,7 @@ def _get_cloud_icon(emu_mode: bool):
def _get_row(inv: InverterBase):
'''build one row for the connection table'''
ip1, port1 = inv.addr
client_mode = inv.client_mode
icon1 = ''
@@ -57,6 +44,7 @@ def _get_row(inv: InverterBase):
def get_table_data():
'''build the connection table'''
table = {
"col_classes": [
"w3-hide-small w3-hide-medium", "w3-hide-large",
@@ -70,7 +58,6 @@ def get_table_data():
]],
"tbody": []
}
table['tbody'].append(_get_row2())
for inverter in InverterBase:
table['tbody'].append(_get_row(inverter))