switched to a monospace font in the cfg tool, padded the hashrates to appear as decimal centered, and left justified hostnames for better readability.

This commit is contained in:
UpstreamData
2022-02-22 10:49:23 -07:00
parent ef0a507306
commit bb89be64f4
5 changed files with 21 additions and 18 deletions

View File

@@ -39,13 +39,13 @@ async def export_csv(file_location, ip_list_selected):
async with aiofiles.open(file_location, mode='w') as file:
for item in ip_list_selected:
await file.write(str(
", ".join([str(part) for part in item])
", ".join([str(part).rstrip().lstrip() for part in item])
) + "\n")
else:
async with aiofiles.open(file_location, mode='w') as file:
for item in window['ip_table'].Values:
await file.write(str(
", ".join([str(part) for part in item])
", ".join([str(part).rstrip().lstrip() for part in item])
) + "\n")
await update_ui_with_data("status", "")

View File

@@ -323,14 +323,14 @@ async def get_formatted_data(ip: ipaddress.ip_address):
if "Temperature" in miner_data['summary'][0]['SUMMARY'][0].keys():
if not round(miner_data['summary'][0]['SUMMARY'][0]["Temperature"]) == 0:
temps = miner_data['summary'][0]['SUMMARY'][0]["Temperature"]
# hashrate data, this is the only place to get this for most miners as far as I know
# hashrate data
if 'MHS av' in miner_data['summary'][0]['SUMMARY'][0].keys():
th5s = round(await safe_parse_api_data(miner_data, 'summary', 0, 'SUMMARY', 0, 'MHS av') / 1000000, 2)
th5s = format(round(await safe_parse_api_data(miner_data, 'summary', 0, 'SUMMARY', 0, 'MHS av') / 1000000, 2), ".2f").rjust(6, " ")
elif 'GHS av' in miner_data['summary'][0]['SUMMARY'][0].keys():
if not miner_data['summary'][0]['SUMMARY'][0]['GHS av'] == "":
th5s = round(
th5s = format(round(
float(await safe_parse_api_data(miner_data, 'summary', 0, 'SUMMARY', 0, 'GHS av')) / 1000,
2)
2), ".2f").rjust(6, " ")
# alternate temperature data, for BraiinsOS
if "temps" in miner_data.keys():

View File

@@ -40,7 +40,7 @@ async def set_progress_bar_len(amount):
async def sort_data(index: int or str):
if window["scan"].disabled:
if window["scan"].Disabled:
print("disabled")
return
await update_ui_with_data("status", "Sorting Data")

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,7 @@
import asyncio
import sys
import PySimpleGUI as sg
import tkinter as tk
from tools.cfg_util.cfg_util_sg.layout import window, generate_config_layout
from tools.cfg_util.cfg_util_sg.func.miners import send_config, miner_light, refresh_data, generate_config, import_config, \
@@ -18,6 +19,8 @@ async def ui():
window.read(timeout=0)
table = window["ip_table"].Widget
table.bind("<Control-Key-c>", lambda x: copy_from_table(table))
# left justify the hostnames
table.column(2, anchor=tk.W)
while True:
event, value = window.read(timeout=10)
if event in (None, 'Close', sg.WIN_CLOSED):