diff --git a/coretk/coretk/coreclient.py b/coretk/coretk/coreclient.py index c02a3295..827f4d01 100644 --- a/coretk/coretk/coreclient.py +++ b/coretk/coretk/coreclient.py @@ -261,12 +261,6 @@ class CoreClient: self.file_configs[node.id][service] = {} self.file_configs[node.id][service][file] = response.data - # store links as created links - for link in session.links: - self.created_links.add( - tuple(sorted([link.node_one_id, link.node_two_id])) - ) - # draw session self.app.canvas.reset_and_redraw(session) diff --git a/coretk/coretk/dialogs/cel.py b/coretk/coretk/dialogs/cel.py new file mode 100644 index 00000000..847d245b --- /dev/null +++ b/coretk/coretk/dialogs/cel.py @@ -0,0 +1,29 @@ +""" +check engine light +""" +from tkinter import ttk + +from coretk.dialogs.dialog import Dialog + + +class CheckLight(Dialog): + def __init__(self, master, app): + super().__init__(master, app, "CEL", modal=True) + self.app = app + + self.columnconfigure(0, weight=1) + self.draw() + + def draw(self): + row = 0 + frame = ttk.Frame(self) + button = ttk.Button(frame, text="Reset CEL") + button.grid(row=0, column=0) + button = ttk.Button(frame, text="View core-daemon log") + button.grid(row=0, column=1) + button = ttk.Button(frame, text="View node log") + button.grid(row=0, column=2) + button = ttk.Button(frame, text="Close", command=self.destroy) + button.grid(row=0, column=3) + frame.grid(row=row, column=0, sticky="nsew") + ++row diff --git a/coretk/coretk/dialogs/serviceconfiguration.py b/coretk/coretk/dialogs/serviceconfiguration.py index 01610eb1..812d1a6a 100644 --- a/coretk/coretk/dialogs/serviceconfiguration.py +++ b/coretk/coretk/dialogs/serviceconfiguration.py @@ -43,6 +43,7 @@ class ServiceConfiguration(Dialog): self.validation_time_entry = None self.validation_mode_entry = None self.service_file_data = None + self.validation_period_entry = None self.original_service_files = {} self.temp_service_files = {} self.modified_files = set() @@ -100,8 +101,6 @@ class ServiceConfiguration(Dialog): label.grid(row=0, column=0, sticky="ew") frame1.grid(row=0, column=0) frame2 = ttk.Frame(frame) - # frame2.columnconfigure(0, weight=1) - # frame2.columnconfigure(1, weight=4) label = ttk.Label(frame2, text="Meta-data") label.grid(row=0, column=0) diff --git a/coretk/coretk/statusbar.py b/coretk/coretk/statusbar.py index 8910c742..f45dce9f 100644 --- a/coretk/coretk/statusbar.py +++ b/coretk/coretk/statusbar.py @@ -2,6 +2,8 @@ import tkinter as tk from tkinter import ttk +from coretk.dialogs.cel import CheckLight + class StatusBar(ttk.Frame): def __init__(self, master, app, **kwargs): @@ -55,8 +57,13 @@ class StatusBar(ttk.Frame): self.emulation_light = ttk.Label( self, text="CEL TBD", anchor=tk.CENTER, borderwidth=1, relief=tk.RIDGE ) + self.emulation_light.bind("", self.cel_callback) self.emulation_light.grid(row=0, column=4, sticky="ew") + def cel_callback(self, event): + dialog = CheckLight(self.app, self.app) + dialog.show() + def start_session_callback(self, process_time): self.progress_bar.stop() self.statusvar.set(f"Session started in {process_time:.3f} seconds") diff --git a/coretk/coretk/validation.py b/coretk/coretk/validation.py index 68fc79c3..c7923229 100644 --- a/coretk/coretk/validation.py +++ b/coretk/coretk/validation.py @@ -99,7 +99,11 @@ class InputValidation: if len(_32bits) > 4: return False for _8bits in _32bits: - if (_8bits and int(_8bits) > 255) or len(_8bits) > 3: + if ( + (_8bits and int(_8bits) > 225) + or len(_8bits) > 3 + or (_8bits.startswith("0") and len(_8bits) > 1) + ): return False return True else: