Merge remote-tracking branch 'origin/main' into monitor-apps/task-manager
# Conflicts: # lightgui/xframe/monitor.py
This commit is contained in:
commit
ecdfb91125
8 files changed
+892
-313
No files matched your search
@@ -62,7 +62,7 @@ def _build_widgets():
|
||||
"""Create every placed widget with its props."""
|
||||
widgets = []
|
||||
widget = create('XMonitorButton', 'XMonitorButton_001', 16, 16, 200, 48)
|
||||
widget.set_prop("label", "SSH :22")
|
||||
widget.set_prop("label", "sshd :22")
|
||||
widget.set_prop("check-type", "Port")
|
||||
widget.set_prop("target", "22")
|
||||
# Live data: poll the check now; the timer re-polls.
|
||||
|
||||
@@ -67,7 +67,7 @@ def _build_widgets():
|
||||
# closed port (shows the red/down state).
|
||||
widget.add_monitor("process", "python3", "Python")
|
||||
widget.add_monitor("unit", "sshd", "sshd unit")
|
||||
widget.add_monitor("port", "22", "SSH :22")
|
||||
widget.add_monitor("port", "22", "sshd :22")
|
||||
widget.add_monitor("port", "9999", "Port 9999")
|
||||
widget.poll_all()
|
||||
widgets.append(widget)
|
||||
|
||||
@@ -30,7 +30,7 @@ _HANDLERS = {
|
||||
# Design-time geometry + effective anchors per widget:
|
||||
# name -> (top, left, right, bottom, x, y, width, height)
|
||||
_ANCHORS = {
|
||||
'XStackBar_001': (True, True, False, False, 16, 16, 320, 48),
|
||||
'XStackBar_001': (True, True, False, False, 16, 16, 320, 120),
|
||||
}
|
||||
|
||||
|
||||
@@ -60,14 +60,15 @@ def _apply_anchors(widgets, width, height):
|
||||
def _build_widgets():
|
||||
"""Create every placed widget with its props."""
|
||||
widgets = []
|
||||
widget = create('XStackBar', 'XStackBar_001', 16, 16, 320, 48)
|
||||
widget = create('XStackBar', 'XStackBar_001', 16, 16, 320, 120)
|
||||
widget.set_prop("label", "Memory")
|
||||
widget.set_prop("segments", "used=45|cached=25|buffers=10|free=20")
|
||||
widget.set_prop("segments", "used=11.7|cached=15.5|buffers=1.2|free=1.9")
|
||||
widget.set_prop("unit", "GiB")
|
||||
widgets.append(widget)
|
||||
return widgets
|
||||
|
||||
|
||||
_DESIGN_SIZE = (352, 80)
|
||||
_DESIGN_SIZE = (352, 152)
|
||||
_BACKGROUND = ''
|
||||
_WIDGETS = []
|
||||
_LAST_SIZE = [None]
|
||||
@@ -144,7 +145,7 @@ def _on_area_resize(area, allocation):
|
||||
|
||||
def main():
|
||||
window = Gtk.Window(title='XStackBar example')
|
||||
window.set_default_size(352, 80)
|
||||
window.set_default_size(352, 152)
|
||||
window.connect("destroy", Gtk.main_quit)
|
||||
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL,
|
||||
spacing=0)
|
||||
|
||||
@@ -62,7 +62,7 @@ def _build_widgets():
|
||||
"""Create every placed widget with its props."""
|
||||
widgets = []
|
||||
widget = create('XTachometer', 'XTachometer_001', 16, 16, 220, 180)
|
||||
widget.set_prop("label", "Engine")
|
||||
widget.set_prop("label", "RPM")
|
||||
widget.set_prop("value", "3200")
|
||||
widget.set_prop("maximum", "8000")
|
||||
widget.set_prop("redline", "6500")
|
||||
|
||||
@@ -31,7 +31,7 @@ _HANDLERS = {
|
||||
# Design-time geometry + effective anchors per widget:
|
||||
# name -> (top, left, right, bottom, x, y, width, height)
|
||||
_ANCHORS = {
|
||||
'XVerticalBar_001': (True, True, False, False, 16, 16, 60, 200),
|
||||
'XVerticalBar_001': (True, True, False, False, 16, 16, 160, 200),
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ def _apply_anchors(widgets, width, height):
|
||||
def _build_widgets():
|
||||
"""Create every placed widget with its props."""
|
||||
widgets = []
|
||||
widget = create('XVerticalBar', 'XVerticalBar_001', 16, 16, 60, 200)
|
||||
widget = create('XVerticalBar', 'XVerticalBar_001', 16, 16, 160, 200)
|
||||
widget.set_prop("label", "CPU")
|
||||
# Seed the peak-hold marker: 82, then back to 65.
|
||||
widget.set_value(65)
|
||||
@@ -71,7 +71,7 @@ def _build_widgets():
|
||||
return widgets
|
||||
|
||||
|
||||
_DESIGN_SIZE = (92, 232)
|
||||
_DESIGN_SIZE = (192, 232)
|
||||
_BACKGROUND = ''
|
||||
_WIDGETS = []
|
||||
_LAST_SIZE = [None]
|
||||
@@ -166,7 +166,7 @@ def _tick():
|
||||
|
||||
def main():
|
||||
window = Gtk.Window(title='XVerticalBar example')
|
||||
window.set_default_size(92, 232)
|
||||
window.set_default_size(192, 232)
|
||||
window.connect("destroy", Gtk.main_quit)
|
||||
vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL,
|
||||
spacing=0)
|
||||
|
||||
Reference in new issue
Block a user