remove test fake code
This commit is contained in:
@@ -1,23 +1,8 @@
|
|||||||
from inverter_base import InverterBase
|
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):
|
def _get_device_icon(client_mode: bool):
|
||||||
|
'''returns the icon for the device conntection'''
|
||||||
if client_mode:
|
if client_mode:
|
||||||
return 'fa-download fa-rotate-180'
|
return 'fa-download fa-rotate-180'
|
||||||
|
|
||||||
@@ -25,6 +10,7 @@ def _get_device_icon(client_mode: bool):
|
|||||||
|
|
||||||
|
|
||||||
def _get_cloud_icon(emu_mode: bool):
|
def _get_cloud_icon(emu_mode: bool):
|
||||||
|
'''returns the icon for the cloud conntection'''
|
||||||
if emu_mode:
|
if emu_mode:
|
||||||
return 'fa-cloud-arrow-down-alt'
|
return 'fa-cloud-arrow-down-alt'
|
||||||
|
|
||||||
@@ -32,6 +18,7 @@ def _get_cloud_icon(emu_mode: bool):
|
|||||||
|
|
||||||
|
|
||||||
def _get_row(inv: InverterBase):
|
def _get_row(inv: InverterBase):
|
||||||
|
'''build one row for the connection table'''
|
||||||
ip1, port1 = inv.addr
|
ip1, port1 = inv.addr
|
||||||
client_mode = inv.client_mode
|
client_mode = inv.client_mode
|
||||||
icon1 = ''
|
icon1 = ''
|
||||||
@@ -57,6 +44,7 @@ def _get_row(inv: InverterBase):
|
|||||||
|
|
||||||
|
|
||||||
def get_table_data():
|
def get_table_data():
|
||||||
|
'''build the connection table'''
|
||||||
table = {
|
table = {
|
||||||
"col_classes": [
|
"col_classes": [
|
||||||
"w3-hide-small w3-hide-medium", "w3-hide-large",
|
"w3-hide-small w3-hide-medium", "w3-hide-large",
|
||||||
@@ -70,7 +58,6 @@ def get_table_data():
|
|||||||
]],
|
]],
|
||||||
"tbody": []
|
"tbody": []
|
||||||
}
|
}
|
||||||
table['tbody'].append(_get_row2())
|
|
||||||
for inverter in InverterBase:
|
for inverter in InverterBase:
|
||||||
table['tbody'].append(_get_row(inverter))
|
table['tbody'].append(_get_row(inverter))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user