Integrate the Design Creations license and refine the monitor

This commit is contained in:
2026-11-26 21:46:52 -06:00
parent d2f8550111
commit 8079bf0ca6
51 changed files with 989 additions and 42 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
LICENSE.md -text

View File

@@ -27,6 +27,12 @@ Settings and history stay under the user's local app data across upgrades and
uninstall. Extract the portable ZIP before running AdaptiveResourceMonitor.exe. uninstall. Extract the portable ZIP before running AdaptiveResourceMonitor.exe.
Both packages contain their Python and Qt runtime. Both packages contain their Python and Qt runtime.
Both packages include the root `LICENSE.md`, copied byte for byte.
Interactive Setup displays a copy of that text as its license agreement.
The existing signed updater remains unattended after in-app authorization.
Jenkins validates the packaged license against the digest from the exact
source revision before publication.
Jenkins adds signed release manifests and a pinned build receipt. A local Jenkins adds signed release manifests and a pinned build receipt. A local
build produces packages and SHA-256 hashes. The maintenance executable and build produces packages and SHA-256 hashes. The maintenance executable and
runtime package both embed VERSION.md and the public verification key. runtime package both embed VERSION.md and the public verification key.

View File

@@ -1,5 +1,13 @@
# Changelog # Changelog
## v0.8.3.3_beta — 2026-11-26
- Bundle the Design Creations Attribution-NonCommercial-ShareAlike License v1.0 and show it offline from About.
- Dismiss the update success banner after View Changelog opens the changelog.
- Drag a machine from its card or graphs in either monitor.
- Use the hover monitor's Pin/Unpin button to change pinning. Clicking the tray icon opens the popup.
- Show uptime in each Local Machine and Linux remote monitoring section.
## v0.8.2.3_beta — 2026-11-26 ## v0.8.2.3_beta — 2026-11-26
- Drag machine headers to reorder sections in either monitor, or drag rows in Remote Targets. ARM saves the shared order as soon as a machine is dropped. - Drag machine headers to reorder sections in either monitor, or drag rows in Remote Targets. ARM saves the shared order as soon as a machine is dropped.

View File

@@ -1,5 +1,20 @@
# Adaptive Resource Monitor implementation report # Adaptive Resource Monitor implementation report
## v0.8.3.3_beta — Software license and monitor refinements
This Minor milestone bundles the supplied DC-ANCSA v1.0 text byte for byte,
adds original source attribution, presents the complete license in a themed
offline About dialog with saved geometry, and adds a license agreement to
interactive Windows Setup. Signed release information identifies the
license hash. Later changes require verified text and explicit acceptance
before the updater shuts down the application.
The update success banner dismisses when its changelog opens. Any
non-interactive part of a machine card can start a drag, including a graph.
The hover monitor's own button controls pinning.
Windows and Linux machine headers report uptime from the existing local
sampling worker and SSH telemetry stream.
## v0.8.2.3_beta — Machine ordering and display selection ## v0.8.2.3_beta — Machine ordering and display selection
Two Feature increments combine drag-and-drop machine ordering and checkbox Two Feature increments combine drag-and-drop machine ordering and checkbox
@@ -23,6 +38,59 @@ optional plugin and includes the upstream notices and versioned sources for
the dynamically linked Qt and PySide runtime. The native package test checks the dynamically linked Qt and PySide runtime. The native package test checks
both notice files and the absence of the plugin. both notice files and the absence of the plugin.
### Release verification
All 38 automated regressions passed. The private native Windows tests
exercised every requested machine combination at effective 100% and 150%
Qt scaling, drag-and-drop in all three interfaces, Escape cancellation,
autoscroll, failed-write recovery, hidden-machine history, and restoration
after the isolated Windows process was forcibly terminated. Four loopback
SSH fixtures carried the production profile names in those tests. The
reordered windows and six display combinations are recorded in
`evidence/v0.8.2.3_beta-native/`.
A separate native installer identifier and disposable settings root enabled
an upgrade, rollback and re-upgrade check beside the running production
instance. All four Setup operations and uninstall returned 0. The profile,
saved display order and selection, and history fixture stayed intact.
Build and Archive #16 built commit
`d2f8550111c85ae3fc12c3ed47fc511acce25733`. Publish Release #12
published all seven archived assets. Anonymous size and SHA-256 comparison
matched the same archive. The Ed25519 signature, package architecture,
version, release notes, and source commit were verified.
[Build #16](https://phantom.zapto.org:8080/jenkins/job/Adaptive-Resource-Monitor/job/Build-and-Archive/16/)
[Publication #12](https://phantom.zapto.org:8080/jenkins/job/Adaptive-Resource-Monitor/job/Publish-Release/12/)
[Public release](https://phantom.zapto.org/gitea/sonja/Adaptive_Resource_Monitor/releases/tag/v0.8.2.3_beta)
| Windows x64 package | Bytes | SHA-256 |
| --- | ---: | --- |
| Installer | 60,102,728 | `fad639b044a0bce65e25b98abe83accf4697df2b08e944edfb92ed08320a49a9` |
| Portable ZIP | 74,550,214 | `185c9ce82e09bb6b2b1e44d2236548989f18749c8fa095e57a81919329d759a5` |
### Production acceptance
The installed updater discovered and verified the package in About.
Transaction `830e1c4a2a814638a1450cb32499db7c` recorded shutdown,
exit code 0 before installer startup, visible installation progress,
verification, and an automatic restart in the same Windows user session
at the original privilege level. The transaction and completion receipt are
retained in `evidence/v0.8.2.3_beta-production/`. The sole running
instance matched all 298 archived payload files, and the launcher exited.
The five machines resumed monitoring. The production Explorer hover
recorded a deliberately changed order, the visible version label, and the
Rain and Phantom checkbox selection. All four remote SSH sessions remained
connected while only two machines were displayed. The settings and SSH
host key files retained their hashes. Credentials and startup settings were
preserved. Persistent recording and automatic update checks remained off.
The installed updater verified v0.8.2.3_beta as current.
The disposable installer test reclaimed 496,926,848 bytes and the
independent public verification reclaimed 134,655,353 bytes. Redundant
local screenshots totaling 1,139,355 bytes were removed. The 20 feature
screenshots and production receipts remain as evidence.
## v0.6.2.3_beta — Hover monitor version and window placement ## v0.6.2.3_beta — Hover monitor version and window placement
Production v0.6.2.2_beta was built from `5e8ea74be3fd94156bdc7a0810cfcc8eaac739f0`. Production v0.6.2.2_beta was built from `5e8ea74be3fd94156bdc7a0810cfcc8eaac739f0`.
@@ -79,8 +147,10 @@ Saved credentials remained accessible and automatic checks remained off.
Persistent disk recording was already off. The shipped client verified Persistent disk recording was already off. The shipped client verified
that the public release matched the installed version. that the public release matched the installed version.
The signed packages remain under `release/v0.6.2.3_beta/`. Native The signed packages remain available from Jenkins and Gitea. The two
screenshots are under `evidence/v0.6.2.3_beta-native/`. The live screenshot, superseded local binaries totaling 134,860,437 bytes were removed after
the feature release passed. Native screenshots are under
`evidence/v0.6.2.3_beta-native/`. The live screenshot,
installer log, process verification and completion receipt are retained installer log, process verification and completion receipt are retained
under `evidence/v0.6.2.3_beta-production/`. The independent anonymous under `evidence/v0.6.2.3_beta-production/`. The independent anonymous
verification removed 134,862,477 bytes of temporary downloads. Jenkins verification removed 134,862,477 bytes of temporary downloads. Jenkins

134
LICENSE.md Normal file
View File

@@ -0,0 +1,134 @@
# Design Creations Attribution-NonCommercial-ShareAlike License
Version 1.0
**Licensed application:** Adaptive Resource Monitor
**Original developer:** Sonja M Thomas
**Copyright:** 2010-2026 SLT Design Creations, LLC
**Website:** https://www.designcreations.us/
## 1. Purpose and scope
This license encourages learning, collaboration, personal customization and non-commercial community development while preserving original authorship and providing a clear support and distribution policy for derivative software.
The Software means the original application, source code, documentation and other copyrightable project materials expressly covered by this license. The Licensor is SLT Design Creations, LLC, acting through its authorized representatives. A Derivative means a modified or adapted version incorporating copyrightable portions of the Software, including modified source code, forks, builds, ports and extensions that constitute derivative works under applicable law.
This license applies only to material the Licensor has authority to license. Third-party components remain subject to their respective licenses.
## 2. Grant of permission
Subject to these terms, the Licensor grants each recipient a worldwide, royalty-free, non-exclusive license to:
- Download, install, run, study and inspect the Software for non-commercial purposes.
- Copy and redistribute unmodified versions of the Software for non-commercial purposes, subject to Sections 4 and 5.
- Modify, extend, customize, compile and create derivative versions for private non-commercial use.
- Submit proposed changes, patches and contributions to the original project for consideration.
Private modifications do not require notification, approval or publication of source code. Users may maintain their own private non-commercial versions without seeking permission.
## 3. Non-commercial use
Non-commercial use means use not primarily intended for or directed toward commercial advantage or monetary compensation. This includes personal use, hobby projects and non-commercial educational, research and community activities.
Commercial use, including internal use primarily supporting commercial business operations, sale, paid distribution, commercial hosting, or incorporation into a commercial product or service, requires prior written permission from the Licensor. Free distribution alone does not make a commercially directed activity non-commercial.
## 4. Attribution
Recipients redistributing the Software or an authorized Derivative must retain all applicable original copyright notices, developer credits, license notices and third-party acknowledgments.
The following credit must appear prominently in distributed source documentation and, where the application has an About screen or equivalent credits interface, in that interface:
> Original application developed by Sonja M Thomas, SLT Design Creations, LLC. https://www.designcreations.us/
Redistributors must include this license in full and provide a link to the original project where reasonably practicable.
Private modifications must preserve existing copyright and license notices in source files and associated documentation. Contributors may add their own accurate credits without removing or misrepresenting the original authorship.
## 5. Redistribution of unmodified software
Unmodified source and official application builds may be shared free of charge for non-commercial purposes without prior permission, provided that attribution, license terms and applicable third-party notices are preserved.
Where compiled software is redistributed, recipients must receive the corresponding source code or a reliable link to the exact corresponding source version, together with applicable build information.
Redistributors must not misrepresent modified packages as official unmodified releases, or imply sponsorship, certification or endorsement by the Licensor.
## 6. Public release of derivatives requires permission
Prior written permission from the Licensor is required before distributing a Derivative to others or making it publicly available, whether as source code, a compiled application, a public modified fork, a downloadable package or a hosted service providing access to the modified Software.
Private development and submission of proposed contributions directly to the original project are permitted without separate distribution approval. Publicly mirroring an unmodified repository is permitted under Section 5.
Non-commercial derivative projects are welcomed. The purpose of the approval requirement is to maintain awareness of derivative releases, preserve attribution, and enable users to identify the appropriate developer and support contact.
A permission request should include:
- The proposed derivative name and maintainer or organization.
- A brief description of the modifications and intended use.
- The original application and version on which it is based.
- The intended source repository and distribution location.
- A public support contact or support page for the derivative.
- Confirmation of compliance with attribution, non-commercial and share-alike requirements.
Requests may be submitted through the original project's designated contact channel or the contact information published at https://www.designcreations.us/.
Approval must be affirmative and in writing. Silence does not constitute consent. Approval may cover subsequent releases within its stated scope; a new request is necessary only where the proposed distribution falls outside that scope. A derivative maintainer should notify the Licensor of material changes to the project's distribution or support contact information.
## 7. Share-alike and source availability
Unless separately agreed in writing, every authorized non-commercial Derivative must be distributed under this same license, with its complete corresponding source code available to recipients at no charge, including modifications and scripts reasonably necessary to build the distributed version, to the extent the distributor has the right to provide them.
The distributor must identify material modifications and distinguish the derivative from official releases. The distributor must not impose additional restrictions or technical measures that prevent recipients from exercising the rights granted by this license.
Approval to distribute a Derivative does not automatically grant commercial rights or permission to distribute further derivatives made by other recipients. Those recipients retain all private-use permissions granted here and may seek their own distribution approval.
Independent software that does not constitute a derivative work is not brought under this license merely by communicating with or being distributed alongside the Software. No provision overrides applicable third-party licensing obligations.
## 8. Branding and official releases
The original application name, Design Creations name, logos, artwork and other branding may be reproduced as part of an unmodified authorized redistribution and for accurate attribution.
A Derivative must be clearly identified as an independently maintained, modified version. Use of official branding as the derivative's own identity, or representations that a derivative is an official Design Creations release, requires separate written permission.
Nothing in this license grants access to official signing keys, release infrastructure, private services or credentials. Derivative maintainers must use their own release and signing infrastructure where applicable.
## 9. Support and maintenance
The Licensor may provide support for official releases at its discretion but is not obligated to provide support, maintenance, updates or fixes.
Maintainers of authorized derivatives are responsible for their own modifications, distribution, security updates and user support. They must provide a reasonably accessible support contact and clearly identify their project as independently maintained.
Users experiencing problems specific to a derivative should contact that derivative's maintainer. The Licensor may refer such users to the appropriate maintainer. Approval of a derivative does not constitute a warranty, endorsement or assumption of support responsibility.
## 10. Contributions
Submitting a contribution does not by itself transfer copyright ownership. Contributors must have the right to submit their contributions and authorize their incorporation and distribution under this license. Any additional contribution or relicensing permissions must be expressly agreed with the contributor.
## 11. Third-party software
Third-party libraries, dependencies and bundled components retain their own copyright notices and licenses. This license does not restrict rights independently granted by those licenses. Distributors must comply with all applicable third-party terms. Where a component's license is incompatible with these terms, it must not be relicensed under this license or distributed in a combination that violates its governing license.
## 12. Disclaimer of warranty and limitation of liability
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE SOFTWARE IS PROVIDED "AS IS" AND "AS AVAILABLE", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT.
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSOR AND CONTRIBUTORS SHALL NOT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY ARISING FROM THE SOFTWARE OR ITS USE, INCLUDING LOSS OF DATA, BUSINESS INTERRUPTION, LOST PROFITS, OR INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES, WHETHER IN CONTRACT, TORT OR OTHERWISE.
Nothing in this license excludes liability or limits rights that cannot lawfully be excluded or limited.
## 13. Termination and restoration
Permissions under this license terminate automatically upon material violation of its terms. For a first violation, permissions are automatically restored if the violation is fully corrected within 30 days of discovery, unless the Licensor has expressly terminated those permissions in writing. Otherwise, reinstatement requires written permission.
Termination does not revoke rights of downstream recipients who remain compliant. Provisions concerning attribution, warranty, liability and accrued obligations survive termination as applicable.
## 14. Additional permissions and reserved rights
The Licensor may grant separate written permissions, including commercial licenses and derivative distribution approvals. Such permissions apply only within their stated scope.
All rights not expressly granted are reserved. Nothing in this license limits rights available independently under applicable law. This license does not expressly grant patent rights or trademark rights beyond the limited branding permissions stated above.
A later license version does not automatically alter rights already granted under this version. A recipient complying with this license may continue using the version of the Software received under it.
---
This is a custom source-available software license. It is not an OSI-approved open-source license or a Creative Commons license.

View File

@@ -2,8 +2,9 @@
Adaptive Resource Monitor is a native Windows tray utility for CPU, GPU, Adaptive Resource Monitor is a native Windows tray utility for CPU, GPU,
RAM, VRAM, storage and network history. It combines the six resources into RAM, VRAM, storage and network history. It combines the six resources into
one dynamic icon by default. Click the icon to pin the monitor or open the one dynamic icon by default. Click the icon to show the hover monitor, then
expanded window from its context menu. Windows may initially place the icon use its **Pin/Unpin** button to keep it open. Open the expanded window from
the icon's context menu. Windows may initially place the icon
in the taskbar overflow. Move it into the visible notification area for in the taskbar overflow. Move it into the visible notification area for
continuous access. continuous access.
@@ -26,7 +27,10 @@ monitor shows separate graph sections in your saved order. Hidden machines
continue collecting telemetry. The primary tray icon keeps its configured continue collecting telemetry. The primary tray icon keeps its configured
machine. machine.
Drag machine headers in either monitor or rows in **Manage Remote Targets** The headers show local Windows and Linux remote uptime. Disconnected machines
label a previously captured uptime as the last sample.
Drag machine cards in either monitor or rows in **Manage Remote Targets**
to change the shared order. Press Escape to cancel a drag. ARM saves each to change the shared order. Press Escape to cancel a drag. ARM saves each
drop and checkbox change immediately. Network IN and OUT have configurable drop and checkbox change immediately. Network IN and OUT have configurable
colors and share one throughput scale per machine. colors and share one throughput scale per machine.
@@ -55,3 +59,15 @@ See [BUILD.md](BUILD.md) for Windows build and verification commands,
[REMOTE_MONITORING.md](REMOTE_MONITORING.md) for SSH setup, and [REMOTE_MONITORING.md](REMOTE_MONITORING.md) for SSH setup, and
[IMPLEMENTATION_REPORT.md](IMPLEMENTATION_REPORT.md) for verification status. [IMPLEMENTATION_REPORT.md](IMPLEMENTATION_REPORT.md) for verification status.
## Software License
Adaptive Resource Monitor is source-available software distributed under the
Design Creations Attribution-NonCommercial-ShareAlike License v1.0. Users may
freely use, study, modify and extend the application for private non-commercial
purposes. Non-commercial redistribution of unmodified releases is permitted
with attribution. Public distribution of derivatives requires prior written
permission from SLT Design Creations, LLC. [Complete license](LICENSE.md)
Original developer Sonja M Thomas. Copyright 2010-2026 SLT Design Creations,
LLC. [Design Creations website](https://www.designcreations.us/)

View File

@@ -20,6 +20,14 @@ returns a complete response, ARM starts the file over. **Install Later**
keeps the package and its ready-to-install notice. **Install Update** asks for keeps the package and its ready-to-install notice. **Install Update** asks for
approval. approval.
Starting with v0.8.3.3_beta, the signed release notes include the SHA-256
of the exact source license. When that hash matches the installed license,
the usual install confirmation opens. When the license differs, ARM
retrieves the file from the version's Gitea tag, verifies the signed hash
and shows the complete terms for explicit acceptance before shutdown.
Cancel leaves the verified package available. Earlier clients retain their
existing signed update confirmation when first upgrading to this version.
## Release contract ## Release contract
The configured source is the [ARM Releases page](https://phantom.zapto.org/gitea/sonja/Adaptive_Resource_Monitor/releases). The configured source is the [ARM Releases page](https://phantom.zapto.org/gitea/sonja/Adaptive_Resource_Monitor/releases).
@@ -56,6 +64,8 @@ in place. Before restarting ARM, the launcher verifies the new executable,
version and build metadata. The launcher restarts ARM in the invoking user version and build metadata. The launcher restarts ARM in the invoking user
session with the previous tray-only or expanded presentation. The restarted session with the previous tray-only or expanded presentation. The restarted
process signals readiness before ARM reports success and offers the changelog. process signals readiness before ARM reports success and offers the changelog.
Opening the changelog clears the transient success banner and retains the
completion receipt.
An upgrade initiated by v0.6.1.1 uses that version's launcher and progress An upgrade initiated by v0.6.1.1 uses that version's launcher and progress
behavior. The newer application still reads its completion receipt. behavior. The newer application still reads its completion receipt.

View File

@@ -1 +1 @@
v0.8.2.3_beta v0.8.3.3_beta

View File

@@ -1 +1,8 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Adaptive Resource Monitor.""" """Adaptive Resource Monitor."""

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""The Design Creations About tab and bundled project documents.""" """The Design Creations About tab and bundled project documents."""
import json import json
import logging import logging
@@ -19,6 +26,8 @@ from .branding import (
APPLICATION_IMAGE, COMPANY_LOGO, COPYRIGHT, DEVELOPER, DESCRIPTION, INSTALL_ID, APPLICATION_IMAGE, COMPANY_LOGO, COPYRIGHT, DEVELOPER, DESCRIPTION, INSTALL_ID,
SUPPORT_URL, WEBSITE, asset, document, SUPPORT_URL, WEBSITE, asset, document,
) )
from .software_license import LICENSE_LABEL, LicenseDialog
from .update_release import LICENSE_FILE
from .version import NAME, VERSION from .version import NAME, VERSION
from .update_ui import UpdatePanel from .update_ui import UpdatePanel
from .window_geometry import WindowGeometry from .window_geometry import WindowGeometry
@@ -27,7 +36,6 @@ LOG = logging.getLogger(__name__)
DOCS = { DOCS = {
"README.md": "README", "README.md": "README",
"CHANGELOG.md": "Change Log", "CHANGELOG.md": "Change Log",
"LICENSE.md": "Software License",
"THIRD_PARTY.md": "Third-party Notices", "THIRD_PARTY.md": "Third-party Notices",
} }
UNINSTALL_KEY = rf"Software\Microsoft\Windows\CurrentVersion\Uninstall\{INSTALL_ID}_is1" UNINSTALL_KEY = rf"Software\Microsoft\Windows\CurrentVersion\Uninstall\{INSTALL_ID}_is1"
@@ -127,9 +135,15 @@ class AboutPage(QWidget):
self.version = QLabel(VERSION) self.version = QLabel(VERSION)
details.addRow("Installed version", self.version) details.addRow("Installed version", self.version)
details.addRow("Release classification", QLabel(release_classification())) details.addRow("Release classification", QLabel(release_classification()))
license_info = ("See Software License below." if "LICENSE.md" in self.documents license_row = QHBoxLayout()
else "Project license terms unavailable.") self.view_license = QPushButton("View License")
details.addRow("Software license", QLabel(license_info)) self.view_license.clicked.connect(self.show_license)
bundled = document(LICENSE_FILE).is_file()
license_row.addWidget(QLabel(LICENSE_LABEL if bundled else "License file unavailable"))
self.view_license.setEnabled(bundled)
license_row.addWidget(self.view_license)
license_row.addStretch()
details.addRow("Software license", license_row)
view = QPushButton("Application Details") view = QPushButton("Application Details")
view.clicked.connect(self.show_details) view.clicked.connect(self.show_details)
buttons = QHBoxLayout() buttons = QHBoxLayout()
@@ -194,11 +208,23 @@ class AboutPage(QWidget):
self.document_group.setTitle(self.documents[name]) self.document_group.setTitle(self.documents[name])
try: try:
self.browser.setMarkdown(path.read_text(encoding="utf-8")) self.browser.setMarkdown(path.read_text(encoding="utf-8"))
if name == "CHANGELOG.md" and self.isVisible():
self.updates.dismiss_success_notice()
except (OSError, UnicodeError) as exc: except (OSError, UnicodeError) as exc:
LOG.warning("Unable to read About document %s: %s", name, exc) LOG.warning("Unable to read About document %s: %s", name, exc)
self.browser.setPlainText(f"Unable to open {name}.") self.browser.setPlainText(f"Unable to open {name}.")
self.browser.verticalScrollBar().setValue(0) self.browser.verticalScrollBar().setValue(0)
def show_license(self):
try:
markdown = document(LICENSE_FILE).read_text(encoding="utf-8-sig")
except (OSError, UnicodeError) as exc:
LOG.warning("Unable to read the bundled software license: %s", exc)
return
dialog = LicenseDialog(self, self.data_root, markdown)
dialog.exec()
dialog.deleteLater()
def open_link(self, target): def open_link(self, target):
if target in self.documents: if target in self.documents:
self.show_document(target) self.show_document(target)

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
from dataclasses import replace from dataclasses import replace
from functools import partial from functools import partial
import logging import logging
@@ -215,7 +222,7 @@ class Application(QObject):
icon.activated.connect(partial(self.activate_icon, machine)) icon.activated.connect(partial(self.activate_icon, machine))
icon.messageClicked.connect(lambda: self.open_update(self.update_notice_changelog)) icon.messageClicked.connect(lambda: self.open_update(self.update_notice_changelog))
self.icons[machine] = icon self.icons[machine] = icon
self.menus[machine] = TrayMenu(self, machine) self.menus[machine] = TrayMenu(self)
self.menus[machine].theme(self.brand_colors) self.menus[machine].theme(self.brand_colors)
self.set_menu_update(self.menus[machine]) self.set_menu_update(self.menus[machine])
icon.setContextMenu(self.menus[machine]) icon.setContextMenu(self.menus[machine])
@@ -286,17 +293,13 @@ class Application(QObject):
def activate_icon(self, machine, reason): def activate_icon(self, machine, reason):
if reason == QSystemTrayIcon.ActivationReason.Trigger: if reason == QSystemTrayIcon.ActivationReason.Trigger:
self.toggle_pin(machine) if not self.popup.pinned:
self.hover.show(machine)
elif reason == QSystemTrayIcon.ActivationReason.DoubleClick: elif reason == QSystemTrayIcon.ActivationReason.DoubleClick:
self.open_expanded() self.open_expanded()
def toggle_pin(self, machine):
self.hover.pin(not self.popup.pinned or self.hover.anchor != machine, machine)
self.sync_menus()
def set_pin(self, enabled): def set_pin(self, enabled):
self.hover.pin(enabled) self.hover.pin(enabled)
self.sync_menus()
def render(self): def render(self):
now = time() now = time()

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Shared Design Creations identity and asset locations.""" """Shared Design Creations identity and asset locations."""
from dataclasses import dataclass from dataclasses import dataclass
from pathlib import Path from pathlib import Path

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Collector lifecycle and the Qt delivery boundary.""" """Collector lifecycle and the Qt delivery boundary."""
from collections import defaultdict from collections import defaultdict
from dataclasses import replace from dataclasses import replace

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
import json import json
import logging import logging
import math import math

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Application-owned generic credentials in Windows Credential Manager.""" """Application-owned generic credentials in Windows Credential Manager."""
import ctypes as ct import ctypes as ct
from ctypes import wintypes as w from ctypes import wintypes as w

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
from dataclasses import replace from dataclasses import replace
from pathlib import Path from pathlib import Path

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Timestamp-based plots shared by the monitoring windows and tray.""" """Timestamp-based plots shared by the monitoring windows and tray."""
from time import time from time import time

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""SQLite activity is confined to one background thread.""" """SQLite activity is confined to one background thread."""
from contextlib import closing from contextlib import closing
from pathlib import Path from pathlib import Path

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Machine checklists and drag controls shared by monitoring views.""" """Machine checklists and drag controls shared by monitoring views."""
from PySide6.QtCore import QEvent, QObject, QPoint, QSignalBlocker, Qt, QTimer from PySide6.QtCore import QEvent, QObject, QPoint, QSignalBlocker, Qt, QTimer
from PySide6.QtWidgets import ( from PySide6.QtWidgets import (

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
from collections import defaultdict, deque from collections import defaultdict, deque
from dataclasses import dataclass from dataclasses import dataclass
from enum import StrEnum from enum import StrEnum

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Independent telemetry providers.""" """Independent telemetry providers."""
import logging import logging

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
import logging import logging
import re import re
from collections import Counter, defaultdict from collections import Counter, defaultdict

View File

@@ -1,9 +1,19 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
# The client sends a single dot for each observation over the existing channel. # The client sends a single dot for each observation over the existing channel.
export LC_ALL=C export LC_ALL=C
os=$(uname -sr) os=$(uname -sr)
nvidia=$(command -v nvidia-smi || :) nvidia=$(command -v nvidia-smi || :)
sample() { sample() {
printf '@arm-begin\nos\t%s\n' "$os" printf '@arm-begin\nos\t%s\n' "$os"
if read -r uptime _ < /proc/uptime; then
printf 'uptime\t%s\n' "$uptime"
fi
while read -r name value; do while read -r name value; do
case "$name" in case "$name" in
cpu|cpu[0-9]*) printf 'cpu\t%s\t%s\n' "$name" "$value";; cpu|cpu[0-9]*) printf 'cpu\t%s\t%s\n' "$name" "$value";;

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Windows performance data and adapter identity.""" """Windows performance data and adapter identity."""
import ctypes as ct import ctypes as ct
from ctypes import wintypes as w from ctypes import wintypes as w
@@ -9,6 +16,13 @@ import winreg
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
def uptime_counter():
counter = ct.WinDLL("kernel32").GetTickCount64
counter.argtypes = ()
counter.restype = ct.c_uint64
return counter
class _Double(ct.Structure): class _Double(ct.Structure):
_fields_ = [("status", w.DWORD), ("value", ct.c_double)] _fields_ = [("status", w.DWORD), ("value", ct.c_double)]

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
import base64 import base64
import csv import csv
import hashlib import hashlib
@@ -295,7 +302,9 @@ class LinuxParser:
sensors = [row for row in sections["cpusensor"] if len(row) == 2] sensors = [row for row in sections["cpusensor"] if len(row) == 2]
temperatures = [val for temp, _ in sensors if (val := num(temp, .001)) is not None] temperatures = [val for temp, _ in sensors if (val := num(temp, .001)) is not None]
powers = [val for _, power in sensors if (val := num(power, .000001)) is not None] powers = [val for _, power in sensors if (val := num(power, .000001)) is not None]
uptime = next((num(row[0]) for row in sections["uptime"] if len(row) == 1), None)
items.extend(readings(machine, stamp, TOTAL, { items.extend(readings(machine, stamp, TOTAL, {
"system.uptime": (uptime if uptime is not None and uptime >= 0 else None, "s"),
"cpu.util": (usage(*cpu_values.get("cpu", (None, None))), "%"), "cpu.util": (usage(*cpu_values.get("cpu", (None, None))), "%"),
"cpu.physical": (len(core_map) or None, "count"), "cpu.physical": (len(core_map) or None, "count"),
"cpu.logical": (sum(key != "cpu" for key in cpu_values) if cpu_values else None, "count"), "cpu.logical": (sum(key != "cpu" for key in cpu_values) if cpu_values else None, "count"),

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
import logging import logging
import platform import platform
from time import perf_counter as monotonic, time from time import perf_counter as monotonic, time
@@ -5,7 +12,7 @@ from time import perf_counter as monotonic, time
import psutil import psutil
from . import Provider from . import Provider
from .native import Pdh, commit, cpu_identity, interface_info, pagefiles, physical_cores from .native import Pdh, commit, cpu_identity, interface_info, pagefiles, physical_cores, uptime_counter
from ..model import ( from ..model import (
LOCAL, TOTAL, Availability, Device, Reading, Sample, aggregate, rate, readings, usage, LOCAL, TOTAL, Availability, Device, Reading, Sample, aggregate, rate, readings, usage,
) )
@@ -21,6 +28,7 @@ class Cpu(Provider):
self.last = {} self.last = {}
self.name = cpu_identity() self.name = cpu_identity()
self.cores = physical_cores() self.cores = physical_cores()
self.uptime = uptime_counter()
self.stamp = 0 self.stamp = 0
@staticmethod @staticmethod
@@ -52,6 +60,7 @@ class Cpu(Provider):
self.last, self.stamp = times, now self.last, self.stamp = times, now
frequency = psutil.cpu_freq() frequency = psutil.cpu_freq()
items.extend(readings(LOCAL, stamp, TOTAL, { items.extend(readings(LOCAL, stamp, TOTAL, {
"system.uptime": (self.uptime() / 1000, "s"),
"cpu.util": (cpu_group(values, times), "%"), "cpu.util": (cpu_group(values, times), "%"),
"cpu.frequency": (frequency.current if frequency else None, "MHz"), "cpu.frequency": (frequency.current if frequency else None, "MHz"),
"cpu.physical": (len(cores) or psutil.cpu_count(logical=False), "count"), "cpu.physical": (len(cores) or psutil.cpu_count(logical=False), "count"),

43
arm/software_license.py Normal file
View File

@@ -0,0 +1,43 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Offline display and review of the application's software license."""
from PySide6.QtWidgets import QDialog, QDialogButtonBox, QTextBrowser, QVBoxLayout
from PySide6.QtGui import QDesktopServices
from .window_geometry import WindowGeometry
LICENSE_LABEL = "DC-ANCSA v1.0"
class LicenseDialog(QDialog):
def __init__(self, parent, root, markdown, review=False):
super().__init__(parent)
self.setWindowTitle("Design Creations Software License")
self.resize(820, 640)
layout = QVBoxLayout(self)
self.browser = QTextBrowser(openLinks=False)
self.browser.setAccessibleName("Software license text")
self.browser.setMarkdown(markdown)
self.browser.anchorClicked.connect(self.open_link)
layout.addWidget(self.browser)
if review:
buttons = QDialogButtonBox(QDialogButtonBox.StandardButton.Cancel)
accept = buttons.addButton("Accept license and install", QDialogButtonBox.ButtonRole.AcceptRole)
accept.setAutoDefault(False)
buttons.button(QDialogButtonBox.StandardButton.Cancel).setDefault(True)
else:
buttons = QDialogButtonBox(QDialogButtonBox.StandardButton.Close)
buttons.accepted.connect(self.accept)
buttons.rejected.connect(self.reject)
layout.addWidget(buttons)
self.window_geometry = WindowGeometry(self, root / "software-license-window.bin")
@staticmethod
def open_link(url):
if url.scheme() in ("https", "http", "mailto"):
QDesktopServices.openUrl(url)

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Use the cursor and Explorer's registered icon geometry for hover.""" """Use the cursor and Explorer's registered icon geometry for hover."""
import ctypes as ct import ctypes as ct
from ctypes import wintypes as w from ctypes import wintypes as w

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Design Creations tray commands for each visible ARM icon.""" """Design Creations tray commands for each visible ARM icon."""
from PySide6.QtCore import QSize, Qt from PySide6.QtCore import QSize, Qt
from PySide6.QtGui import QActionGroup, QColor, QFont, QIcon, QPainter, QPen, QPixmap from PySide6.QtGui import QActionGroup, QColor, QFont, QIcon, QPainter, QPen, QPixmap
@@ -12,9 +19,9 @@ SP = QStyle.StandardPixmap
class TrayMenu(QMenu): class TrayMenu(QMenu):
def __init__(self, app, scope): def __init__(self, app):
super().__init__() super().__init__()
self.app, self.scope = app, scope self.app = app
self.setAccessibleName(f"{NAME} tray menu") self.setAccessibleName(f"{NAME} tray menu")
self.add_header() self.add_header()
self.update = self.action(self, "", None, app.open_update) self.update = self.action(self, "", None, app.open_update)
@@ -26,8 +33,6 @@ class TrayMenu(QMenu):
open_monitor = self.action(self, "Open Resource Monitor", SP.SP_ComputerIcon, open_monitor = self.action(self, "Open Resource Monitor", SP.SP_ComputerIcon,
app.open_expanded) app.open_expanded)
self.setDefaultAction(open_monitor) self.setDefaultAction(open_monitor)
self.pin = self.action(self, "Pin Resource Monitor", None, lambda: app.toggle_pin(scope))
self.pin.setCheckable(True)
self.addSeparator() self.addSeparator()
self.machines = MachineMenu(app.dashboard, app.toggle_machine, self) self.machines = MachineMenu(app.dashboard, app.toggle_machine, self)
@@ -101,7 +106,6 @@ class TrayMenu(QMenu):
app = self.app app = self.app
self.machines.sync() self.machines.sync()
self.modes[app.settings.mode].setChecked(True) self.modes[app.settings.mode].setChecked(True)
self.pin.setChecked(app.popup.pinned and app.hover.anchor == self.scope)
self.start.setChecked(app.startup_enabled()) self.start.setChecked(app.startup_enabled())
def theme(self, colors): def theme(self, colors):

View File

@@ -1,5 +1,13 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Anonymous update discovery and verified downloads from the ARM release repository.""" """Anonymous update discovery and verified downloads from the ARM release repository."""
from dataclasses import dataclass from dataclasses import dataclass
from hashlib import sha256
import json import json
import os import os
from pathlib import Path from pathlib import Path
@@ -9,7 +17,8 @@ from urllib.parse import quote, urlsplit
from urllib.request import HTTPRedirectHandler, Request, build_opener from urllib.request import HTTPRedirectHandler, Request, build_opener
from .update_release import ( from .update_release import (
MANIFEST, MAX_MANIFEST_SIZE, Release, UpdateError, eligible, exclusion_reason, source_config, verify_file, verify_manifest, LICENSE_FILE, MANIFEST, MAX_MANIFEST_SIZE, Release, UpdateError, eligible, exclusion_reason,
software_license_digest, source_config, verify_file, verify_manifest,
) )
from .version import VERSION, version_key from .version import VERSION, version_key
@@ -72,6 +81,16 @@ class ReleaseClient:
raise UpdateError(f"Release attachment size is inconsistent: {name}") raise UpdateError(f"Release attachment size is inconsistent: {name}")
return expected return expected
def read_license(self, release):
expected = software_license_digest(release.notes)
if expected is None:
raise UpdateError("The release has no signed software license checksum")
source = f"{self.base}/{self.repository}/raw/tag/{quote(release.version, safe='')}/{LICENSE_FILE}"
data = self.read(source, MAX_MANIFEST_SIZE)
if sha256(data).hexdigest() != expected:
raise UpdateError("The software license does not match the signed release checksum")
return data.decode("utf-8-sig")
def check(self, installed, kind): def check(self, installed, kind):
rows = {} rows = {}
for page in range(1, 11): for page in range(1, 11):

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""A small, independent Windows window for the frozen maintenance launcher.""" """A small, independent Windows window for the frozen maintenance launcher."""
import logging import logging
from tkinter import Button, Frame, Label, Tk, TclError from tkinter import Button, Frame, Label, Tk, TclError

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Signed release contract shared by the updater, maintenance worker and CI.""" """Signed release contract shared by the updater, maintenance worker and CI."""
from base64 import b64decode from base64 import b64decode
from dataclasses import dataclass from dataclasses import dataclass
@@ -13,6 +20,8 @@ from .branding import APP_MODEL_ID
from .version import CHANNELS, ROOT, version_key from .version import CHANNELS, ROOT, version_key
MANIFEST = "arm-update-windows-x64.json" MANIFEST = "arm-update-windows-x64.json"
LICENSE_FILE = "LICENSE.md"
LICENSE_NOTE = "Software license SHA-256 "
ARCHITECTURE = "windows-x64" ARCHITECTURE = "windows-x64"
KINDS = {"installed": "-setup.exe", "portable": "-portable.zip"} KINDS = {"installed": "-setup.exe", "portable": "-portable.zip"}
MAX_PACKAGE_SIZE = 1024**3 MAX_PACKAGE_SIZE = 1024**3
@@ -39,6 +48,15 @@ def sha256(path):
return file_digest(stream, "sha256").hexdigest() return file_digest(stream, "sha256").hexdigest()
def software_license_digest(notes):
last = notes.rsplit("\n", 1)[-1]
if last.startswith(LICENSE_NOTE):
digest = last[len(LICENSE_NOTE):]
if SHA256.fullmatch(digest):
return digest
return None
def artifact_name(version, kind): def artifact_name(version, kind):
version_key(version) version_key(version)
return f"AdaptiveResourceMonitor-{version}-{ARCHITECTURE}{KINDS[kind]}" return f"AdaptiveResourceMonitor-{version}-{ARCHITECTURE}{KINDS[kind]}"

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Presentation and persisted outcomes for the shared updater.""" """Presentation and persisted outcomes for the shared updater."""
from enum import Enum, auto from enum import Enum, auto
import json import json

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Asynchronous Workshop-style update controls for the About tab.""" """Asynchronous Workshop-style update controls for the About tab."""
from datetime import datetime from datetime import datetime
import json import json
@@ -11,8 +18,10 @@ from PySide6.QtWidgets import (
QPushButton, QVBoxLayout, QPushButton, QVBoxLayout,
) )
from .branding import document
from .software_license import LicenseDialog
from .update_client import ReleaseClient, UpdateCancelled, write_atomic from .update_client import ReleaseClient, UpdateCancelled, write_atomic
from .update_release import MANIFEST, UpdateError, eligible, verify_file, verify_manifest from .update_release import LICENSE_FILE, MANIFEST, UpdateError, eligible, sha256, software_license_digest, verify_file, verify_manifest
from .update_state import Phase, notice, notify_once, read_json, result_for from .update_state import Phase, notice, notify_once, read_json, result_for
from .version import VERSION, version_key from .version import VERSION, version_key
@@ -260,6 +269,16 @@ class UpdatePanel(QGroupBox):
self.downloaded = value self.downloaded = value
self.fields["Verification"].setText("Manifest signature and package SHA-256 verified") self.fields["Verification"].setText("Manifest signature and package SHA-256 verified")
self.status.setText("Verified package saved. Install it when ready.") self.status.setText("Verified package saved. Install it when ready.")
elif operation == "license":
self.job = "license-review"
dialog = LicenseDialog(self, self.root.parent, value, review=True)
accepted = dialog.exec()
dialog.deleteLater()
self.job = None
if accepted:
self.begin_install()
else:
self.status.setText("Installation deferred. The verified package is still available.")
elif operation == "prepare": elif operation == "prepare":
self.plan = value self.plan = value
self.elapsed = 0 self.elapsed = 0
@@ -295,10 +314,27 @@ class UpdatePanel(QGroupBox):
def install_now(self): def install_now(self):
if not self.downloaded or self.job or self.plan or not self.installable: if not self.downloaded or self.job or self.plan or not self.installable:
return return
release = self.release
expected = software_license_digest(release.notes)
if expected is None:
self.status.setText("The release has no signed software license checksum. Installation deferred.")
return
try:
already_installed = sha256(document(LICENSE_FILE)) == expected
except OSError as exc:
LOG.warning("Could not read the installed software license: %s", exc)
already_installed = False
if not already_installed:
self.status.setText("Checking the updated software license…")
self.start("license", lambda: self.client.read_license(release))
return
if QMessageBox.question(self, "Install Update", f"Install {self.release.version} and restart Adaptive Resource Monitor?", if QMessageBox.question(self, "Install Update", f"Install {self.release.version} and restart Adaptive Resource Monitor?",
QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No, QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No,
QMessageBox.StandardButton.No) != QMessageBox.StandardButton.Yes: QMessageBox.StandardButton.No) != QMessageBox.StandardButton.Yes:
return return
self.begin_install()
def begin_install(self):
from .about import installation from .about import installation
from .update_worker import prepare from .update_worker import prepare
release, artifact, target = self.release, self.downloaded, installation()[1] release, artifact, target = self.release, self.downloaded, installation()[1]
@@ -311,6 +347,11 @@ class UpdatePanel(QGroupBox):
def defer_install(self): def defer_install(self):
self.status.setText("Installation deferred. The verified package will be available from About.") self.status.setText("Installation deferred. The verified package will be available from About.")
def dismiss_success_notice(self):
if self.success_banner:
self.success_banner = False
self.set_controls()
def poll_worker(self): def poll_worker(self):
self.elapsed += 250 self.elapsed += 250
status = read_json(self.plan / "status.json", {}) status = read_json(self.plan / "status.json", {})

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Independent Windows updater. Transaction data never includes the ARM user profile.""" """Independent Windows updater. Transaction data never includes the ARM user profile."""
import argparse import argparse
from contextlib import contextmanager from contextlib import contextmanager

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
import re import re
import sys import sys
from pathlib import Path from pathlib import Path

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
from time import time, strftime, localtime from time import time, strftime, localtime
from PySide6.QtCore import QPoint, QRect, QSize, Qt, QSignalBlocker, QTimer from PySide6.QtCore import QPoint, QRect, QSize, Qt, QSignalBlocker, QTimer
@@ -9,7 +16,7 @@ from PySide6.QtWidgets import (
from .graphs import Plot, resource_series, selected_resource from .graphs import Plot, resource_series, selected_resource
from .machine_controls import MachineDrag, MachineDropdown from .machine_controls import MachineDrag, MachineDropdown
from .model import NETWORK, TOTAL, Connection, INTERVALS, RANGES, RESOURCES, format_value from .model import NETWORK, TOTAL, Availability, Connection, INTERVALS, RANGES, RESOURCES, format_value
from .version import VERSION from .version import VERSION
from .window_geometry import fit_work_area from .window_geometry import fit_work_area
@@ -73,6 +80,17 @@ def display_value(item):
return description if item.valid else f"{description} · {item.availability}" return description if item.valid else f"{description} · {item.availability}"
def describe_uptime(reading):
if reading is None or reading.value is None:
return "Uptime unavailable"
minutes, seconds = divmod(int(reading.value), 60)
hours, minutes = divmod(minutes, 60)
days, hours = divmod(hours, 24)
parts = [f"{value}{unit}" for value, unit in ((days, "d"), (hours, "h"), (minutes, "m")) if value]
text = "Uptime " + (" ".join(parts) if parts else f"{seconds}s")
return f"{text} (last sample)" if reading.availability is Availability.STALE else text
class Card(QFrame): class Card(QFrame):
def __init__(self, resource, detailed, compact=False): def __init__(self, resource, detailed, compact=False):
super().__init__() super().__init__()
@@ -152,6 +170,10 @@ class MachineSection(QFrame):
details.toggled.connect(refresh) details.toggled.connect(refresh)
header.addWidget(details) header.addWidget(details)
def drag_surfaces(self):
return (self, self.title, *(widget for card in self.cards.values()
for widget in (card, *card.findChildren(QWidget))))
class UpdateBanner(QFrame): class UpdateBanner(QFrame):
def __init__(self, open_update): def __init__(self, open_update):
@@ -386,7 +408,8 @@ class Monitor(QWidget):
self.simultaneous.setVisible(len(shown) > 1) self.simultaneous.setVisible(len(shown) > 1)
for machine in self.sections.keys() - set(self.dashboard.machines()): for machine in self.sections.keys() - set(self.dashboard.machines()):
section = self.sections.pop(machine) section = self.sections.pop(machine)
self.drag.unwatch(section.title) for widget in section.drag_surfaces():
self.drag.unwatch(widget)
self.group_rows.removeWidget(section) self.group_rows.removeWidget(section)
section.deleteLater() section.deleteLater()
if len(shown) < 2: if len(shown) < 2:
@@ -398,7 +421,8 @@ class Monitor(QWidget):
for index, machine in enumerate(shown): for index, machine in enumerate(shown):
if machine not in self.sections: if machine not in self.sections:
self.sections[machine] = section = MachineSection(self.expanded, self.refresh) self.sections[machine] = section = MachineSection(self.expanded, self.refresh)
self.drag.watch(section.title, lambda _point, machine=machine: machine) for widget in section.drag_surfaces():
self.drag.watch(widget, lambda _point, machine=machine: machine)
section = self.sections[machine] section = self.sections[machine]
current = self.group_rows.indexOf(section) current = self.group_rows.indexOf(section)
if current != index: if current != index:
@@ -453,6 +477,8 @@ class Monitor(QWidget):
last = collectors.last.get(scope) last = collectors.last.get(scope)
last_text = f" · Last sample {strftime('%H:%M:%S', localtime(last))}" if self.expanded and last else "" last_text = f" · Last sample {strftime('%H:%M:%S', localtime(last))}" if self.expanded and last else ""
text = f"{os_label} · {self.dashboard.state(scope)} · Sample {self.dashboard.interval(scope):g} s{last_text}" text = f"{os_label} · {self.dashboard.state(scope)} · Sample {self.dashboard.interval(scope):g} s{last_text}"
uptime = self.dashboard.observation(scope, "cpu", TOTAL, "system.uptime", time())
text += f" · {describe_uptime(uptime)}"
if status and status.detail: if status and status.detail:
text += f" · {status.detail}" text += f" · {status.detail}"
if self.expanded and not concise: if self.expanded and not concise:

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Keep user-facing windows within the work area and remember their placement.""" """Keep user-facing windows within the work area and remember their placement."""
import logging import logging

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
from arm.application import main from arm.application import main

View File

@@ -5,7 +5,23 @@ psutil, Paramiko and its cryptographic dependencies, NVIDIA's NVML Python
bindings, Tcl/Tk for the maintenance window, and the PyInstaller bootloader. bindings, Tcl/Tk for the maintenance window, and the PyInstaller bootloader.
The NVIDIA display driver's NVML DLL The NVIDIA display driver's NVML DLL
is provided by the driver. License text distributed by the dependency wheels is provided by the driver. License text distributed by the dependency wheels
is included in this directory. is included in this directory. NVIDIA's Python wrapper carries its BSD notice
in its source header. Setup and the portable archive include that notice
separately. [NVIDIA Python wrapper source distribution](https://pypi.org/project/nvidia-ml-py/13.615.71/#files)
DC-ANCSA applies to original ARM material. Bundled dependencies remain under
their upstream terms. The notice files include the PSF and Tk terms, the
PyInstaller bootloader exception, Paramiko's LGPL terms, and the distinct
notices for the cryptography, NaCl, bcrypt, CFFI and other Python components.
[Paramiko source distribution](https://pypi.org/project/paramiko/4.0.0/#files)
The OpenSSL license text is identical in the two bundled runtime versions.
The Microsoft runtime stays under Microsoft's applicable redistribution
terms. The SQLite library distributed with CPython is public domain.
[OpenSSL 3.0.16](https://github.com/openssl/openssl/tree/openssl-3.0.16)
[OpenSSL 4.0.2](https://github.com/openssl/openssl/tree/openssl-4.0.2)
[Tcl 8.6.15](https://github.com/tcltk/tcl/tree/core-8-6-15)
[SQLite copyright](https://www.sqlite.org/copyright.html)
The Qt and PySide 6.11.2 runtime is distributed under the GNU Lesser General The Qt and PySide 6.11.2 runtime is distributed under the GNU Lesser General
Public License v3. The accompanying LGPL v3 and GPL v3 texts are in the Public License v3. The accompanying LGPL v3 and GPL v3 texts are in the

View File

@@ -0,0 +1,177 @@
Apache License
Version 2.0, January 2004
https://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

View File

@@ -0,0 +1,40 @@
This software is copyrighted by the Regents of the University of
California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState
Corporation and other parties. The following terms apply to all files
associated with the software unless explicitly disclaimed in
individual files.
The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose, provided
that existing copyright notices are retained in all copies and that this
notice is included verbatim in any distributions. No written agreement,
license, or royalty fee is required for any of the authorized uses.
Modifications to this software may be copyrighted by their authors
and need not follow the licensing terms described here, provided that
the new terms are clearly indicated on the first page of each file where
they apply.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS.
GOVERNMENT USE: If you are acquiring this software on behalf of the
U.S. government, the Government shall have only "Restricted Rights"
in the software and related documentation as defined in the Federal
Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you
are acquiring the software on behalf of the Department of Defense, the
software shall be classified as "Commercial Computer Software" and the
Government shall have only "Restricted Rights" as defined in Clause
252.227-7014 (b) (3) of DFARs. Notwithstanding the foregoing, the
authors grant the U.S. Government and others acting in its behalf
permission to use and distribute the software in accordance with the
terms specified in this license.

View File

@@ -33,6 +33,9 @@ WizardStyle=modern
SetupIconFile={#AppIcon} SetupIconFile={#AppIcon}
WizardImageFile={#WizardImage} WizardImageFile={#WizardImage}
WizardSmallImageFile={#WizardEmblem} WizardSmallImageFile={#WizardEmblem}
#ifdef LicenseAgreement
LicenseFile={#LicenseAgreement}
#endif
UninstallDisplayIcon={app}\{#Executable} UninstallDisplayIcon={app}\{#Executable}
CloseApplications=no CloseApplications=no
RestartApplications=no RestartApplications=no
@@ -85,6 +88,11 @@ begin
Result := ExpandConstant('{param:ARMUPDATE|0}') = '1'; Result := ExpandConstant('{param:ARMUPDATE|0}') = '1';
end; end;
function ShouldSkipPage(PageID: Integer): Boolean;
begin
Result := (PageID = wpLicense) and ArmUpdate;
end;
procedure CurUninstallStepChanged(Step: TUninstallStep); procedure CurUninstallStepChanged(Step: TUninstallStep);
var var
Value, Target: String; Value, Target: String;

View File

@@ -9,7 +9,7 @@ from arm.providers.ssh import probe_command
SECRET = "arm-fixture-only" SECRET = "arm-fixture-only"
COMMAND = probe_command().encode() COMMAND = probe_command().encode()
FRAME = ( FRAME = (
"os\tLinux fixture\nboot\t{boot}\ncpu\tcpu\t{busy} 0 200 500 0 0 0 0 0 0\n" "os\tLinux fixture\nboot\t{boot}\nuptime\t12345.67\ncpu\tcpu\t{busy} 0 200 500 0 0 0 0 0 0\n"
"cpu\tcpu0\t{busy} 0 200 500 0 0 0 0 0 0\n" "cpu\tcpu0\t{busy} 0 200 500 0 0 0 0 0 0\n"
"ram\tMemTotal\t16384\nram\tMemAvailable\t12000\n" "ram\tMemTotal\t16384\nram\tMemAvailable\t12000\n"
"ram\tSwapTotal\t2024\nram\tSwapFree\t1024\n" "ram\tSwapTotal\t2024\nram\tSwapFree\t1024\n"

View File

@@ -35,6 +35,8 @@ class Providers(unittest.TestCase):
sleep(.85) sleep(.85)
second = [p.sample() for p in providers] second = [p.sample() for p in providers]
self.assertTrue(reading(second[0], "cpu.util").valid) self.assertTrue(reading(second[0], "cpu.util").valid)
self.assertGreater(reading(second[0], "system.uptime").value,
reading(first[0], "system.uptime").value)
self.assertTrue(reading(second[1], "ram.util").valid) self.assertTrue(reading(second[1], "ram.util").valid)
for sample in second: for sample in second:
self.assertTrue(all(r.timestamp == sample.timestamp for r in sample.readings)) self.assertTrue(all(r.timestamp == sample.timestamp for r in sample.readings))
@@ -48,6 +50,7 @@ class Providers(unittest.TestCase):
second, _ = parser.parse(FRAME.format(boot=1, busy=200), 11, 11) second, _ = parser.parse(FRAME.format(boot=1, busy=200), 11, 11)
self.assertEqual(os_label, "Linux fixture") self.assertEqual(os_label, "Linux fixture")
self.assertIsNone(reading(first, "cpu.util").value) self.assertIsNone(reading(first, "cpu.util").value)
self.assertEqual(reading(first, "system.uptime").value, 12345.67)
self.assertEqual(reading(second, "cpu.util").value, 100) self.assertEqual(reading(second, "cpu.util").value, 100)
self.assertEqual(reading(second, "disk.read").value, 51200) self.assertEqual(reading(second, "disk.read").value, 51200)
self.assertEqual(reading(second, "net.total").value, 200) self.assertEqual(reading(second, "net.total").value, 200)
@@ -55,6 +58,8 @@ class Providers(unittest.TestCase):
self.assertEqual(reading(second, "gpu.vram_pct").value, 25) self.assertEqual(reading(second, "gpu.vram_pct").value, 25)
reset, _ = parser.parse(FRAME.format(boot=2, busy=400), 12, 12) reset, _ = parser.parse(FRAME.format(boot=2, busy=400), 12, 12)
self.assertIsNone(reading(reset, "disk.read").value) self.assertIsNone(reading(reset, "disk.read").value)
invalid, _ = parser.parse(FRAME.format(boot=2, busy=500).replace("12345.67", "-1"), 13, 13)
self.assertIsNone(reading(invalid, "system.uptime").value)
def test_directional_deltas_skip_reboot_reset_and_interface_replacement(self): def test_directional_deltas_skip_reboot_reset_and_interface_replacement(self):
def frame(boot, rx, tx, index): def frame(boot, rx, tx, index):

View File

@@ -16,7 +16,7 @@ from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
from arm.branding import APP_MODEL_ID from arm.branding import APP_MODEL_ID
from arm.config import Settings from arm.config import Settings
from arm.update_client import ReleaseClient, UpdateCancelled from arm.update_client import ReleaseClient, UpdateCancelled
from arm.update_release import MANIFEST, UpdateError, artifact_name, canonical, verify_manifest from arm.update_release import LICENSE_NOTE, MANIFEST, UpdateError, artifact_name, canonical, verify_manifest
from arm.update_state import Phase, notice, notify_once, result_for, transaction_from_ack from arm.update_state import Phase, notice, notify_once, result_for, transaction_from_ack
from arm.update_worker import unpack_portable, wait_parent from arm.update_worker import unpack_portable, wait_parent
from arm.version import VERSION, version_key from arm.version import VERSION, version_key
@@ -84,6 +84,20 @@ class UpdateTests(unittest.TestCase):
bad["packages"]["portable"][field] = value bad["packages"]["portable"][field] = value
return verify_manifest(self.sign(bad), self.public, NEW) return verify_manifest(self.sign(bad), self.public, NEW)
def test_update_license_must_match_the_signed_release(self):
new_license = b"# Distinct license terms\n"
meta = self.metadata()
with self.assertRaisesRegex(UpdateError, "no signed software license"):
self.client.read_license(verify_manifest(self.sign(meta), self.public))
meta["notes"] += f"\n\n{LICENSE_NOTE}{sha256(new_license).hexdigest()}"
release = verify_manifest(self.sign(meta), self.public)
with patch.object(self.client, "read", return_value=new_license) as read:
self.assertEqual(self.client.read_license(release), new_license.decode())
self.assertTrue(read.call_args.args[0].endswith(f"/raw/tag/{NEW}/LICENSE.md"))
with patch.object(self.client, "read", return_value=b"Changed text"):
with self.assertRaisesRegex(UpdateError, "does not match"):
self.client.read_license(release)
def test_discovery_verified_current_and_older(self): def test_discovery_verified_current_and_older(self):
for version in (NEW, VERSION, OLD): for version in (NEW, VERSION, OLD):
row, raw = self.row(self.metadata(version)) row, raw = self.row(self.metadata(version))

View File

@@ -257,6 +257,9 @@ def validate_packages(release, work, result, upgrade_from=None, captures=None, p
assert json.loads((payload / "BUILD.json").read_text())["version"] == VERSION assert json.loads((payload / "BUILD.json").read_text())["version"] == VERSION
assert VERSION in (payload / "CHANGELOG.md").read_text(encoding="utf-8") assert VERSION in (payload / "CHANGELOG.md").read_text(encoding="utf-8")
assert (payload / "Third-party notices" / "README.md").is_file() assert (payload / "Third-party notices" / "README.md").is_file()
assert (payload / "LICENSE.md").read_bytes() == (ROOT / "LICENSE.md").read_bytes()
assert "Redistributions in binary form" in (
payload / "Third-party notices" / "NVIDIA-NVML-Python-LICENSE.txt").read_text(encoding="utf-8")
for name in ("LGPL-3.0-only.txt", "GPL-3.0-only.txt"): for name in ("LGPL-3.0-only.txt", "GPL-3.0-only.txt"):
assert (payload / "Third-party notices" / name).read_bytes() == ( assert (payload / "Third-party notices" / name).read_bytes() == (
ROOT / "packaging" / "qt-notices" / name).read_bytes() ROOT / "packaging" / "qt-notices" / name).read_bytes()
@@ -377,6 +380,30 @@ def verify_branding(session, results, captures=None):
assert not session.expanded.monitor_visible assert not session.expanded.monitor_visible
assert not session.about_page.app_image.picture.isNull() assert not session.about_page.app_image.picture.isNull()
assert not session.about_page.company_image.picture.isNull() assert not session.about_page.company_image.picture.isNull()
assert session.about_page.view_license.isEnabled()
assert any(label.text() == "DC-ANCSA v1.0" for label in session.about_page.findChildren(QLabel))
seen_geometry = []
def inspect_license():
from arm.software_license import LicenseDialog
dialog = session.qt.activeModalWidget()
assert isinstance(dialog, LicenseDialog)
content = dialog.browser.toPlainText()
assert "Design Creations Attribution-NonCommercial-ShareAlike License" in content
assert "Additional permissions and reserved rights" in content
assert dialog.browser.isReadOnly() and dialog.browser.verticalScrollBar().maximum() > 0
if not seen_geometry:
dialog.move(80, 90)
dialog.resize(650, 530)
else:
assert dialog.geometry() == seen_geometry[0]
seen_geometry.append(dialog.geometry())
dialog.reject()
for _ in range(2):
QTimer.singleShot(0, inspect_license)
session.about_page.view_license.click()
assert len(seen_geometry) == 2
session.about_page.open_link("THIRD_PARTY.md") session.about_page.open_link("THIRD_PARTY.md")
assert session.about_page.document_group.title() == "Third-party Notices" assert session.about_page.document_group.title() == "Third-party Notices"
assert "CPython" in session.about_page.browser.toPlainText() assert "CPython" in session.about_page.browser.toPlainText()
@@ -517,6 +544,15 @@ def verify_update_notices(session, wait_for, results, captures):
wait_for(lambda: update.job is None) wait_for(lambda: update.job is None)
assert not menu.update.isVisible() and expanded.update_banner.isHidden() assert not menu.update.isVisible() and expanded.update_banner.isHidden()
assert hover.popup_size() == initial_size assert hover.popup_size() == initial_size
update.accept_outcome((Phase.SUCCESS, "ARM installed and restarted."))
confirmation = update.root / "confirmation.json"
before = confirmation.read_bytes()
assert hover.update_banner.label.text() and expanded.update_banner.label.text()
assert hover.update_banner.action.text() == "View Changelog"
hover.update_banner.action.click()
assert session.about_page.document_group.title() == "Change Log"
assert hover.update_banner.isHidden() and expanded.update_banner.isHidden()
assert confirmation.read_bytes() == before
expanded.close() expanded.close()
finally: finally:
fixture.doCleanups() fixture.doCleanups()
@@ -662,15 +698,15 @@ def verify_machine_display(session, wait_for, results, captures):
app.processEvents() app.processEvents()
viewport = hover.simultaneous.viewport() viewport = hover.simultaneous.viewport()
local_header = hover.sections[local].title local_card = hover.sections[local].cards["ram"].plot
section_objects = dict(hover.sections) section_objects = dict(hover.sections)
viewport_origin = lambda: viewport.mapToGlobal(QPoint(viewport.width() // 2, 3)) viewport_origin = lambda: viewport.mapToGlobal(QPoint(viewport.width() // 2, 3))
point = lambda w: w.mapToGlobal(w.rect().center()) point = lambda w: w.mapToGlobal(w.rect().center())
bottom = viewport.mapToGlobal(QPoint(viewport.width() // 2, viewport.height() - 3)) bottom = viewport.mapToGlobal(QPoint(viewport.width() // 2, viewport.height() - 3))
before = persisted() before = persisted()
drag_to(hover.drag, local_header, point(local_header), bottom, cancel=True) drag_to(hover.drag, local_card, point(local_card), bottom, cancel=True)
assert persisted() == before assert persisted() == before
drag_to(hover.drag, local_header, point(local_header), bottom, scroll_to_end=True) drag_to(hover.drag, local_card, point(local_card), bottom, scroll_to_end=True)
assert hover.displayed == (rain, phantom, lamp, phantomnet, local) assert hover.displayed == (rain, phantom, lamp, phantomnet, local)
assert persisted().order == hover.displayed and hover.sections == section_objects assert persisted().order == hover.displayed and hover.sections == section_objects
assert tuple(tray.entries) == hover.displayed assert tuple(tray.entries) == hover.displayed
@@ -856,8 +892,13 @@ def evaluate_app(work, results, short=False, captures=None):
assert len(set(modes.values())) == 4, modes assert len(set(modes.values())) == 4, modes
results["rendered_modes"] = modes results["rendered_modes"] = modes
assert ConfigStore(root / "settings.json").load().mode == "Composite" assert ConfigStore(root / "settings.json").load().mode == "Composite"
menu.pin.trigger() session.activate_icon(LOCAL, QSystemTrayIcon.ActivationReason.Trigger)
assert session.popup.isVisible() and not session.popup.pinned
assert all(action.text() != "Pin Resource Monitor" for action in menu.actions())
session.popup.pin.click()
assert session.popup.isVisible() and session.popup.pinned assert session.popup.isVisible() and session.popup.pinned
session.activate_icon(LOCAL, QSystemTrayIcon.ActivationReason.Trigger)
assert session.popup.pinned
assert sum(card.isVisible() for card in session.popup.cards.values()) == len(RESOURCES) assert sum(card.isVisible() for card in session.popup.cards.values()) == len(RESOURCES)
wait_for(lambda: session.popup.frameGeometry().isValid()) wait_for(lambda: session.popup.frameGeometry().isValid())
if not short: if not short:

View File

@@ -1,8 +1,16 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Freeze, compile and verify the ARM Windows release.""" """Freeze, compile and verify the ARM Windows release."""
import argparse import argparse
from datetime import datetime, timezone from datetime import datetime, timezone
from hashlib import file_digest from hashlib import file_digest
from importlib import metadata from importlib import metadata
from itertools import takewhile
import json import json
import os import os
from pathlib import Path from pathlib import Path
@@ -18,6 +26,7 @@ from zipfile import ZIP_DEFLATED, ZipFile
ROOT = Path(__file__).resolve().parents[1] ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT)) sys.path.insert(0, str(ROOT))
from arm.version import NAME, VERSION, version_key from arm.version import NAME, VERSION, version_key
from arm.update_release import LICENSE_FILE
from arm.branding import ( from arm.branding import (
APPLICATION_ICON, APPLICATION_IMAGE, APPLICATION_LOGO, APP_MODEL_ID, BUNDLED_ASSETS, APPLICATION_ICON, APPLICATION_IMAGE, APPLICATION_LOGO, APP_MODEL_ID, BUNDLED_ASSETS,
COPYRIGHT, DESCRIPTION, INSTALL_ID, PUBLISHER, SUPPORT_URL, WEBSITE, COPYRIGHT, DESCRIPTION, INSTALL_ID, PUBLISHER, SUPPORT_URL, WEBSITE,
@@ -55,6 +64,8 @@ def copy_notices(payload):
notices.mkdir() notices.mkdir()
for name in ("LGPL-3.0-only.txt", "GPL-3.0-only.txt"): for name in ("LGPL-3.0-only.txt", "GPL-3.0-only.txt"):
shutil.copyfile(ROOT / "packaging" / "qt-notices" / name, notices / name) shutil.copyfile(ROOT / "packaging" / "qt-notices" / name, notices / name)
for source in sorted((ROOT / "packaging" / "dependency-notices").iterdir()):
shutil.copyfile(source, notices / source.name)
for package in ("PySide6", "PySide6-Essentials", "PySide6-Addons", "shiboken6", "psutil", for package in ("PySide6", "PySide6-Essentials", "PySide6-Addons", "shiboken6", "psutil",
"paramiko", "cryptography", "cffi", "bcrypt", "PyNaCl", "PyInstaller", "paramiko", "cryptography", "cffi", "bcrypt", "PyNaCl", "PyInstaller",
"setuptools", "nvidia-ml-py", "invoke", "pycparser"): "setuptools", "nvidia-ml-py", "invoke", "pycparser"):
@@ -67,6 +78,11 @@ def copy_notices(payload):
token in entry.name.lower() for token in ("license", "copying", "notice"))] token in entry.name.lower() for token in ("license", "copying", "notice"))]
for index, entry in enumerate(files): for index, entry in enumerate(files):
shutil.copyfile(entry.locate(), notices / f"{package}-{index}-{entry.name}") shutil.copyfile(entry.locate(), notices / f"{package}-{index}-{entry.name}")
nvml = metadata.distribution("nvidia-ml-py").locate_file("pynvml.py").read_text(encoding="utf-8")
nvml_notice = "\n".join(takewhile(lambda line: not line or line.startswith("#"), nvml.splitlines()))
if "NVIDIA Corporation" not in nvml_notice or "Redistributions in binary form" not in nvml_notice:
raise RuntimeError("NVIDIA NVML Python license notice is missing")
(notices / "NVIDIA-NVML-Python-LICENSE.txt").write_text(nvml_notice.rstrip() + "\n", encoding="utf-8")
python_license = Path(sys.base_prefix) / "LICENSE.txt" python_license = Path(sys.base_prefix) / "LICENSE.txt"
if python_license.is_file(): if python_license.is_file():
shutil.copyfile(python_license, notices / "Python-LICENSE.txt") shutil.copyfile(python_license, notices / "Python-LICENSE.txt")
@@ -157,8 +173,10 @@ def build(compiler, output):
(payload / "BUILD.json").write_text(json.dumps(identity, indent=2) + "\n", encoding="utf-8") (payload / "BUILD.json").write_text(json.dumps(identity, indent=2) + "\n", encoding="utf-8")
for name in ("README.md", "SECURITY.md", "REMOTE_MONITORING.md", "CHANGELOG.md", "VERSION.md"): for name in ("README.md", "SECURITY.md", "REMOTE_MONITORING.md", "CHANGELOG.md", "VERSION.md"):
shutil.copyfile(ROOT / name, payload / name) shutil.copyfile(ROOT / name, payload / name)
if (ROOT / "LICENSE.md").is_file(): shutil.copyfile(ROOT / LICENSE_FILE, payload / LICENSE_FILE)
shutil.copyfile(ROOT / "LICENSE.md", payload / "LICENSE.md") wizard_license = temporary / "Software License.txt"
wizard_license.write_text((ROOT / LICENSE_FILE).read_text(encoding="utf-8-sig"),
encoding="utf-8-sig", newline="\r\n")
copy_notices(payload) copy_notices(payload)
setup_id = INSTALL_ID.replace("{", "{{", 1) setup_id = INSTALL_ID.replace("{", "{{", 1)
run([ run([
@@ -168,7 +186,7 @@ def build(compiler, output):
f"-DSetupId={setup_id}", f"-DArmPublisher={PUBLISHER}", f"-DArmCopyright={COPYRIGHT}", f"-DSetupId={setup_id}", f"-DArmPublisher={PUBLISHER}", f"-DArmCopyright={COPYRIGHT}",
f"-DAppWebsite={WEBSITE}", f"-DAppSupport={SUPPORT_URL}", f"-DAppModelId={APP_MODEL_ID}", f"-DAppWebsite={WEBSITE}", f"-DAppSupport={SUPPORT_URL}", f"-DAppModelId={APP_MODEL_ID}",
f"-DAppDescription={DESCRIPTION}", f"-DWizardImage={ROOT / APPLICATION_IMAGE}", f"-DAppDescription={DESCRIPTION}", f"-DWizardImage={ROOT / APPLICATION_IMAGE}",
f"-DWizardEmblem={ROOT / APPLICATION_LOGO}", f"-DWizardEmblem={ROOT / APPLICATION_LOGO}", f"-DLicenseAgreement={wizard_license}",
str(ROOT / "packaging" / "setup.iss"), str(ROOT / "packaging" / "setup.iss"),
]) ])
zip_path = temporary / f"{STEM}-portable.zip" zip_path = temporary / f"{STEM}-portable.zip"

View File

@@ -1,7 +1,14 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Sign an archived Jenkins candidate and publish an explicitly pinned build.""" """Sign an archived Jenkins candidate and publish an explicitly pinned build."""
import argparse import argparse
from base64 import b64decode, b64encode from base64 import b64decode, b64encode
from hashlib import file_digest from hashlib import file_digest, sha256 as hash_bytes
import json import json
import os import os
from pathlib import Path from pathlib import Path
@@ -22,8 +29,8 @@ sys.path.insert(0, str(ROOT))
from arm.branding import APP_MODEL_ID from arm.branding import APP_MODEL_ID
from arm.update_client import ReleaseClient from arm.update_client import ReleaseClient
from arm.update_release import ( from arm.update_release import (
ARCHITECTURE, KINDS, MANIFEST, UpdateError, artifact_name, canonical, sha256, source_config, ARCHITECTURE, KINDS, LICENSE_FILE, LICENSE_NOTE, MANIFEST, UpdateError, artifact_name, canonical, sha256,
verify_file, verify_manifest, software_license_digest, source_config, verify_file, verify_manifest,
) )
from arm.update_worker import unpack_portable, verify_executable from arm.update_worker import unpack_portable, verify_executable
from arm.version import VERSION, version_key from arm.version import VERSION, version_key
@@ -51,7 +58,11 @@ def notes_at(commit, version):
section = re.search(rf"^## {re.escape(version)}\s[^\n]*\n(.*?)(?=^## |\Z)", text, re.M | re.S) section = re.search(rf"^## {re.escape(version)}\s[^\n]*\n(.*?)(?=^## |\Z)", text, re.M | re.S)
if not section or not section[1].strip(): if not section or not section[1].strip():
raise UpdateError("Pinned version has no changelog entry") raise UpdateError("Pinned version has no changelog entry")
return section[1].strip() notes = section[1].strip()
if git("ls-tree", "--name-only", commit, "--", LICENSE_FILE):
license_text = subprocess.check_output(("git", "show", f"{commit}:{LICENSE_FILE}"), cwd=ROOT)
notes += f"\n\n{LICENSE_NOTE}{hash_bytes(license_text).hexdigest()}"
return notes
def expected_receipt(release): def expected_receipt(release):
@@ -96,6 +107,9 @@ def verify(folder, version, commit, number):
raise UpdateError("Portable package is inconsistent with the selected Jenkins build") raise UpdateError("Portable package is inconsistent with the selected Jenkins build")
if json.loads((payload / "_internal" / "update-source.json").read_bytes()) != source: if json.loads((payload / "_internal" / "update-source.json").read_bytes()) != source:
raise UpdateError("Packaged update repository or trust key is inconsistent") raise UpdateError("Packaged update repository or trust key is inconsistent")
if (license_digest := software_license_digest(release.notes)):
if not (payload / LICENSE_FILE).is_file() or sha256(payload / LICENSE_FILE) != license_digest:
raise UpdateError("Packaged software license disagrees with the signed source license")
print(f"Verified Ed25519 signature, Windows x64 packages and build identity | {version} | {commit} | Jenkins #{number}") print(f"Verified Ed25519 signature, Windows x64 packages and build identity | {version} | {commit} | Jenkins #{number}")
return release return release

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
from arm.update_worker import main from arm.update_worker import main

View File

@@ -1,3 +1,10 @@
# Adaptive Resource Monitor
# Original developer: Sonja M Thomas
# Copyright 2010-2026 SLT Design Creations, LLC
# Licensed under the Design Creations Attribution-NonCommercial-ShareAlike License v1.0.
# See LICENSE.md for complete license terms.
# https://www.designcreations.us/
"""Stage the pinned Windows compiler without changing the agent's execution policy.""" """Stage the pinned Windows compiler without changing the agent's execution policy."""
from hashlib import file_digest from hashlib import file_digest
from pathlib import Path from pathlib import Path