cel
This commit is contained in:
parent
8bdc5c8e2e
commit
4cc83cf313
5 changed files with 42 additions and 9 deletions
|
@ -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)
|
||||
|
||||
|
|
29
coretk/coretk/dialogs/cel.py
Normal file
29
coretk/coretk/dialogs/cel.py
Normal file
|
@ -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
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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("<Button-1>", 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")
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue