Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test results #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions src/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,17 @@ def __init__(self, parent=None):
self.setupUi(self)
self.pushButton_2.clicked.connect(self.close) #self.destroy()

#open config.json
self.rules_config = "./config.json"
self.rules_array = load_json(self.rules_config)
# field Include:
for i in range(len(self.rules_array["rules"]["include"])):
self.plainTextEdit.appendPlainText(self.rules_array["rules"]["include"][i])
#field Exclude:
for i in range(len(self.rules_array["rules"]["exclude"])):
self.plainTextEdit_2.appendPlainText(self.rules_array["rules"]["exclude"][i])



class LogsWindow(QtWidgets.QMainWindow, ui.LogsWindow.Ui_LogsWindow):
def __init__(self, parent=None):
Expand Down Expand Up @@ -352,7 +363,7 @@ def __init__(self):
# self.setStyleSheet(open("./ui/MainWindow.qss", 'r').read())
# except Exception as ex:
# print(str(ex))

self.statusbar.showMessage("Ready")


Expand Down Expand Up @@ -446,7 +457,7 @@ def add_records(self, records):
# for label, item in file.iteritems():
# # https://pythonworld.ru/tipy-dannyx-v-python/slovari-dict-funkcii-i-metody-slovarej.html
# # https://stackoverflow.com/questions/10458437/what-is-the-difference-between-dict-items-and-dict-iteritems

new_row_index = self.tableFiles.rowCount()
self.tableFiles.insertRow(new_row_index)

Expand Down Expand Up @@ -516,7 +527,7 @@ def initDevices(self):
my_list.append(getattr(__import__(cl), cl).to_string(dev["args"]))
except Exception as ex:
print(ex)

self.comboBox_Source.addItems(my_list)
self.comboBox_Target.addItems(my_list)

Expand All @@ -531,7 +542,7 @@ def getPos(arr, item):
iter += 1

return flag, iter

s_f, s_i = getPos(self.devices_array, self.main_array["source"])
if s_f: self.comboBox_Source.setCurrentIndex(s_i)
else:
Expand Down