7 Commits

Author SHA1 Message Date
9b799751cd Finalize Adaptive Resource Monitor v0.8.4.4_beta 2026-11-26 22:04:51 -06:00
8dcb20f123 Move settings into the main window
Replace the modal settings dialog with a shared Settings tab accessible from the main window and tray menu, with explicit Save and Cancel behavior. Improve changelog navigation from update notices and update usage, licensing, and implementation documentation.
2026-11-26 22:03:28 -06:00
8a7f4160db Add cross-platform development roadmap
Document the proposed platform expansion, Windows monitoring agent, optional gateway and mobile companions, service availability monitoring, security requirements, and staged acceptance criteria. Include a roadmap graphic.
2026-11-26 21:48:51 -06:00
8079bf0ca6 Integrate the Design Creations license and refine the monitor 2026-11-26 21:46:52 -06:00
d2f8550111 Bundle Qt license notices and omit the unused virtual keyboard 2026-11-26 21:21:58 -06:00
6a592ebe4c Keep the machine checklist label clear at high DPI 2026-11-26 21:15:32 -06:00
26796a1f17 Persist machine ordering and checkbox display selection 2026-11-26 21:12:57 -06:00
57 changed files with 3241 additions and 296 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.
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
build produces packages and SHA-256 hashes. The maintenance executable and
runtime package both embed VERSION.md and the public verification key.

View File

@@ -1,5 +1,29 @@
# Changelog
## v0.8.4.4_beta — 2026-11-26
- Bundle DC-ANCSA v1.0 in the Windows installer and portable ZIP. Interactive Setup shows the agreement, and About opens the complete license offline.
- Show uptime for the local Windows machine and Linux SSH targets.
- Drag a machine card from its header or graphs. Use the hover monitor's Pin/Unpin button to change pinning.
- Open the shared Settings page from the main window between Resource Monitor and About, or from the tray menu.
- Open the changelog even when the main window is minimized. Opening it clears the success banner in both monitoring views and preserves the update completion receipt.
## v0.8.3.3_beta — 2026-11-26
Internal candidate superseded by v0.8.4.4_beta.
- 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
- 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.
- Choose any set of machines with the checkbox menu. The hover monitor, expanded monitor and tray menu share the saved selection. Hidden machines continue collecting telemetry.
- Include Qt's LGPL and GPL license texts in Windows packages and omit the unused Qt Virtual Keyboard.
## v0.6.2.3_beta — 2026-11-26
- Show the installed version at the upper right of the hover monitor above its controls.

View File

@@ -1,5 +1,158 @@
# Adaptive Resource Monitor implementation report
## v0.8.4.4_beta — Settings, changelog and licensed release
The Minor and Bug-Fix counters each advance once from v0.8.3.3_beta.
This release includes the offline DC-ANCSA v1.0 viewer and Setup agreement,
local and remote uptime, full machine card sorting, and button-only pinning.
The main window and tray share the same Settings page, including pending edits.
View Changelog restores a minimized monitor, opens the changelog and clears
both success banners while leaving the update receipt available.
The production update runs directly from v0.8.2.3_beta. That updater invokes
Setup in unattended mode, so the production user reviews and accepts the
exact signed-release license separately before authorizing installation in
the existing About controls.
## 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.
The supplied root license and the anonymous Gitea copy match SHA-256
`d5dde5498f5a81b4cc9ca1db3a1b53d6cc343053a080ceaefcf20a423984f215`.
Gitea's description identifies the current source as DC-ANCSA v1.0. The
repository retained its existing visibility and prior release tags.
The dependency review preserved the Qt, PySide, CPython, Paramiko and
other wheel notices. It added the BSD notice from the NVIDIA wrapper
source header and the OpenSSL and Tcl notices. The applications' own
license governs original material. Separate upstream terms for bundled
libraries are documented in the third-party notices.
The 39 regressions and final private native Windows suite passed. The
suite checked the offline license viewer and restored window placement,
the banner and completion marker, graph-body dragging, tray click and
pin behavior, and Windows uptime and Linux SSH fixture uptime. The
Linux probe passed Bash syntax validation in the existing Ubuntu WSL
environment.
Build and Archive #17 built and signed commit
`8079bf0ca626c7643e5cf3e928651f9c8e63c96a`. The Windows x64 installer,
portable package, Ed25519 signature, exact bundled license and signed
build identity verified. This internal candidate was superseded by
v0.8.4.4_beta.
[Build #17](https://phantom.zapto.org:8080/jenkins/job/Adaptive-Resource-Monitor/job/Build-and-Archive/17/)
| Windows x64 package | Bytes | SHA-256 |
| --- | ---: | --- |
| Installer | 60,120,801 | `4360334e1c8123664bada615a57cdbed4b319cb0948ebd1040a3b74d0320a881` |
| Portable ZIP | 74,566,298 | `bec0c3656e65e0da8f12faebb585b27a186feca10b2981c090083904fa288a09` |
The disposable Inno Setup wizard displayed the complete agreement from
the archived payload. Declining disabled Next and canceling preserved the
prior executable and data. Accepting advanced Setup. The separate unattended
update-mode install and uninstall both returned 0. The installed license
matched its source, and the fixture profile, saved display preferences and
history remained identical. The wizard screenshot is retained in
`evidence/v0.8.3.3_beta-native/installer-license-agreement.png`.
The final private application check removed 242,695 bytes of test data.
The disposable Setup check removed 278,016,814 bytes of compiler staging,
test installers, installation files and fixture settings. The signed
candidate and evidence are retained.
A failed early disposable compiler stage left
`%TEMP%\arm-qa-upgrade-i_uxybxg`. Windows denied access to the child
compiler directory. Automatic command review rejected ownership and
cleanup operations for that path.
## v0.8.2.3_beta — Machine ordering and display selection
Two Feature increments combine drag-and-drop machine ordering and checkbox
selection in one Beta. The machine order and selection use stable profile
identifiers and one immediately saved file in the ARM settings directory.
The file is flushed before atomic replacement. A Windows write-through move
commits the new file. It remains available if an earlier application version
rewrites its settings during rollback. The original single-machine or All
Systems preference supplies the initial selection and order.
The hover and expanded monitors and tray submenu share the same checkbox
selection. Remote Targets and both monitors share the same order. Sorting a
subset changes its visible slots and preserves the positions of hidden
machines. The save completes before a new selection or order is displayed.
Sorting and visibility changes leave telemetry providers, SSH sessions,
history and the primary tray source in place.
Package inspection found a Qt Virtual Keyboard plugin brought in by the
freezer and missing LGPL v3 and GPL v3 license texts. The build excludes the
optional plugin and includes the upstream notices and versioned sources for
the dynamically linked Qt and PySide runtime. The native package test checks
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
Production v0.6.2.2_beta was built from `5e8ea74be3fd94156bdc7a0810cfcc8eaac739f0`.
@@ -21,6 +174,50 @@ Qt's per-process scale factor on private Windows desktops. A native geometry
check confirmed exact positioning on reopening and recovery of an off-screen
About window on the current display.
Build and Archive #13 built commit
`31f0b430fbe05eafcbef87a7f6cf39c07aa9030e`. The native package checks
and Ed25519 verification passed. Publish Release #11 published the pinned
archive. All seven anonymous downloads matched the archive by size and
SHA-256. The signed manifest, exact version, x64 packages, Gitea tag, and
release notes were independently verified. The installed v0.6.2.2_beta
updater code found the release eligible without a verification error.
[Build #13](https://phantom.zapto.org:8080/jenkins/job/Adaptive-Resource-Monitor/job/Build-and-Archive/13/)
[Publication #11](https://phantom.zapto.org:8080/jenkins/job/Adaptive-Resource-Monitor/job/Publish-Release/11/)
[Public release](https://phantom.zapto.org/gitea/sonja/Adaptive_Resource_Monitor/releases/tag/v0.6.2.3_beta)
| Windows x64 package | Bytes | SHA-256 |
| --- | ---: | --- |
| Installer | 60,172,627 | `ef64b5a98194c35a4dac15b733dcf1206ad680dfb37a3e3963667da4a9a14c46` |
| Portable ZIP | 74,687,810 | `7e7cfe7bfd0752896da4216d2a1ed02539e636e01529b27541ada446a9a3dbe1` |
### Production acceptance
The installed updater reported the verified release and downloaded the
60,172,627-byte installer with the expected SHA-256. Transaction
`ec8569b9bdf0454aa9229283796e6d1a` captured independent preparation and
installation progress. ARM acknowledged shutdown, exited with code 0
before the installer log was created, and automatically restarted in the
same Windows user session and privilege level. The completion receipt and
success notification were saved. One ARM instance remained and the updater
exited. All 298 installed files matched the archived build.
Local Machine, Rain, Phantom, LAMP and PhantomNet resumed monitoring.
The production Explorer hover screenshot shows all five systems,
independent network IN and OUT graphs, and `v0.6.2.3_beta` at the upper
right. Settings and pinned SSH host keys matched their pre-upgrade hashes.
Saved credentials remained accessible and automatic checks remained off.
Persistent disk recording was already off. The shipped client verified
that the public release matched the installed version.
The signed packages remain available from Jenkins and Gitea. The two
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
under `evidence/v0.6.2.3_beta-production/`. The independent anonymous
verification removed 134,862,477 bytes of temporary downloads. Jenkins
removed its staging and package-test data and cleaned both job workspaces.
## v0.6.2.2_beta — Beta promotion
Alpha production acceptance and the signed same-number compatibility

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,13 +2,16 @@
Adaptive Resource Monitor is a native Windows tray utility for CPU, GPU,
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
expanded window from its context menu. Windows may initially place the icon
one dynamic icon by default. Click the icon to show the hover monitor, then
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
continuous access.
Use Settings to switch between Overlay, Stacked and Composite, choose devices,
set sampling and graph options, or enable SQLite history. Use Manage Remote Targets
Open **Settings** between **Resource Monitor** and **About**, or choose
**Settings** from the tray menu to open the same page. Use it to switch
between Overlay, Stacked and Composite, choose devices, set sampling and graph
options, or enable SQLite history. Use Manage Remote Targets
to add a Linux machine. A confirmed SSH key and working authentication are
required. The default configuration monitors only the local machine and keeps
history in memory.
@@ -19,12 +22,20 @@ machine for the primary icon. It defaults to Local Machine. Enable Separate
machine icons to also show icons for Local Machine and remote targets with
their tray option enabled.
Monitor Machine selects the history shown in the hover and expanded
monitors. All Systems shows six independent graphs for every enabled
machine. Changing the monitor selection leaves the tray icon source as
configured in Settings. Hover machine and history selections save as you
change them. Network IN and OUT have configurable colors and share one
throughput scale per machine.
Use the machine dropdown in either monitor or the tray's **Monitor Machine**
submenu to check the systems you want to display. The **All Systems** checkbox
selects or clears all enabled machines. With several machines selected, the
monitor shows separate graph sections in your saved order. Hidden machines
continue collecting telemetry. The primary tray icon keeps its configured
machine.
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
drop and checkbox change immediately. Network IN and OUT have configurable
colors and share one throughput scale per machine.
Open the About tab from the monitor
window or tray menu for build information, version history and support links.
@@ -40,7 +51,10 @@ reliability.
The application version is defined in [VERSION.md](VERSION.md). Open **About →
Check for Updates** to check the public ARM Releases page. Downloading and
installing are separate actions. Under **Settings → General**, enable
installing are separate actions. Review and accept the
[software license](LICENSE.md) before approving the direct update from
v0.8.2.3_beta. After the update, **View Changelog** opens the release notes and
clears the success banner. Under **Settings → General**, enable
**Check for updates at startup** or use **Check for updates periodically**
to choose Off, every 4 hours, every 12 hours, daily, or weekly.
Both Windows x64 distributions use signed update metadata. See
@@ -50,3 +64,15 @@ See [BUILD.md](BUILD.md) for Windows build and verification commands,
[REMOTE_MONITORING.md](REMOTE_MONITORING.md) for SSH setup, and
[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/)

267
ROADMAP.md Normal file
View File

@@ -0,0 +1,267 @@
# Adaptive Resource Monitor (ARM)
## Cross-Platform Development Roadmap
**Roadmap revision:** 1.1
**Date:** November 26, 2026
**Original developer:** Sonja M Thomas
**Copyright:** 2010-2026 SLT Design Creations, LLC
**Website:** https://www.designcreations.us/
**Repository:** https://phantom.zapto.org/gitea/sonja/Adaptive_Resource_Monitor
**License direction:** DC-ANCSA v1.0; the authoritative repository LICENSE.md governs distributed releases.
## 1. Purpose and scope
Expand ARM from its accepted Windows-first Beta foundation into a family of native desktop monitoring applications and mobile companion clients. Preserve the lightweight, read-only nature of ARM while enabling Windows, Windows Server, Linux and macOS systems to be monitored from supported desktop and mobile hosts.
The primary next milestone is a native Linux desktop application with a small Windows monitoring agent service. Android is a planned companion platform. macOS is a planned native desktop platform. iOS and iPadOS are conditional feasibility targets, not commitments.
A lightweight, read-only service availability and uptime monitor is also planned for local and remote systems, independently of the desktop platform expansion.
This is a planning document, not authorization to implement, install, deploy, publish or change existing infrastructure. No release dates or future numeric versions are assigned until work is approved and scoped.
## 2. Existing foundation
The reported accepted Windows baseline is v0.6.2.2_beta, with a subsequently observed v0.6.2.3_beta installation. Drag-and-drop ordering, multi-selection and license integration have been requested separately; their final release status must be checked against VERSION.md and the release archive before development begins.
Preserve the existing six resource categories: CPU, GPU, RAM, VRAM, storage I/O and network. Network receive is green and transmit is red, with a shared scale. Preserve individual machine identity, independent histories, the single-machine tray source, optional individual tray icons, secure SSH profiles, signed updates, and Design Creations branding. Do not restore cross-machine aggregation.
Existing test infrastructure includes the Windows workstation, Rain and Phantom (Kubuntu), LAMP and PhantomNet (remote Linux targets), and the user's Windows Server 2022 environment. These are potential validation targets, not permission to modify them.
## 3. Target platform matrix
| Platform | Native monitoring client | Local telemetry | Remote Linux | Remote Windows / Server | Priority |
|---|---|---|---|---|---|
| Windows 11 / supported Windows 10 editions | Existing desktop | Existing | SSH | Agent | Maintain and extend |
| Linux desktop | Native Qt desktop | Planned | SSH | Agent | First expansion |
| Windows Server | Headless agent; GUI optional later | Agent | Not required | Agent target | First expansion |
| macOS | Native desktop / menu bar | Planned, capability-dependent | SSH | Agent | Planned |
| Android | Native mobile companion | Limited, optional | Via gateway; direct SSH optional later | Via gateway; direct agent optional later | Planned |
| iOS / iPadOS | Native mobile companion | Limited, optional | Via gateway | Via gateway | Conditional |
Windows Server 2022 is the initial server validation target; Server 2019 and 2025 are proposed compatibility targets, subject to native testing and supported OS/runtime combinations. Server Core must be tested separately from Desktop Experience. Linux x86-64 and macOS Apple silicon are initial targets; Linux ARM64, Intel macOS and Windows ARM64 are conditional on demand, available hardware and dependency support.
## 4. Architecture and shared foundation
Retain Python and PySide6 for desktop clients where practical. Extract platform-independent telemetry models, history, graph scaling, device selection, ordering, persistence, connection state and protocol logic into shared modules. Do not rewrite the accepted Windows client merely to port it.
Use separate platform adapters for OS counters, hardware vendors, credentials, notification areas, autostart, packaging and update installation. Mobile clients may use platform-native languages rather than embedding the desktop runtime. Maintain a versioned, documented wire protocol and shared conformance fixtures so clients and agents can evolve independently.
```mermaid
flowchart LR
W[Windows desktop ARM] -->|SSH| L[Linux targets]
X[Linux desktop ARM] -->|SSH| L
M[macOS desktop ARM] -->|SSH| L
W -->|Authenticated TLS| A[Windows agent]
X -->|Authenticated TLS| A
M -->|Authenticated TLS| A
G[Optional headless ARM gateway] -->|SSH| L
G -->|Authenticated TLS| A
P[Android companion] -->|Authenticated TLS / VPN| G
I[iOS companion - conditional] -->|Authenticated TLS / VPN| G
```
The gateway is optional for desktop use and recommended for mobile access. Direct desktop-to-target monitoring must continue to work without a gateway, cloud subscription or central server. No Internet-facing agent listener by default.
### Telemetry contract
Define stable machine and device identifiers, protocol version, agent version, capabilities, metric identifier, units, timestamps, sampling interval, validity and stale/error state. Support independent network RX/TX, physical disk throughput, device-level GPU and dedicated/shared memory distinctions. Report unsupported counters as unavailable, never as fabricated zeroes. Use monotonic time for counter deltas and UTC timestamps for transport; handle reboot, rollover, dropped samples and clock skew. Negotiate protocol versions and capabilities; tolerate additive fields and reject incompatible major versions clearly.
## 5. Phase 1: Native Linux desktop
### Scope
Deliver an actual Linux desktop application, not a Windows application under Wine, WSL or a browser wrapper. Start with Kubuntu/KDE Plasma on Rain and Phantom, then validate supported Ubuntu LTS and Debian-based environments. Expand to GNOME and other desktops after initial acceptance.
### Implementation
- Reuse the existing Qt interface, About and license presentation, six graphs, saved machine selection, drag-and-drop ordering and update notifications.
- Implement local telemetry using psutil and appropriate `/proc`, `/sys`, DRM, hwmon and vendor interfaces. Support NVIDIA NVML and capability-dependent AMD/Intel providers. Do not require root for ordinary monitoring.
- Keep existing SSH remote Linux collection available on Linux, including password authentication and optional keys. Use a desktop secret store such as Secret Service or KWallet; if unavailable, require explicit configuration or session-only credentials instead of plaintext fallback.
- Implement native tray/status notifier integration. KDE and GNOME differ in tray and hover support; validate X11 and Wayland separately. Where a desktop cannot support native hover, provide an accessible click-to-open popup and document the limitation rather than claiming parity.
- Use XDG configuration, cache, data and state locations; persistent per-user settings and crash-resistant saves. Provide desktop autostart and clean session shutdown.
- Offer a Debian package first; evaluate portable tarball or AppImage as a second distribution. Package-manager-owned installations must use the appropriate package upgrade mechanism rather than silently overwrite managed files.
### Acceptance
Native KDE operation on Rain and Phantom; actual local CPU/RAM/disk/network readings; vendor GPU/VRAM readings where supported; Windows agent connections once Phase 2 is complete; independent selected-machine histories; tray/popup behavior; reconnect, suspend/resume, restart and upgrade tests; settings and credential preservation; measured performance. Validate native Linux execution without modifying excluded storage devices or unrelated services.
## 6. Phase 2: ARM Windows Monitoring Agent
### Product scope
A small, headless Windows service installed on monitored Windows desktop and Windows Server systems. It exposes read-only telemetry to an authorized ARM client on Linux, Windows or macOS. The full desktop ARM application is not required on the monitored system. No logged-in user is required.
### Implementation direction
Evaluate a small native service using Go or Rust, or a self-contained .NET Worker Service if measured footprint and deployment requirements are acceptable. Select the implementation through a benchmark and dependency/licensing review. Keep the service independent of Qt and the desktop updater. A minimal optional configuration utility or CLI is sufficient.
- Register with Windows Service Control Manager, support automatic startup, graceful stop, bounded recovery and Event Log diagnostics.
- Use a dedicated least-privilege service identity; grant only necessary counter access. Avoid LocalSystem and administrator privileges at runtime unless a specific, documented counter requires an approved exception.
- Collect CPU, RAM, disk I/O and network through supported Windows APIs and performance counters. Use PDH and vendor GPU interfaces as appropriate; test session-zero GPU visibility and Windows Server driver modes. Report absent hardware and inaccessible counters accurately.
- Support Windows Server Core without desktop dependencies. No remote shell, arbitrary command execution, process termination, maintenance or system configuration API.
- Sample once per host at configurable intervals and serve multiple authorized viewers from bounded buffers. Provide backpressure, connection limits, timeouts, reconnect and rate limits.
### Secure enrollment and transport
Use a versioned HTTPS API or authenticated streaming protocol over TLS. Prefer mutual TLS with a per-agent identity and separately revocable client credentials. Define explicit enrollment: locally authorized pairing, verification of the agent certificate or trusted CA, short-lived enrollment secret, issuance of a scoped credential, and confirmation of machine identity. Never automatically trust an unknown or changed certificate.
Protect private keys using Windows certificate/key storage and restrictive ACLs. Store client credentials in the appropriate platform secret store. Support renewal, revocation, re-enrollment and auditable access. No shared default password, anonymous telemetry, plaintext tokens, disabled TLS verification or automatic port forwarding.
Bind only to configured interfaces; default to a safe non-public configuration. Create narrow, explicitly approved firewall rules for trusted LAN/VPN peers. Prefer VPN connectivity for off-site access. Document firewall and certificate requirements without assuming a public agent endpoint is needed.
### Service management and updates
Provide a Windows x64 service installer, clean uninstall, configuration export without secrets and signed update artifacts. Service installation and updates require explicit administrative authorization. Preserve enrollment identity across upgrades; support rollback and recoverable service startup. Do not let remote monitoring credentials authorize service updates. Do not expose an agent-update command to ordinary monitoring clients.
### Acceptance
Test Windows workstation and Windows Server 2022, including unattended operation after reboot and without interactive login. Verify other Server versions before claiming support. Demonstrate Linux-host-to-Windows monitoring of all supported metrics, multi-client access, invalid/revoked credential rejection, certificate rotation, firewall boundaries, connection loss/recovery, service upgrade/rollback and low resource use. Test no-GPU servers and GPU-equipped systems separately.
## 7. Phase 3: Native macOS desktop
Deliver an ARM application bundle with menu-bar status icon, compact popup and expanded independent-machine monitor. Reuse the Qt desktop core where supported; use native AppKit integration where Qt cannot provide reliable menu-bar behavior. Target Apple silicon first, evaluate Intel support separately.
Use supported macOS telemetry APIs (Mach/system statistics, network interface and disk counters, vendor/platform interfaces where available). Apple silicon unified memory must not be represented as a separate dedicated VRAM pool; label shared/unified memory explicitly or mark dedicated VRAM unavailable. Do not require root or private APIs for ordinary operation. Use Keychain for credentials and platform-supported login-item management.
Support SSH to Linux and authenticated Windows-agent connections. Provide a signed/notarized DMG or installer package as appropriate, with Gatekeeper validation, platform-specific update verification and safe rollback. A native Mac build agent, Apple signing identity and real Mac testing are prerequisites. Validate menu bar behavior, Retina scaling, multiple displays, sleep/wake, credentials, packaging and local/remote metrics before publication.
## 8. Phase 4: Optional headless ARM gateway
Provide a small independently deployable collector for continuous monitoring and mobile access. Linux/systemd is the initial deployment target. This is not required for native desktop use.
The gateway maintains explicitly configured SSH/agent connections, independent machine histories and optional retention, and exposes a read-only authenticated client API. Support multiple authorized users or device identities with per-machine access scopes, revocation, connection limits, audit logs, encrypted transport and bounded storage. Keep secrets local to the gateway; do not distribute SSH passwords to mobile devices. No cloud dependency, public exposure by default or remote administration functionality.
Support current snapshots and bounded history retrieval, reconnect/resume and timestamped stale data. Optional threshold alerts may be evaluated separately; mobile push infrastructure is not assumed. Provide native installation, service health reporting, backup/restore, signed upgrades and explicit retention controls. Validate on an approved Linux host without altering unrelated services or storage.
## 9. Phase 5: Android companion
Develop a native Android application, preferably Kotlin with Jetpack Compose, consuming the shared telemetry protocol through the gateway. Direct agent access or SSH may be evaluated later; the first release should not require storing server login passwords on a phone.
Provide selected-machine and all-machine views, independent six-category graphs, green RX/red TX, persistent sorting and checkbox selection, history range, connection status, last sample time, theme and About/license information. Adapt layouts to phones and tablets. Store device credentials in Android Keystore-backed storage; support revocation, network changes, VPN access and offline cached history with clear stale indicators.
Use foreground live streaming while the app is visible. Background work must comply with Android restrictions, notification requirements and battery policies; do not promise continuous polling while suspended. Prefer gateway-side collection. Evaluate optional notifications and widgets only after core acceptance.
Build signed APKs for authorized sideloading; evaluate AAB/Google Play distribution, signing and store policy compatibility separately. Do not implement a self-updater that bypasses Android package signing or store rules. Validate on real Android hardware (the Pixel 8 is a potential initial device), including Wi-Fi/mobile transitions, screen rotation, background/resume and battery/network overhead.
## 10. Phase 6: Possible iOS and iPadOS companion
This phase is conditional on developer resources, native Mac/Xcode access, real devices, distribution feasibility and user demand. Prefer Swift/SwiftUI with the shared gateway protocol.
Provide foreground remote dashboards, machine selection and ordering, history retrieval, stale indicators, Keychain-backed credentials and read-only authenticated access. Local phone hardware telemetry is optional and restricted to public supported APIs. Do not promise desktop-style system tray integration or unrestricted device-wide CPU/GPU/VRAM access.
Apple background execution is constrained and system-managed; continuous monitoring must occur on the gateway, not depend on the phone running indefinitely. Evaluate approved background refresh and optional push notifications only where useful and permitted. Do not misuse background modes to keep the app alive.
Evaluate TestFlight, App Store and other lawful distribution routes for compatibility with DC-ANCSA, third-party licenses and Apple's applicable terms. Require a native Mac build environment, provisioning and signing, device testing and privacy review before committing to release. No guarantee of store approval or release date.
## 11. Phase 7: Lightweight server and service monitoring
### Purpose and scope
Extend ARM beyond hardware resource telemetry to show whether selected server applications and services are running, reachable and healthy. Keep this an optional, simple monitoring feature, not a server administration suite. Support existing Windows and SSH-accessible Linux targets first, with the Windows agent, native Linux and macOS clients and mobile gateway consuming the same service status model as they become available.
### Initial service coverage
| Service or check | Monitoring approach |
|---|---|
| Apache HTTP Server | systemd or Windows service status; optional HTTP/HTTPS health probe |
| Nginx, Caddy, IIS | Native service status where available; HTTP/HTTPS probe |
| Jenkins and Gitea | Service status and configured application endpoint |
| SSH and Windows Remote Desktop | Service status and optional TCP reachability |
| MariaDB, MySQL, PostgreSQL | Service status and optional TCP or explicitly configured read-only health probe |
| PHP-FPM, Redis and other daemons | Configurable service unit or Windows service name |
| Emby, Sonarr, Radarr, Readarr, Prowlarr, Ollama | Optional service status and configured application endpoint |
| Custom applications | User-defined service name, HTTP/HTTPS endpoint or TCP host and port |
Examples are optional profiles, not hardcoded dependencies or permission to probe existing infrastructure. Do not automatically scan networks or discover services by probing arbitrary ports.
### Status and uptime
Display machine uptime separately from service uptime and observed endpoint availability. A service restart must not reset host uptime or another service's uptime.
- Machine uptime: elapsed time since the host booted, obtained from supported operating system counters.
- Service uptime: elapsed time since the current service activation or process start, when reliably exposed by the platform. Clearly distinguish service activation from individual worker process start times.
- Observed availability: successful checks since ARM began monitoring, with optional rolling 24-hour, 7-day and 30-day availability percentages and outage history. Do not present observation duration as actual service uptime.
- Show running, stopped, failed, starting, unreachable, unknown, unsupported and stale states as applicable. Distinguish a running service with a failing endpoint from a stopped service.
- Display last successful check, last status change, last known restart, current uptime and optional HTTP response code or probe latency. Report unknown values explicitly.
- Missing monitoring intervals must be recorded as unknown, not counted as confirmed uptime or downtime. Show coverage alongside any availability percentage.
### Collection and security
Use existing persistent SSH sessions for read-only Linux service queries (for example, allowlisted systemd properties and host uptime). Support Windows Service Control Manager status and supported process/counter information through the planned Windows agent; service start time may be unavailable or ambiguous for shared-process services. On macOS, evaluate supported launchd status interfaces when available.
HTTP/HTTPS and TCP checks may run from the desktop or optional gateway; label the probe origin because network reachability depends on where it is measured. Prefer safe read-only endpoints, bounded timeouts and verified TLS. Make expected HTTP status codes configurable so authentication-required endpoints are not automatically classified as outages. Do not treat TCP reachability alone as proof of application health. Do not require sudo, administrator credentials, arbitrary shell commands or remote configuration changes for ordinary service monitoring. Protect any optional probe credentials using the existing platform secret store and never include them in logs.
Allow independent service check intervals (default proposal: 30 seconds) and configurable timeouts. Run checks asynchronously, with bounded concurrency and backoff, so slow services cannot delay resource telemetry or other checks. Reuse existing connections where practical.
### User interface
- Add an optional Services view to the expanded Resource Monitor with independent, clearly labeled sections for each selected machine.
- Show service name, status, uptime, last check and optional latency, with compact status indicators and readable text.
- Allow a compact optional service summary beneath the relevant machine's resource graphs in the hover monitor; hide it when disabled. Do not add a seventh resource graph or change the primary live tray icon.
- Allow users to select which services to monitor, configure check methods and intervals, and reorder services. Persist selections and ordering immediately using stable identifiers.
- Keep service monitoring separate from machine visibility; hiding a machine's graphs must not stop its configured checks.
- Optional outage/recovery notifications may be enabled explicitly, with deduplication and configurable consecutive-failure thresholds. No automatic restarts, repairs or remediation.
- Mobile clients may display the same status and uptime information through the optional gateway, with clear stale indicators.
### Acceptance
Validate actual service uptime against native operating system evidence and verify configured Apache, Jenkins and Gitea health checks where authorized. Use disposable services or controlled fixtures for restart and failure tests; do not stop production services to demonstrate detection. Verify host reboot handling, service restart detection, endpoint failure while the service is running, authentication-required endpoints, TLS failures, disconnected machines, monitoring gaps, settings persistence and optional outage history. Measure added CPU, memory and network overhead. Preserve all accepted resource monitoring behavior and existing infrastructure.
## 12. Packaging, versioning and CI/CD
Retain the existing Jenkins controller at https://phantom.zapto.org:8080/jenkins/ and Gitea repository. Use existing native Windows and Linux build agents where suitable; add native macOS capacity and Android toolchains only when authorized. iOS builds require a suitable Mac/Xcode environment. Do not use WSL or virtual machines as substitutes for native production acceptance.
Maintain independent platform build stages and artifacts. Use the authoritative desktop version convention `vMAJOR.FEATURE.MINOR.BUGFIX_TAG` with cumulative independent counters. New platform components may require their own versions and maturity classifications; document compatibility with the shared protocol and decide the exact component version policy before first release. A Windows Beta does not automatically make Linux, macOS or mobile releases Beta.
Build automatically; publish only explicitly authorized, pinned Jenkins artifacts. Verify anonymous downloads, SHA-256 hashes, signed manifests, exact platform/architecture and package metadata. Preserve existing Windows updater compatibility. Use OS-native signing and distribution requirements in addition to ARM's Ed25519 manifests; manifest signatures are not Authenticode, Apple notarization or mobile package signing.
Preserve attribution and the authoritative LICENSE.md across all components. Audit third-party dependencies, runtime redistribution obligations, store terms and custom source-available license compatibility before publication. Keep signing secrets and enrollment credentials out of public source, artifacts and logs.
## 13. Cross-platform acceptance and performance
- Verify independent resource histories and machine identity; no cross-machine aggregation.
- Verify persistent selections, drag-and-drop ordering, window geometry and applicable platform preferences after restart, crash and upgrade.
- Verify valid zero, unsupported, stale and disconnected readings remain distinct.
- Verify least privilege, enrollment, certificate validation, revocation, secret storage and safe network defaults.
- Verify slow or failed targets cannot block other collectors or the UI.
- Verify real native installation, upgrade, shutdown, restart and recovery on each supported platform.
- Measure desktop and agent CPU, memory, disk and network overhead over extended runs; use the existing desktop target of less than 1% total CPU capacity under ordinary tray-only operation as a benchmark, not a guaranteed cross-platform result. Establish agent and gateway budgets from measured prototypes. Measure mobile battery and data consumption.
- Preserve production data and settings. Use disposable isolated instances for fault injection; do not install on real targets or publish without authorization.
- Record hardware, OS version, test duration, actual screenshots, protocol conformance, package signatures and unresolved limitations in the implementation report.
## 14. Milestones and dependencies
| Milestone | Deliverable | Release gate |
|---|---|---|
| M0 | Shared telemetry contract and platform abstraction | Windows regression suite remains green |
| M1 | Native Linux desktop preview | Real KDE/X11 and Wayland validation; documented limitations |
| M2 | Windows/Server agent and desktop integration | Secure enrollment and actual Linux-to-Windows Server monitoring |
| M3 | Linux production candidate and Windows client interoperability | Native install/update and sustained operation |
| M4 | Native macOS desktop preview | Real Mac hardware, signing and local/remote capability checks |
| M5 | Optional headless gateway | Authenticated API, retention, recovery and security acceptance |
| M6 | Android companion | Real-device tests and signed distribution |
| M7 | iOS/iPadOS feasibility and optional preview | Apple toolchain, policy, licensing and real-device feasibility |
| M8 | Lightweight service status and uptime monitoring | Read-only Linux/Windows checks, accurate uptime, independent endpoint health and measured overhead |
M1 and M2 may proceed in parallel after M0. M2 is required for full Linux-to-Windows acceptance. macOS can proceed independently once M0/M2 interfaces are stable. Mobile clients depend on the gateway/API contract, not on completion of macOS. iOS remains optional. M8 can begin independently on the existing Windows client using its SSH provider and extend to Windows agent targets after M2; it does not depend on mobile or macOS delivery.
## 15. Explicit non-goals
ARM remains a read-only resource and service availability monitor, not Adaptive Maintenance, a remote desktop system, an arbitrary remote shell, a process manager, a cloud surveillance service or a centralized administration suite. No cross-machine aggregate graphs, forced cloud accounts, mandatory agents on SSH-accessible Linux systems, automatic public exposure, or unapproved deployment. Do not create artificial release versions solely to demonstrate progress.
## 16. Reference documentation
These are implementation reference starting points; verify current platform support and policy at the time of implementation.
- Microsoft Windows services: https://learn.microsoft.com/en-us/windows/win32/services/services
- Windows performance counters: https://learn.microsoft.com/en-us/windows/win32/perfctrs/performance-counters-portal
- Qt system tray: https://doc.qt.io/qt-6/qsystemtrayicon.html
- XDG Base Directory Specification: https://specifications.freedesktop.org/basedir-spec/latest/
- Apple background execution: https://developer.apple.com/documentation/uikit/about-the-background-execution-sequence
- Apple background tasks: https://developer.apple.com/documentation/uikit/using-background-tasks-to-update-your-app
- Android background work: https://developer.android.com/develop/background-work
- Android Keystore: https://developer.android.com/privacy-and-security/keystore
---
**Roadmap status:** Proposed future development. Existing Windows Beta maintenance continues independently. Implementation order, exact release versions, supported OS matrices and platform-specific distribution decisions remain subject to approval and native validation.

BIN
ROADMAP.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

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
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
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
session with the previous tray-only or expanded presentation. The restarted
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
behavior. The newer application still reads its completion receipt.

View File

@@ -1 +1 @@
v0.6.2.3_beta
v0.8.4.4_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."""

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."""
import json
import logging
@@ -19,6 +26,8 @@ from .branding import (
APPLICATION_IMAGE, COMPANY_LOGO, COPYRIGHT, DEVELOPER, DESCRIPTION, INSTALL_ID,
SUPPORT_URL, WEBSITE, asset, document,
)
from .software_license import LICENSE_LABEL, LicenseDialog
from .update_release import LICENSE_FILE
from .version import NAME, VERSION
from .update_ui import UpdatePanel
from .window_geometry import WindowGeometry
@@ -27,7 +36,6 @@ LOG = logging.getLogger(__name__)
DOCS = {
"README.md": "README",
"CHANGELOG.md": "Change Log",
"LICENSE.md": "Software License",
"THIRD_PARTY.md": "Third-party Notices",
}
UNINSTALL_KEY = rf"Software\Microsoft\Windows\CurrentVersion\Uninstall\{INSTALL_ID}_is1"
@@ -127,9 +135,15 @@ class AboutPage(QWidget):
self.version = QLabel(VERSION)
details.addRow("Installed version", self.version)
details.addRow("Release classification", QLabel(release_classification()))
license_info = ("See Software License below." if "LICENSE.md" in self.documents
else "Project license terms unavailable.")
details.addRow("Software license", QLabel(license_info))
license_row = QHBoxLayout()
self.view_license = QPushButton("View License")
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.clicked.connect(self.show_details)
buttons = QHBoxLayout()
@@ -189,7 +203,7 @@ class AboutPage(QWidget):
def show_document(self, name):
if name not in self.documents:
return
return False
path = document(name)
self.document_group.setTitle(self.documents[name])
try:
@@ -197,10 +211,29 @@ class AboutPage(QWidget):
except (OSError, UnicodeError) as exc:
LOG.warning("Unable to read About document %s: %s", name, exc)
self.browser.setPlainText(f"Unable to open {name}.")
return False
self.browser.verticalScrollBar().setValue(0)
return True
def open_changelog(self):
if self.show_document("CHANGELOG.md"):
self.updates.dismiss_success_notice()
self.browser.setFocus()
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):
if target in self.documents:
if target == "CHANGELOG.md":
self.open_changelog()
elif target in self.documents:
self.show_document(target)
elif QUrl(target).scheme() == "https":
QDesktopServices.openUrl(QUrl(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 functools import partial
import logging
@@ -20,7 +27,7 @@ from .branding import DARK, LIGHT, PUBLISHER, WEBSITE, application_icon, set_win
from .collect import Collectors
from .config import STATIC_TRAY_MODE, ConfigStore, Target, data_path, machine_ids, monitor_choices
from .credentials import CredentialStore
from .dialogs import ConnectionsDialog, SettingsDialog, TargetDialog
from .dialogs import ConnectionsDialog, SettingsPage, TargetDialog
from .graphs import Dashboard, tray_icon
from .history_db import HistoryDb
from .model import ALL, LOCAL, TOTAL, Connection
@@ -53,6 +60,7 @@ class Application(QObject):
archived = Signal(object, object)
history_error = Signal(str)
process_info = Signal(str)
display_changed = Signal()
def __init__(self, qt, root):
super().__init__()
@@ -78,7 +86,7 @@ class Application(QObject):
self.history_error.connect(self.report_history_error)
self.process_info.connect(self.accept_process_info)
self.collectors = Collectors(self.settings, self.credentials, self.hosts)
self.dashboard = Dashboard(self.collectors)
self.dashboard = Dashboard(self.collectors, self.store.load_display(self.settings))
self.collectors.changed.connect(self.sync_status)
self.icons = {}
self.menus = {}
@@ -90,17 +98,19 @@ class Application(QObject):
self.about_page.updates.changed.connect(self.sync_update_notice)
self.about_page.updates.quit_requested.connect(self.close_for_update)
self.expanded = Monitor(self.dashboard, True, self.request_archive, self.open_expanded,
self.set_pin, self.about_page)
self.set_pin, self.toggle_machine, self.reorder_machines, self.about_page)
self.settings_page = SettingsPage(self)
self.expanded.tabs.insertTab(1, self.settings_page, "Settings")
self.expanded.setWindowIcon(self.brand_icon)
self.window_geometry = WindowGeometry(self.expanded, self.root / "monitor-window.bin")
self.popup = Monitor(self.dashboard, False, self.request_archive, self.open_expanded, self.set_pin)
self.popup = Monitor(self.dashboard, False, self.request_archive, self.open_expanded, self.set_pin,
self.toggle_machine, self.reorder_machines)
for view in (self.popup, self.expanded):
view.add_update_banner(self.open_update)
self.hover = HoverMonitor(self.popup, self.dashboard, self.icons)
for view in (self.popup, self.expanded):
view.machine.currentIndexChanged.connect(partial(self.monitor_selected, view))
self.popup.machine.checklist.aboutToHide.connect(lambda: QTimer.singleShot(0, self.hover.reposition))
self.popup.interval.currentIndexChanged.connect(
lambda _: self.remember_monitor(span=self.popup.span))
lambda _: self.remember_monitor(self.popup.span))
self.tray_timer = QTimer(self)
self.tray_timer.timeout.connect(self.render)
self.hover_timer = QTimer(self)
@@ -112,7 +122,6 @@ class Application(QObject):
self.view_timer.timeout.connect(self.refresh_views)
self.view_timer.start()
self.manager = None
self.settings_dialog = None
self._closed = False
self.qt.styleHints().colorSchemeChanged.connect(self.change_brand_theme)
self.change_brand_theme()
@@ -141,7 +150,7 @@ class Application(QObject):
self.sync_icons()
self.popup.sync()
self.expanded.sync()
self.restore_monitor()
self.hover.reposition()
self.render()
self.about_page.updates.configure(settings)
@@ -171,24 +180,31 @@ class Application(QObject):
settings = replace(settings, hover_machine="")
if settings.tray_machine not in machine_ids(settings):
settings = replace(settings, tray_machine=LOCAL)
previous = self.dashboard.machine_display
display = previous.with_targets(settings)
self.store.save(settings)
self.settings = settings
self.dashboard.machine_display = display
self.configure()
self.expanded.archive()
if display != previous:
try:
self.store.save_display(display)
except OSError as exc:
LOG.exception("Could not save machine display preferences after changing profiles")
QMessageBox.warning(self.expanded, "Machine display preferences", str(exc))
LOG.info("Settings updated")
def sync_status(self):
self.popup.sync()
self.expanded.sync()
self.hover.reposition()
self.sync_menus()
self.refresh_views()
self.sync_display()
def scopes(self):
cfg = self.settings
if not cfg.separate_tray_icons:
return [cfg.tray_machine]
return list(dict.fromkeys((cfg.tray_machine, LOCAL, *(t.identifier for t in cfg.targets if t.tray))))
separate = {LOCAL, *(target.identifier for target in cfg.targets if target.tray)}
return [cfg.tray_machine, *(machine for machine in self.dashboard.machines()
if machine != cfg.tray_machine and machine in separate)]
def sync_icons(self):
scopes = self.scopes()
@@ -207,7 +223,7 @@ class Application(QObject):
icon.activated.connect(partial(self.activate_icon, machine))
icon.messageClicked.connect(lambda: self.open_update(self.update_notice_changelog))
self.icons[machine] = icon
self.menus[machine] = TrayMenu(self, machine)
self.menus[machine] = TrayMenu(self)
self.menus[machine].theme(self.brand_colors)
self.set_menu_update(self.menus[machine])
icon.setContextMenu(self.menus[machine])
@@ -216,48 +232,56 @@ class Application(QObject):
def sync_menus(self):
for menu in self.menus.values():
if not menu.isVisible():
menu.refresh()
menu.refresh()
def monitor_machine(self):
choices = monitor_choices(self.settings)
return next((choice for choice in (self.settings.hover_machine, self.settings.default_machine)
if choice in choices), LOCAL)
def restore_monitor(self):
machine = self.monitor_machine()
self.popup.set_machine(machine)
self.expanded.set_machine(machine)
with QSignalBlocker(self.popup.interval):
self.popup.interval.setCurrentIndex(self.popup.interval.findData(self.settings.hover_range))
def sync_display(self):
self.popup.sync_display()
self.expanded.sync_display()
self.hover.reposition()
self.sync_menus()
def monitor_selected(self, view, _index):
self.remember_monitor(machine=view.selected_machine)
def remember_monitor(self, machine=None, span=None):
changes = {}
if machine in monitor_choices(self.settings) and machine != self.settings.hover_machine:
changes["hover_machine"] = machine
if span is not None and span != self.settings.hover_range:
changes["hover_range"] = span
if not changes:
def remember_monitor(self, span):
if span == self.settings.hover_range:
return
updated = replace(self.settings, **changes)
updated = replace(self.settings, hover_range=span)
try:
self.store.save(updated)
except OSError as exc:
self.restore_monitor()
QMessageBox.warning(self.popup, "Monitor selection", str(exc))
with QSignalBlocker(self.popup.interval):
self.popup.interval.setCurrentIndex(self.popup.interval.findData(self.settings.hover_range))
QMessageBox.warning(self.popup, "History range", str(exc))
return
# Display preferences need no collector restart or archive reset.
self.settings = self.collectors.settings = updated
self.restore_monitor()
def select_machine(self, machine, scope):
self.remember_monitor(machine=machine)
self.hover.show(scope)
def save_display(self, display, parent):
if display == self.dashboard.machine_display:
self.sync_display()
return
try:
self.store.save_display(display)
except OSError as exc:
self.sync_display()
LOG.exception("Could not save machine display preferences")
QMessageBox.warning(parent, "Machine display preferences", str(exc))
return
self.dashboard.machine_display = display
self.sync_display()
self.display_changed.emit()
def toggle_machine(self, machine):
display = self.dashboard.machine_display
eligible = display.eligible(self.settings)
checked = set(display.selected)
if machine == ALL:
checked = checked - eligible if eligible <= checked else checked | eligible
elif machine in eligible:
checked.symmetric_difference_update({machine})
self.save_display(display.with_selection(self.settings, checked), self.qt.activeWindow() or self.popup)
def reorder_machines(self, shown, source, index, parent):
display = self.dashboard.machine_display
if source in shown:
self.save_display(display.move(self.settings, shown, source, index), parent)
def set_tray_display(self, mode):
if mode == self.settings.mode:
@@ -270,17 +294,13 @@ class Application(QObject):
def activate_icon(self, machine, reason):
if reason == QSystemTrayIcon.ActivationReason.Trigger:
self.toggle_pin(machine)
if not self.popup.pinned:
self.hover.show(machine)
elif reason == QSystemTrayIcon.ActivationReason.DoubleClick:
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):
self.hover.pin(enabled)
self.sync_menus()
def render(self):
now = time()
@@ -299,10 +319,7 @@ class Application(QObject):
if view.monitor_visible:
view.refresh()
def open_expanded(self, machine=None, history=False):
if machine not in monitor_choices(self.settings):
machine = self.monitor_machine()
self.expanded.set_machine(machine)
def open_expanded(self, history=False):
if history:
index = self.expanded.interval.findData(3600)
self.expanded.interval.setCurrentIndex(max(0, index))
@@ -310,12 +327,11 @@ class Application(QObject):
self.expanded.refresh()
self.expanded.archive()
def request_archive(self, scope, span, selection):
def request_archive(self, machines, span, selection):
if not self.storage:
return
kind, device = selection
machines = self.dashboard.monitored() if scope == ALL else [scope]
signature = (scope, span, selection, tuple(machines))
signature = (span, selection, tuple(sorted(machines)))
if signature == self.archive_signature:
return
self.archive_signature = signature
@@ -380,16 +396,7 @@ class Application(QObject):
self.process_message = message
def open_settings(self):
if self.settings_dialog:
self.settings_dialog.raise_()
return
dialog = SettingsDialog(self)
self.settings_dialog = dialog
try:
dialog.exec()
finally:
self.settings_dialog = None
dialog.deleteLater()
self.expanded.show_page(self.settings_page)
def manage(self):
if self.manager:
@@ -504,7 +511,7 @@ class Application(QObject):
QMessageBox.warning(self.expanded, "Start with Windows", str(exc))
def about(self):
self.expanded.show_page(about=True)
self.expanded.show_page(self.about_page)
def check_for_updates(self):
self.about()
@@ -515,8 +522,7 @@ class Application(QObject):
self.popup.hide()
self.about()
if changelog:
self.about_page.show_document("CHANGELOG.md")
self.about_page.browser.setFocus()
self.about_page.open_changelog()
else:
self.about_page.updates.buttons["Check for Updates"].setFocus()

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."""
from dataclasses import dataclass
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."""
from collections import defaultdict
from dataclasses import replace

View File

@@ -1,9 +1,17 @@
# 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 logging
import math
import os
from pathlib import Path
from dataclasses import asdict, dataclass, field, fields
from tempfile import NamedTemporaryFile
from uuid import uuid4
from .model import ALL, DISK_MODES, INTERVALS, LOCAL, NETWORK, RANGES, RESOURCES
@@ -193,6 +201,50 @@ def monitor_choices(settings):
return machine_ids(settings) | {ALL}
@dataclass(frozen=True, slots=True)
class MachineDisplay:
order: tuple[str, ...]
selected: tuple[str, ...]
select_new: bool = False
@staticmethod
def eligible(settings):
return {LOCAL, *(target.identifier for target in settings.targets if target.enabled)}
@classmethod
def from_legacy(cls, settings):
order = (LOCAL, *(target.identifier for target in settings.targets))
choice = next((item for item in (settings.hover_machine, settings.default_machine)
if item in monitor_choices(settings)), LOCAL)
return cls(order, order if choice == ALL else (choice,)).with_targets(settings)
def visible(self, settings):
eligible = self.eligible(settings)
return tuple(machine for machine in self.order if machine in eligible and machine in self.selected)
def with_targets(self, settings):
configured = (LOCAL, *(target.identifier for target in settings.targets))
prior = tuple(machine for machine in self.order if machine in configured)
added = tuple(machine for machine in configured if machine not in prior)
order = prior + added
checked = set(self.selected) | (set(added) if self.select_new else set())
return self.with_selection(settings, checked, order)
def with_selection(self, settings, checked, order=None):
order = self.order if order is None else order
return MachineDisplay(order, tuple(machine for machine in order if machine in checked),
self.eligible(settings).issubset(checked))
def move(self, settings, shown, source, index):
# Reorder only the visible slots. Hidden and disabled machines retain their positions.
moved = list(shown)
moved.remove(source)
moved.insert(index, source)
remaining = iter(moved)
order = tuple(next(remaining) if machine in shown else machine for machine in self.order)
return self.with_selection(settings, set(self.selected), order)
def valid_color(value, default):
if isinstance(value, str) and len(value) == 7 and value.startswith("#"):
if all(char in "0123456789abcdef" for char in value[1:].lower()):
@@ -203,6 +255,7 @@ def valid_color(value, default):
class ConfigStore:
def __init__(self, path):
self.path = Path(path)
self.display_path = self.path.with_name("machine-display.json")
def load(self):
if not self.path.is_file():
@@ -223,3 +276,52 @@ class ConfigStore:
temporary.replace(self.path)
finally:
temporary.unlink(missing_ok=True)
def load_display(self, settings):
try:
data = json.loads(self.display_path.read_text(encoding="utf-8"))
if isinstance(data, dict):
saved = MachineDisplay(tuple(strings(data.get("order"))),
tuple(strings(data.get("selected"))), data.get("select_new") is True)
return saved.with_targets(settings)
except FileNotFoundError:
pass
except (OSError, ValueError):
LOG.warning("Could not load machine display preferences", exc_info=True)
return MachineDisplay.from_legacy(settings)
def save_display(self, display):
# Earlier releases can still save settings.json after an update rollback.
# Keep these preferences in their own atomic file under the same settings root.
path = self.display_path
path.parent.mkdir(parents=True, exist_ok=True)
stream = NamedTemporaryFile(dir=path.parent, prefix=path.name + ".", suffix=".tmp", delete=False)
temporary = Path(stream.name)
try:
with stream:
stream.write((json.dumps(asdict(display), indent=2) + "\n").encode("utf-8"))
stream.flush()
os.fsync(stream.fileno())
replace_durable(temporary, path)
finally:
temporary.unlink(missing_ok=True)
def replace_durable(temporary, path):
if os.name == "nt":
import ctypes
from ctypes import wintypes
move = ctypes.WinDLL("kernel32", use_last_error=True).MoveFileExW
move.argtypes = (wintypes.LPCWSTR, wintypes.LPCWSTR, wintypes.DWORD)
move.restype = wintypes.BOOL
replace_existing, write_through = 0x1, 0x8
if not move(str(temporary), str(path), replace_existing | write_through):
raise ctypes.WinError(ctypes.get_last_error())
return
temporary.replace(path)
directory = os.open(path.parent, os.O_RDONLY)
try:
os.fsync(directory)
finally:
os.close(directory)

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."""
import ctypes as ct
from ctypes import wintypes as w

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/
from dataclasses import replace
from pathlib import Path
from PySide6.QtCore import Qt, QTimer
from PySide6.QtCore import QRect, QSignalBlocker, Qt, QTimer
from PySide6.QtGui import QColor
from PySide6.QtWidgets import (
QCheckBox, QColorDialog, QComboBox, QDialog, QDialogButtonBox, QDoubleSpinBox,
@@ -11,8 +18,9 @@ from PySide6.QtWidgets import (
)
from .config import TRAY_MODES
from .machine_controls import MachineDrag
from .model import DISK_MODES, LOCAL, NETWORK, RANGES, RESOURCES, Connection
from .views import fill, interval_choices, machine_choices, plain
from .views import fill, interval_choices, plain
from .window_geometry import WindowGeometry
@@ -93,24 +101,31 @@ class DeviceChoices(Choices):
self.setVisible(False)
class SettingsDialog(QDialog):
class SettingsPage(QWidget):
def __init__(self, app):
super().__init__()
self.app = app
self.cfg = app.settings
self.setWindowTitle("ARM Settings")
self.resize(610, 610)
self.tabs = None
layout = QVBoxLayout(self)
buttons = QDialogButtonBox(QDialogButtonBox.StandardButton.Save | QDialogButtonBox.StandardButton.Cancel)
buttons.accepted.connect(self.save)
buttons.rejected.connect(self.reload)
layout.addWidget(buttons)
self.timer = QTimer(self, interval=1500)
self.timer.timeout.connect(self.update_diagnostics)
def reload(self):
index = self.tabs.currentIndex() if self.tabs is not None else 0
if self.tabs is not None:
self.tabs.hide()
self.layout().removeWidget(self.tabs)
self.tabs.deleteLater()
self.cfg = self.app.settings
self.controls = {}
self.tabs = QTabWidget()
self.colors = dict(self.cfg.colors)
self.network_colors = dict(self.cfg.network_colors)
self.background = self.cfg.background
layout = QVBoxLayout(self)
layout.addWidget(self.tabs)
buttons = QDialogButtonBox(QDialogButtonBox.StandardButton.Save | QDialogButtonBox.StandardButton.Cancel)
buttons.accepted.connect(self.save)
buttons.rejected.connect(self.reject)
layout.addWidget(buttons)
self.general()
self.tray()
self.hover()
@@ -118,12 +133,23 @@ class SettingsDialog(QDialog):
self.remote()
self.history()
self.diagnostics()
self.timer = QTimer(self)
self.timer.setInterval(1500)
self.timer.timeout.connect(self.update_diagnostics)
self.tabs.setCurrentIndex(index)
self.layout().insertWidget(0, self.tabs, 1)
self.tabs.currentChanged.connect(self.update_diagnostics)
self.initial = self.values()
self.initial_startup = self.startup.isChecked()
self.update_diagnostics()
def showEvent(self, event):
if self.tabs is None or (self.values() == self.initial and self.startup.isChecked() == self.initial_startup):
self.reload()
super().showEvent(event)
self.timer.start()
self.update_diagnostics()
self.window_geometry = WindowGeometry(self, app.root / "settings-window.bin")
def hideEvent(self, event):
self.timer.stop()
super().hideEvent(event)
def section(self, title):
page = QWidget()
@@ -161,7 +187,6 @@ class SettingsDialog(QDialog):
form.addRow("Start with Windows", self.startup)
self.check(form, "Start minimized", "minimized")
self.select(form, "Theme", "theme", [(value, value) for value in ("System", "Light", "Dark")])
self.select(form, "Default machine", "default_machine", machine_choices(self.app.dashboard))
self.check(form, "Check for updates at startup", "update_startup")
self.check(form, "Show Windows update notifications", "update_notifications")
self.select(form, "Check for updates periodically", "update_interval",
@@ -172,7 +197,7 @@ class SettingsDialog(QDialog):
form = self.section("Tray Icon")
self.select(form, "Visualization", "mode", [(v, v) for v in TRAY_MODES])
self.select(form, "Tray icon machine", "tray_machine",
[("Local Machine", LOCAL)] + [(t.name, t.identifier) for t in self.cfg.targets])
[(self.app.dashboard.name(machine), machine) for machine in self.app.dashboard.machines()])
self.check(form, "Separate machine icons", "separate_tray_icons")
self.select(form, "Refresh", "tray_refresh", interval_choices())
self.select(form, "History range", "tray_range", [(v, k) for k, v in RANGES.items() if k <= 3600])
@@ -254,20 +279,26 @@ class SettingsDialog(QDialog):
form.addRow(self.diagnostic)
def update_diagnostics(self):
self.diagnostic.setText(self.app.diagnostics())
if self.diagnostic.isVisible():
self.diagnostic.setText(self.app.diagnostics())
def values(self):
return {**{key: getter() for key, getter in self.controls.items()},
"background": self.background, "colors": dict(self.colors),
"network_colors": dict(self.network_colors)}
def save(self):
updates = {key: getter() for key, getter in self.controls.items()}
cfg = replace(self.app.settings, **updates, background=self.background, colors=self.colors,
network_colors=self.network_colors)
updates = {key: value for key, value in self.values().items() if value != self.initial[key]}
startup = self.startup.isChecked()
try:
self.app.apply(cfg)
if self.startup.isChecked() != self.app.startup_enabled():
self.app.set_startup(self.startup.isChecked())
if updates:
self.app.apply(replace(self.app.settings, **updates))
if startup != self.initial_startup and startup != self.app.startup_enabled():
self.app.set_startup(startup)
except (OSError, ValueError) as exc:
QMessageBox.warning(self, "Settings", str(exc))
return
self.accept()
self.reload()
class TargetDialog(QDialog):
@@ -377,6 +408,7 @@ class ConnectionsDialog(QDialog):
self.table.setSelectionBehavior(QAbstractItemView.SelectionBehavior.SelectRows)
self.table.setSelectionMode(QAbstractItemView.SelectionMode.SingleSelection)
self.table.setEditTriggers(QAbstractItemView.EditTrigger.NoEditTriggers)
self.table.setVerticalScrollMode(QAbstractItemView.ScrollMode.ScrollPerPixel)
self.table.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeMode.Stretch)
self.table.cellDoubleClicked.connect(lambda *_: self.edit())
self.info = plain()
@@ -397,8 +429,12 @@ class ConnectionsDialog(QDialog):
row.addStretch()
layout.addLayout(row)
self.test_results = {}
self.identifiers = ()
self.drag = MachineDrag(self.table, self.row_rects, self.reorder)
self.drag.watch(self.table.viewport(), self.machine_at)
self.table.itemSelectionChanged.connect(self.status_text)
app.collectors.changed.connect(self.sync)
app.display_changed.connect(self.sync)
app.collectors.test_finished.connect(self.test_finished)
self.sync()
self.window_geometry = WindowGeometry(self, app.root / "remote-targets-window.bin")
@@ -409,20 +445,37 @@ class ConnectionsDialog(QDialog):
identifier = item.data(Qt.ItemDataRole.UserRole) if item else None
return next((target for target in self.app.settings.targets if target.identifier == identifier), None)
def machine_at(self, point):
row = self.table.rowAt(point.y())
return self.identifiers[row] if 0 <= row < len(self.identifiers) else None
def row_rects(self):
return [(machine, QRect(0, self.table.rowViewportPosition(row), self.table.viewport().width(),
self.table.rowHeight(row))) for row, machine in enumerate(self.identifiers)]
def reorder(self, source, index):
self.app.reorder_machines(self.identifiers, source, index, self)
def sync(self):
prior = self.selected()
self.table.setRowCount(len(self.app.settings.targets))
for row, target in enumerate(self.app.settings.targets):
state = self.app.dashboard.state(target.identifier)
for column, value in enumerate((target.name, f"{target.host}:{target.port}", target.method, state.value)):
item = QTableWidgetItem(value)
if column == 0:
item.setData(Qt.ItemDataRole.UserRole, target.identifier)
self.table.setItem(row, column, item)
if prior and prior.identifier == target.identifier:
self.table.selectRow(row)
if self.table.currentRow() < 0 and self.table.rowCount():
self.table.selectRow(0)
targets = {target.identifier: target for target in self.app.settings.targets}
self.identifiers = tuple(machine for machine in self.app.dashboard.machines() if machine in targets)
with QSignalBlocker(self.table):
self.table.setRowCount(len(self.identifiers))
for row, machine in enumerate(self.identifiers):
target = targets[machine]
state = self.app.dashboard.state(machine)
for column, value in enumerate((target.name, f"{target.host}:{target.port}", target.method, state.value)):
item = self.table.item(row, column)
if item is None:
item = QTableWidgetItem()
self.table.setItem(row, column, item)
item.setText(value)
if column == 0:
item.setData(Qt.ItemDataRole.UserRole, machine)
if self.identifiers:
selected = prior.identifier if prior else None
self.table.selectRow(self.identifiers.index(selected) if selected in self.identifiers else 0)
self.status_text()
def status_text(self):

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."""
from time import time
@@ -5,6 +12,7 @@ from PySide6.QtCore import QPointF, QRectF, QSize, Qt
from PySide6.QtGui import QColor, QIcon, QPainter, QPainterPath, QPen, QPixmap
from PySide6.QtWidgets import QSizePolicy, QWidget
from .config import MachineDisplay
from .model import ALL, Connection, LOCAL, NETWORK, RESOURCES, TOTAL, current_reading, graph_scale, normalized
METRICS = {kind: d[2] for kind, d in RESOURCES.items()}
@@ -96,8 +104,9 @@ def stroke(painter, rect, points, now, span, gap, color, width=1.3):
class Dashboard:
def __init__(self, collectors):
def __init__(self, collectors, machine_display=None):
self.collectors = collectors
self.machine_display = machine_display or MachineDisplay.from_legacy(collectors.settings)
self.archived = {}
@property
@@ -112,10 +121,11 @@ class Dashboard:
return next((t.name for t in self.settings.targets if t.identifier == machine), "Unknown machine")
def machines(self):
return [LOCAL] + [target.identifier for target in self.settings.targets]
return self.machine_display.order
def monitored(self):
return [LOCAL] + [target.identifier for target in self.settings.targets if target.enabled]
eligible = MachineDisplay.eligible(self.settings)
return [machine for machine in self.machines() if machine in eligible]
def state(self, machine):
status = self.collectors.statuses.get(machine)

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."""
from contextlib import closing
from pathlib import Path

217
arm/machine_controls.py Normal file
View File

@@ -0,0 +1,217 @@
# 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."""
from PySide6.QtCore import QEvent, QObject, QPoint, QSignalBlocker, Qt, QTimer
from PySide6.QtWidgets import (
QApplication, QCheckBox, QFrame, QMenu, QPushButton, QScrollArea, QSizePolicy,
QVBoxLayout, QWidget, QWidgetAction,
)
from .model import ALL
class MachineCheckbox(QCheckBox):
def hitButton(self, point):
return self.rect().contains(point)
class MachineMenu(QMenu):
def __init__(self, dashboard, toggle, parent=None):
super().__init__(parent)
self.dashboard = dashboard
self.toggle = toggle
self.entries = {}
self.signature = None
self.master = self.checkbox("All Systems", ALL)
action = QWidgetAction(self)
action.setDefaultWidget(self.master)
self.addAction(action)
self.addSeparator()
self.scroll = QScrollArea()
self.scroll.setFrameShape(QFrame.Shape.NoFrame)
self.scroll.setWidgetResizable(True)
self.scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarPolicy.ScrollBarAlwaysOff)
rows = QWidget()
self.rows = QVBoxLayout(rows)
self.rows.setContentsMargins(0, 0, 0, 0)
self.rows.setSpacing(0)
self.scroll.setWidget(rows)
action = QWidgetAction(self)
action.setDefaultWidget(self.scroll)
self.addAction(action)
self.aboutToShow.connect(self.sync)
def checkbox(self, name, machine):
box = MachineCheckbox(name.replace("&", "&&"))
box.setStyleSheet("QCheckBox { padding: 4px 9px; }")
box.setAccessibleName(name)
box.clicked.connect(lambda: self.toggle(machine))
return box
def sync(self):
dashboard = self.dashboard
eligible = set(dashboard.monitored())
display = dashboard.machine_display
signature = [(machine, dashboard.name(machine)) for machine in dashboard.machines()]
if signature != self.signature:
for row in self.entries.values():
self.rows.removeWidget(row)
row.hide()
row.deleteLater()
self.entries = {machine: self.checkbox(name, machine) for machine, name in signature}
self.signature = signature
for box in self.entries.values():
self.rows.addWidget(box)
height = sum(box.sizeHint().height() for box in self.entries.values())
self.scroll.setFixedHeight(min(height, 280))
self.scroll.setMinimumWidth(max(box.sizeHint().width() for box in self.entries.values()) + 18)
selected = set(display.selected)
with QSignalBlocker(self.master):
self.master.setTristate(True)
self.master.setCheckState(
Qt.CheckState.Checked if eligible <= selected else
Qt.CheckState.PartiallyChecked if eligible & selected else Qt.CheckState.Unchecked)
for machine, box in self.entries.items():
box.setEnabled(machine in eligible)
box.setChecked(machine in selected)
class MachineDropdown(QPushButton):
def __init__(self, dashboard, toggle):
super().__init__()
self.dashboard = dashboard
self.setAccessibleName("Machine selection")
self.setSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Fixed)
self.setMinimumWidth(145)
self.setStyleSheet("""
QPushButton { text-align: left; padding: 3px 22px 3px 8px; min-height: 17px; }
QPushButton::menu-indicator { subcontrol-position: center right; right: 5px; }
""")
self.checklist = MachineMenu(dashboard, toggle, self)
self.setMenu(self.checklist)
def sync(self, displayed):
names = [self.dashboard.name(machine) for machine in displayed]
if not names:
label = "No Systems Selected"
elif len(names) == 1:
label = names[0]
elif len(names) == len(self.dashboard.monitored()):
label = "All Systems"
else:
label = f"{len(names)} Systems Selected"
metrics = self.fontMetrics()
label = metrics.elidedText(label, Qt.TextElideMode.ElideRight, 165)
self.setMinimumWidth(max(145, metrics.horizontalAdvance(label) + 34))
self.setText(label)
self.setToolTip("\n".join(names))
self.checklist.sync()
class MachineDrag(QObject):
def __init__(self, scroll, items, dropped):
super().__init__(scroll)
self.scroll, self.items, self.dropped = scroll, items, dropped
self.viewport = scroll.viewport()
self.line = QFrame(self.viewport)
self.line.setAttribute(Qt.WidgetAttribute.WA_TransparentForMouseEvents)
self.line.setStyleSheet("background-color: palette(highlight)")
self.line.hide()
self.widgets = {}
self.source = self.origin = self.position = self.index = None
self.active = False
self.timer = QTimer(self)
self.timer.setInterval(40)
self.timer.timeout.connect(self.autoscroll)
def watch(self, widget, machine_at):
self.widgets[widget] = machine_at
widget.installEventFilter(self)
widget.setCursor(Qt.CursorShape.OpenHandCursor)
def unwatch(self, widget):
if self.origin is widget:
self.cancel()
self.widgets.pop(widget, None)
widget.removeEventFilter(self)
def eventFilter(self, widget, event):
kind = event.type()
if kind == QEvent.Type.KeyPress and self.active and event.key() == Qt.Key.Key_Escape:
self.cancel()
return True
if widget is self.origin and kind in (QEvent.Type.Hide, QEvent.Type.UngrabMouse):
self.cancel()
if kind == QEvent.Type.MouseButtonPress and event.button() == Qt.MouseButton.LeftButton:
self.source = self.widgets[widget](event.position().toPoint())
self.origin = widget if self.source is not None else None
self.start = event.globalPosition().toPoint()
return widget is self.origin and widget is not self.viewport
if widget is not self.origin:
return False
if kind == QEvent.Type.MouseMove:
position = event.globalPosition().toPoint()
if (not self.active and event.buttons() & Qt.MouseButton.LeftButton
and (position - self.start).manhattanLength() >= QApplication.startDragDistance()):
self.active = True
widget.setCursor(Qt.CursorShape.ClosedHandCursor)
widget.grabMouse()
widget.grabKeyboard()
self.timer.start()
if self.active:
self.position = position
self.indicate()
return True
if kind == QEvent.Type.MouseButtonRelease and event.button() == Qt.MouseButton.LeftButton:
active = self.active
if active:
self.position = event.globalPosition().toPoint()
self.indicate()
source, index = self.source, self.index
self.cancel()
if active and index is not None:
self.dropped(source, index)
return active
return False
def indicate(self):
point = self.viewport.mapFromGlobal(self.position)
if not self.viewport.rect().contains(point):
self.index = None
self.line.hide()
return
rows = [(machine, rect) for machine, rect in self.items() if machine != self.source]
self.index = next((index for index, (_, rect) in enumerate(rows) if point.y() < rect.center().y()), len(rows))
if not rows:
return
edges = [rect.top() for _, rect in rows] + [rows[-1][1].bottom() + 1]
y = max(0, min(self.viewport.height() - 3, edges[self.index]))
self.line.setGeometry(3, y, max(1, self.viewport.width() - 6), 2)
self.line.raise_()
self.line.show()
def autoscroll(self):
point = self.viewport.mapFromGlobal(self.position)
threshold = min(40, self.viewport.height() // 4)
if 0 <= point.x() < self.viewport.width() and -threshold <= point.y() < self.viewport.height() + threshold:
direction = -1 if point.y() < threshold else 1 if point.y() >= self.viewport.height() - threshold else 0
if direction:
bar = self.scroll.verticalScrollBar()
bar.setValue(bar.value() + direction * max(4, bar.singleStep() // 2))
self.indicate()
def cancel(self):
widget, active = self.origin, self.active
self.source = self.origin = self.index = None
self.active = False
self.timer.stop()
self.line.hide()
if active:
widget.releaseKeyboard()
widget.releaseMouse()
widget.setCursor(Qt.CursorShape.OpenHandCursor)

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 dataclasses import dataclass
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."""
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 re
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.
export LC_ALL=C
os=$(uname -sr)
nvidia=$(command -v nvidia-smi || :)
sample() {
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
case "$name" in
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."""
import ctypes as ct
from ctypes import wintypes as w
@@ -9,6 +16,13 @@ import winreg
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):
_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 csv
import hashlib
@@ -295,7 +302,9 @@ class LinuxParser:
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]
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, {
"system.uptime": (uptime if uptime is not None and uptime >= 0 else None, "s"),
"cpu.util": (usage(*cpu_values.get("cpu", (None, None))), "%"),
"cpu.physical": (len(core_map) or 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 platform
from time import perf_counter as monotonic, time
@@ -5,7 +12,7 @@ from time import perf_counter as monotonic, time
import psutil
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 (
LOCAL, TOTAL, Availability, Device, Reading, Sample, aggregate, rate, readings, usage,
)
@@ -21,6 +28,7 @@ class Cpu(Provider):
self.last = {}
self.name = cpu_identity()
self.cores = physical_cores()
self.uptime = uptime_counter()
self.stamp = 0
@staticmethod
@@ -52,6 +60,7 @@ class Cpu(Provider):
self.last, self.stamp = times, now
frequency = psutil.cpu_freq()
items.extend(readings(LOCAL, stamp, TOTAL, {
"system.uptime": (self.uptime() / 1000, "s"),
"cpu.util": (cpu_group(values, times), "%"),
"cpu.frequency": (frequency.current if frequency else None, "MHz"),
"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."""
import ctypes as ct
from ctypes import wintypes as w
@@ -92,8 +99,7 @@ class HoverMonitor:
hovered = machine
break
over = self.popup.isVisible() and (self.popup.frameGeometry().contains(cursor)
or self.popup.interval.view().isVisible()
or self.popup.machine.view().isVisible())
or self.popup.interaction_active)
cfg = self.dashboard.settings
visible = self.popup.isVisible() and (self.anchor == hovered or hovered is None or over)
action = self.state.update(monotonic(), hovered, over, visible, self.popup.pinned,
@@ -126,10 +132,23 @@ class HoverMonitor:
self.reposition()
def reposition(self):
if self.location is not None:
if self.location is not None and not self.popup.drag.active:
screen, rect = self.location
position = place_popup(screen.availableGeometry(), rect, self.popup.popup_size())
area = screen.availableGeometry()
self.popup.layout().activate()
position = place_popup(area, rect, self.popup.popup_size())
menu = self.popup.machine.checklist
if menu.isVisible():
# Keep the menu anchored to the control during successive clicks.
before = self.popup.geometry()
position.moveTo(max(area.left(), min(before.x(), area.right() - position.width() + 1)),
max(area.top(), min(before.y(), area.bottom() - position.height() + 1)))
delta = position.topLeft() - self.popup.geometry().topLeft()
self.popup.setGeometry(position)
if menu.isVisible() and not delta.isNull():
point = menu.pos() + delta
menu.move(max(area.left(), min(point.x(), area.right() - menu.width() + 1)),
max(area.top(), min(point.y(), area.bottom() - menu.height() + 1)))
def pin(self, value, machine=None):
self.popup.pinned = 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/
"""Design Creations tray commands for each visible ARM icon."""
from PySide6.QtCore import QSize, Qt
from PySide6.QtGui import QActionGroup, QColor, QFont, QIcon, QPainter, QPen, QPixmap
@@ -5,16 +12,16 @@ from PySide6.QtWidgets import QHBoxLayout, QLabel, QMenu, QStyle, QVBoxLayout, Q
from .about import BrandImage
from .config import TRAY_MODES
from .model import ALL, LOCAL
from .machine_controls import MachineMenu
from .version import NAME, VERSION
SP = QStyle.StandardPixmap
class TrayMenu(QMenu):
def __init__(self, app, scope):
def __init__(self, app):
super().__init__()
self.app, self.scope = app, scope
self.app = app
self.setAccessibleName(f"{NAME} tray menu")
self.add_header()
self.update = self.action(self, "", None, app.open_update)
@@ -26,18 +33,12 @@ class TrayMenu(QMenu):
open_monitor = self.action(self, "Open Resource Monitor", SP.SP_ComputerIcon,
app.open_expanded)
self.setDefaultAction(open_monitor)
self.pin = self.action(self, "Pin Resource Monitor", None, lambda: app.toggle_pin(scope))
self.pin.setCheckable(True)
self.addSeparator()
machines = self.submenu("Monitor Machine", SP.SP_ComputerIcon)
self.machine_group = QActionGroup(self)
self.machine_group.setExclusive(True)
self.local = self.machine_action(machines, "Local Machine", LOCAL)
self.remote = machines.addMenu(self.standard_icon(SP.SP_DriveNetIcon), "Configured Remote Machines")
self.all = self.machine_action(machines, "All Systems", ALL)
self.remote_entries = {}
self.targets = None
self.machines = MachineMenu(app.dashboard, app.toggle_machine, self)
self.machines.setTitle("Monitor Machine")
self.machines.setIcon(self.standard_icon(SP.SP_ComputerIcon))
self.addMenu(self.machines)
display = self.submenu("Tray Display", SP.SP_FileDialogDetailedView)
mode_group = QActionGroup(self)
@@ -101,27 +102,10 @@ class TrayMenu(QMenu):
def submenu(self, title, icon):
return self.addMenu(self.standard_icon(icon), title)
def machine_action(self, menu, name, machine):
action = self.action(menu, name, None, lambda: self.app.select_machine(machine, self.scope))
action.setCheckable(True)
self.machine_group.addAction(action)
return action
def refresh(self):
app = self.app
targets = [(t.identifier, t.name, app.dashboard.state(t.identifier).value) for t in app.settings.targets]
if targets != self.targets:
self.targets = targets
self.remote.clear()
self.remote_entries = {
machine: self.machine_action(self.remote, f"{name.replace('&', '&&')} · {status}", machine)
for machine, name, status in targets
}
self.remote.menuAction().setVisible(bool(targets))
choices = {LOCAL: self.local, ALL: self.all, **self.remote_entries}
choices[app.monitor_machine()].setChecked(True)
self.machines.sync()
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())
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."""
from dataclasses import dataclass
from hashlib import sha256
import json
import os
from pathlib import Path
@@ -9,7 +17,8 @@ from urllib.parse import quote, urlsplit
from urllib.request import HTTPRedirectHandler, Request, build_opener
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
@@ -72,6 +81,16 @@ class ReleaseClient:
raise UpdateError(f"Release attachment size is inconsistent: {name}")
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):
rows = {}
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."""
import logging
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."""
from base64 import b64decode
from dataclasses import dataclass
@@ -13,6 +20,8 @@ from .branding import APP_MODEL_ID
from .version import CHANNELS, ROOT, version_key
MANIFEST = "arm-update-windows-x64.json"
LICENSE_FILE = "LICENSE.md"
LICENSE_NOTE = "Software license SHA-256 "
ARCHITECTURE = "windows-x64"
KINDS = {"installed": "-setup.exe", "portable": "-portable.zip"}
MAX_PACKAGE_SIZE = 1024**3
@@ -39,6 +48,15 @@ def sha256(path):
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):
version_key(version)
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."""
from enum import Enum, auto
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."""
from datetime import datetime
import json
@@ -11,8 +18,10 @@ from PySide6.QtWidgets import (
QPushButton, QVBoxLayout,
)
from .branding import document
from .software_license import LicenseDialog
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 .version import VERSION, version_key
@@ -260,6 +269,16 @@ class UpdatePanel(QGroupBox):
self.downloaded = value
self.fields["Verification"].setText("Manifest signature and package SHA-256 verified")
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":
self.plan = value
self.elapsed = 0
@@ -295,10 +314,27 @@ class UpdatePanel(QGroupBox):
def install_now(self):
if not self.downloaded or self.job or self.plan or not self.installable:
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?",
QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No,
QMessageBox.StandardButton.No) != QMessageBox.StandardButton.Yes:
return
self.begin_install()
def begin_install(self):
from .about import installation
from .update_worker import prepare
release, artifact, target = self.release, self.downloaded, installation()[1]
@@ -311,6 +347,11 @@ class UpdatePanel(QGroupBox):
def defer_install(self):
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):
self.elapsed += 250
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."""
import argparse
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 sys
from pathlib import Path

View File

@@ -1,6 +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/
from time import time, strftime, localtime
from PySide6.QtCore import QSize, Qt, QSignalBlocker, QTimer
from PySide6.QtCore import QPoint, QRect, QSize, Qt, QSignalBlocker, QTimer
from PySide6.QtGui import QColor, QPalette
from PySide6.QtWidgets import (
QAbstractItemView, QComboBox, QFrame, QGridLayout, QHeaderView, QHBoxLayout, QLabel,
@@ -8,7 +15,8 @@ from PySide6.QtWidgets import (
)
from .graphs import Plot, resource_series, selected_resource
from .model import ALL, LOCAL, NETWORK, TOTAL, Connection, INTERVALS, RANGES, RESOURCES, format_value
from .machine_controls import MachineDrag, MachineDropdown
from .model import NETWORK, TOTAL, Availability, Connection, INTERVALS, RANGES, RESOURCES, format_value
from .version import VERSION
from .window_geometry import fit_work_area
@@ -42,10 +50,6 @@ def fill(combo, values, selected=None):
combo.setCurrentIndex(max(index, 0))
def machine_choices(dashboard):
return [(dashboard.name(machine), machine) for machine in (*dashboard.machines(), ALL)]
def interval_choices():
return [(f"{value:g} s", value) for value in INTERVALS]
@@ -76,6 +80,17 @@ def display_value(item):
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):
def __init__(self, resource, detailed, compact=False):
super().__init__()
@@ -155,6 +170,10 @@ class MachineSection(QFrame):
details.toggled.connect(refresh)
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):
def __init__(self, open_update):
@@ -185,7 +204,8 @@ class UpdateBanner(QFrame):
class Monitor(QWidget):
def __init__(self, dashboard, expanded, request_archive, switch_expanded, set_pin, about_page=None):
def __init__(self, dashboard, expanded, request_archive, switch_expanded, set_pin, toggle_machine,
reorder_machines, about_page=None):
flags = Qt.WindowType.Window if expanded else (
Qt.WindowType.Tool | Qt.WindowType.FramelessWindowHint | Qt.WindowType.WindowStaysOnTopHint)
super().__init__(None, flags)
@@ -197,8 +217,7 @@ class Monitor(QWidget):
self.setAttribute(Qt.WidgetAttribute.WA_ShowWithoutActivating, True)
self.setObjectName("hoverMonitor")
self.pinned = False
self.machine = QComboBox()
self.machine.setAccessibleName("Machine")
self.machine = MachineDropdown(dashboard, toggle_machine)
self.interval = QComboBox()
self.interval.setAccessibleName("History range")
self.device = QComboBox()
@@ -207,7 +226,7 @@ class Monitor(QWidget):
self.header.setWordWrap(True)
top = QHBoxLayout()
for control in (self.machine, self.interval):
top.addWidget(control)
top.addWidget(control, 0 if expanded else 1)
if expanded:
top.addWidget(self.device, 1)
else:
@@ -216,9 +235,9 @@ class Monitor(QWidget):
pin.toggled.connect(set_pin)
self.pin = pin
details = QPushButton("Details")
details.clicked.connect(lambda: switch_expanded(self.machine.currentData()))
top.addWidget(pin)
top.addWidget(details)
details.clicked.connect(lambda: switch_expanded())
top.addWidget(pin, 1)
top.addWidget(details, 1)
self.cards = {kind: Card(kind, expanded) for kind in RESOURCES}
self.grid = QGridLayout()
self.grid.setSpacing(5)
@@ -245,6 +264,9 @@ class Monitor(QWidget):
self.version_label = version
layout.addLayout(top)
layout.addWidget(self.header)
self.empty = plain(QLabel("No systems selected for display."))
self.empty.setAlignment(Qt.AlignmentFlag.AlignTop | Qt.AlignmentFlag.AlignLeft)
layout.addWidget(self.empty, 1)
self.single = QWidget()
single_layout = QVBoxLayout(self.single)
single_layout.setContentsMargins(0, 0, 0, 0)
@@ -261,13 +283,13 @@ class Monitor(QWidget):
self.simultaneous.setWidget(groups)
layout.addWidget(self.simultaneous, 1)
self.sections = {}
self.drag = MachineDrag(self.simultaneous, self.section_rects,
lambda source, index: reorder_machines(self.displayed, source, index, self))
if expanded:
self.table = measurements_table()
single_layout.addWidget(self.table, 2)
self.resize(900, 690)
self.machine.currentIndexChanged.connect(self.sync_devices)
self.device.currentIndexChanged.connect(self.selection_changed)
self.machine.currentIndexChanged.connect(self.selection_changed)
self.interval.currentIndexChanged.connect(self.selection_changed)
self.archive_due = QTimer(self)
self.archive_due.setSingleShot(True)
@@ -282,10 +304,12 @@ class Monitor(QWidget):
def monitor_visible(self):
return self.isVisible() and (not self.expanded or self.tabs.currentWidget() is self.resource_page)
def show_page(self, about=False):
self.tabs.setCurrentWidget(self.about_page if about else self.resource_page)
def show_page(self, page=None):
self.tabs.setCurrentWidget(self.resource_page if page is None else page)
self.ensurePolished()
self.layout().activate()
if self.isMinimized():
self.setWindowState(self.windowState() & ~Qt.WindowState.WindowMinimized)
self.show()
fit_work_area(self)
self.raise_()
@@ -305,8 +329,12 @@ class Monitor(QWidget):
""")
@property
def selected_machine(self):
return self.machine.currentData() or LOCAL
def displayed(self):
return self.dashboard.machine_display.visible(self.dashboard.settings)
@property
def interaction_active(self):
return self.drag.active or self.machine.checklist.isVisible() or self.interval.view().isVisible()
@property
def selection(self):
@@ -321,11 +349,13 @@ class Monitor(QWidget):
extra = self.version_label.sizeHint().height() + self.layout().spacing()
extra += self.update_banner.sizeHint().height() + self.layout().spacing() if (
hasattr(self, "update_banner") and not self.update_banner.isHidden()) else 0
if self.selected_machine != ALL:
if not self.displayed:
return QSize(cfg.popup_width, 72 + extra)
if len(self.displayed) == 1:
return QSize(cfg.popup_width, cfg.popup_height + extra)
# Cap in HoverMonitor against the work area. The scroll area keeps
# six columns together even on a narrow monitor.
rows_height = sum(max(138, section.sizeHint().height()) for section in self.sections.values())
rows_height = sum(max(138, self.sections[machine].sizeHint().height()) for machine in self.displayed)
return QSize(max(cfg.popup_width, 875), max(cfg.popup_height, rows_height + 72) + extra)
def add_update_banner(self, open_update):
@@ -335,8 +365,11 @@ class Monitor(QWidget):
def sync_devices(self):
if not self.expanded:
return
machine = self.selected_machine
self.device.setVisible(machine != ALL)
shown = self.displayed
self.device.setVisible(len(shown) == 1)
if len(shown) != 1:
return
machine = shown[0]
devices = self.dashboard.collectors.devices.get(machine, {})
kinds = {"cpu": "CPU", "gpu": "GPU", "disk": "Disk", "net": "Network"}
values = [("Selected devices · aggregate", ("", TOTAL))] + [
@@ -349,12 +382,9 @@ class Monitor(QWidget):
def sync(self):
settings = self.dashboard.settings
fill(self.machine, machine_choices(self.dashboard),
self.machine.currentData() or settings.hover_machine or settings.default_machine)
ranges = [(label, span) for span, label in RANGES.items()
if span <= 3600 or (self.expanded and settings.persistent and span <= settings.retention_days * 86400)]
fill(self.interval, ranges, (self.interval.currentData() or 60) if self.expanded else settings.hover_range)
self.sync_devices()
columns = 2 if self.expanded else settings.popup_columns
kinds = tuple(self.cards) if self.expanded else tuple(
kind for kind in self.cards if kind in settings.hover_resources)
@@ -363,55 +393,72 @@ class Monitor(QWidget):
card.setVisible(resource in kinds)
for index, kind in enumerate(kinds):
self.grid.addWidget(self.cards[kind], index // columns, index % columns)
self.sync_sections()
self.sync_display()
def set_machine(self, machine):
index = self.machine.findData(machine)
if index >= 0:
with QSignalBlocker(self.machine):
self.machine.setCurrentIndex(index)
def sync_display(self):
self.machine.sync(self.displayed)
self.sync_devices()
self.sync_sections()
if self.monitor_visible:
self.selection_changed()
def sync_sections(self):
both = self.selected_machine == ALL
self.single.setVisible(not both)
self.simultaneous.setVisible(both)
if not both:
return
machines = self.dashboard.monitored()
for machine in self.sections.keys() - set(machines):
shown = self.displayed
self.empty.setVisible(not shown)
self.header.setVisible(bool(shown))
self.single.setVisible(len(shown) == 1)
self.simultaneous.setVisible(len(shown) > 1)
for machine in self.sections.keys() - set(self.dashboard.machines()):
section = self.sections.pop(machine)
for widget in section.drag_surfaces():
self.drag.unwatch(widget)
self.group_rows.removeWidget(section)
section.deleteLater()
if len(shown) < 2:
return
for machine in self.sections.keys() - set(shown):
section = self.sections[machine]
self.group_rows.removeWidget(section)
section.hide()
section.deleteLater()
for index, machine in enumerate(machines):
for index, machine in enumerate(shown):
if machine not in self.sections:
section = MachineSection(self.expanded, self.refresh)
self.sections[machine] = section
self.sections[machine] = section = MachineSection(self.expanded, self.refresh)
for widget in section.drag_surfaces():
self.drag.watch(widget, lambda _point, machine=machine: machine)
section = self.sections[machine]
current = self.group_rows.indexOf(section)
if current != index:
if current >= 0:
self.group_rows.removeWidget(section)
self.group_rows.insertWidget(index, section)
section.show()
def section_rects(self):
return [(machine, QRect(self.sections[machine].mapTo(self.simultaneous.viewport(), QPoint()),
self.sections[machine].size())) for machine in self.displayed]
def selection_changed(self):
self.sync_sections()
if self.monitor_visible:
self.refresh()
self.archive_due.start()
def archive(self):
if self.expanded and self.monitor_visible:
self.request_archive(self.selected_machine, self.span, self.selection)
if self.expanded and self.monitor_visible and self.displayed:
selected = self.selection if len(self.displayed) == 1 else ("", TOTAL)
self.request_archive(self.displayed, self.span, selected)
def refresh(self):
self.sync_devices()
now, span, scope = time(), self.span, self.selected_machine
shown = self.displayed
if not shown:
return
now, span = time(), self.span
cfg = self.dashboard.settings
archive = self.expanded and cfg.persistent
if scope == ALL:
self.sync_sections()
self.refresh_sections(now, span, archive)
if len(shown) > 1:
self.refresh_sections(shown, now, span, archive)
return
scope = shown[0]
text = self.scope_status(scope)
set_label(self.header, text + f" · Tray {cfg.tray_refresh:g} s")
device_kind, selected = self.selection
@@ -432,6 +479,8 @@ class Monitor(QWidget):
last = collectors.last.get(scope)
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}"
uptime = self.dashboard.observation(scope, "cpu", TOTAL, "system.uptime", time())
text += f" · {describe_uptime(uptime)}"
if status and status.detail:
text += f" · {status.detail}"
if self.expanded and not concise:
@@ -440,8 +489,7 @@ class Monitor(QWidget):
text += f" · {cpu_name}"
return text
def refresh_sections(self, now, span, archive):
machines = self.dashboard.monitored()
def refresh_sections(self, machines, now, span, archive):
online = sum(self.dashboard.state(machine) == Connection.ONLINE for machine in machines)
set_label(self.header, f"{online}/{len(machines)} connected · Individual machine histories")
for machine in machines:

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."""
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

View File

@@ -5,11 +5,35 @@ psutil, Paramiko and its cryptographic dependencies, NVIDIA's NVML Python
bindings, Tcl/Tk for the maintenance window, and the PyInstaller bootloader.
The NVIDIA display driver's NVML DLL
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)
Qt is dynamically linked. The Qt DLLs and PySide bindings are separately
replaceable under the applicable Qt licenses. The exact tested versions and
rebuild instructions are in the ARM source repository. Qt source is available
from the [Qt source archive](https://download.qt.io/archive/qt/) and PySide
source from the [Qt for Python source archive](https://download.qt.io/official_releases/QtForPython/).
Python source is available from [python.org](https://www.python.org/downloads/source/).
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
Public License v3. The accompanying LGPL v3 and GPL v3 texts are in the
Third-party notices directory. Qt is dynamically linked and the Qt DLLs
and PySide bindings can be replaced with compatible modified copies.
Users retain their rights under these licenses, including reverse
engineering to debug such modifications. ARM uses native Windows input.
The GPLv3 or commercial Qt Virtual Keyboard plugin is omitted.
Corresponding upstream sources and build instructions are available for
[Qt 6.11.2](https://download.qt.io/archive/qt/6.11/6.11.2/single/qt-everywhere-src-6.11.2.tar.xz)
and [PySide and Shiboken 6.11.2](https://github.com/pyside/pyside-setup/tree/v6.11.2).
The complete Qt license texts come from the
[Qt 6.11.2 source](https://code.qt.io/cgit/qt/qtbase.git/tree/LICENSES?h=v6.11.2).
CPython source is available from [python.org](https://www.python.org/downloads/source/).

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

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.

View File

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

View File

@@ -9,7 +9,7 @@ from arm.providers.ssh import probe_command
SECRET = "arm-fixture-only"
COMMAND = probe_command().encode()
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"
"ram\tMemTotal\t16384\nram\tMemAvailable\t12000\n"
"ram\tSwapTotal\t2024\nram\tSwapFree\t1024\n"

View File

@@ -1,10 +1,12 @@
import json
from dataclasses import replace
import tempfile
from pathlib import Path
from types import SimpleNamespace
import unittest
from unittest.mock import patch
from arm.config import ConfigStore, Settings, Target, monitor_choices
from arm.config import ConfigStore, MachineDisplay, Settings, Target, monitor_choices
from arm.credentials import CredentialStore
from arm.graphs import Dashboard, composite_samples
from arm.model import (ALL, LOCAL, NETWORK, TOTAL, Availability, Connection, History, Status,
@@ -14,6 +16,69 @@ from arm.tray import HoverState, place_popup
from PySide6.QtCore import QRect, QSize
class MachineDisplayTests(unittest.TestCase):
def setUp(self):
self.cfg = Settings(hover_machine=ALL, tray_machine="c", targets=[
Target(identifier=identifier, name=identifier) for identifier in ("a", "b", "c", "d")
])
self.display = MachineDisplay.from_legacy(self.cfg)
def test_legacy_monitor_preferences(self):
self.assertEqual(self.display.visible(self.cfg), (LOCAL, "a", "b", "c", "d"))
self.assertTrue(self.display.select_new)
for setting in ({"hover_machine": "b"}, {"default_machine": "b", "hover_machine": ""}):
cfg = replace(self.cfg, **setting)
display = MachineDisplay.from_legacy(cfg)
self.assertEqual(display.visible(cfg), ("b",))
self.assertFalse(display.select_new)
self.assertEqual(self.display.with_selection(self.cfg, set()).visible(self.cfg), ())
def test_order_moves_in_both_directions_and_keeps_hidden_slots(self):
display = self.display.with_selection(self.cfg, {LOCAL, "b", "d"})
first = display.move(self.cfg, display.visible(self.cfg), "d", 0)
self.assertEqual(first.order, ("d", "a", LOCAL, "c", "b"))
self.assertEqual(first.visible(self.cfg), ("d", LOCAL, "b"))
up = first.move(self.cfg, first.visible(self.cfg), "b", 1)
self.assertEqual(up.order, ("d", "a", "b", "c", LOCAL))
last = up.move(self.cfg, up.visible(self.cfg), "d", 2)
self.assertEqual(last.order, ("b", "a", LOCAL, "c", "d"))
self.assertEqual(last.with_selection(self.cfg, set(last.order)).visible(self.cfg), last.order)
self.assertEqual(self.cfg.tray_machine, "c")
def test_profile_lifecycle_preserves_display_intent(self):
checked = self.display.with_selection(self.cfg, {"b", "d"})
changed = replace(self.cfg, targets=[
Target(identifier="b", name="Renamed", enabled=False), self.cfg.targets[3],
Target(identifier="new", name="New"),
])
self.assertEqual(checked.with_targets(changed).order, (LOCAL, "b", "d", "new"))
self.assertEqual(checked.with_targets(changed).selected, ("b", "d"))
self.assertEqual(checked.with_targets(changed).visible(changed), ("d",))
self.assertEqual(self.display.with_targets(changed).visible(changed), (LOCAL, "d", "new"))
enabled = replace(changed, targets=[replace(changed.targets[0], enabled=True), *changed.targets[1:]])
self.assertEqual(checked.with_targets(changed).with_targets(enabled).visible(enabled), ("b", "d"))
def test_atomic_commit_and_rollback_compatibility(self):
with tempfile.TemporaryDirectory(prefix="arm-display-test-") as temp:
store = ConfigStore(Path(temp) / "settings.json")
store.save(self.cfg)
order = ("d", "a", "b", LOCAL, "c")
saved = self.display.with_selection(self.cfg, {"b", "d"}, order)
store.save_display(saved)
initial = store.display_path.read_bytes()
fresh = ConfigStore(store.path)
self.assertEqual(fresh.load_display(fresh.load()), saved)
with patch("arm.config.replace_durable", side_effect=OSError("replacement failed")):
with self.assertRaisesRegex(OSError, "replacement failed"):
store.save_display(self.display)
self.assertEqual(store.display_path.read_bytes(), initial)
self.assertEqual(list(Path(temp).glob("*.tmp")), [])
# A rolled-back executable can rewrite its existing settings file.
store.save(replace(self.cfg, hover_machine=LOCAL, hover_range=300))
self.assertEqual(fresh.load_display(fresh.load()), saved)
self.assertEqual(fresh.load().hover_range, 300)
class ModelTests(unittest.TestCase):
def test_rate_baseline_reset_delayed_and_zero(self):
self.assertIsNone(rate(None, 33, 1, 1))

View File

@@ -35,6 +35,8 @@ class Providers(unittest.TestCase):
sleep(.85)
second = [p.sample() for p in providers]
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)
for sample in second:
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)
self.assertEqual(os_label, "Linux fixture")
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, "disk.read").value, 51200)
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)
reset, _ = parser.parse(FRAME.format(boot=2, busy=400), 12, 12)
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 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.config import Settings
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_worker import unpack_portable, wait_parent
from arm.version import VERSION, version_key
@@ -84,6 +84,20 @@ class UpdateTests(unittest.TestCase):
bad["packages"]["portable"][field] = value
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):
for version in (NEW, VERSION, OLD):
row, raw = self.row(self.metadata(version))

View File

@@ -257,6 +257,13 @@ def validate_packages(release, work, result, upgrade_from=None, captures=None, p
assert json.loads((payload / "BUILD.json").read_text())["version"] == VERSION
assert VERSION in (payload / "CHANGELOG.md").read_text(encoding="utf-8")
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"):
assert (payload / "Third-party notices" / name).read_bytes() == (
ROOT / "packaging" / "qt-notices" / name).read_bytes()
assert not list((payload / "_internal").rglob("*[Vv]irtual[Kk]eyboard*"))
for name in BUNDLED_ASSETS:
assert (payload / "_internal" / "branding" / name).read_bytes() == asset(name).read_bytes()
verify_executable(setup, VERSION)
@@ -362,8 +369,8 @@ def verify_branding(session, results, captures=None):
results["transparent_ico_frames"] = list(ICON_SIZES)
menu = session.menus[LOCAL]
assert menu.version.text() == VERSION and menu.local.isChecked()
assert not menu.remote.menuAction().isVisible()
assert menu.version.text() == VERSION and menu.machines.entries[LOCAL].isChecked()
assert tuple(menu.machines.entries) == (LOCAL,)
actions = {action.text(): action for action in menu.actions()}
assert "Check for Updates" in actions
actions[f"About {NAME}"].trigger()
@@ -373,6 +380,30 @@ def verify_branding(session, results, captures=None):
assert not session.expanded.monitor_visible
assert not session.about_page.app_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")
assert session.about_page.document_group.title() == "Third-party Notices"
assert "CPython" in session.about_page.browser.toPlainText()
@@ -419,15 +450,23 @@ def verify_branding(session, results, captures=None):
menu.hide()
actions["Resource History"].trigger()
assert session.expanded.monitor_visible and session.expanded.span == 3600
menu.all.trigger()
assert session.popup.selected_machine == ALL and menu.all.isChecked()
menu.local.trigger()
assert session.popup.selected_machine == LOCAL
menu.machines.master.click()
assert session.popup.displayed == () and not menu.machines.master.isChecked()
menu.machines.entries[LOCAL].click()
assert session.popup.displayed == (LOCAL,)
session.popup.hide()
session.expanded.close()
results["verified_about_and_tray_actions"] = True
def choose_display(session, machine):
from arm.model import ALL
display = session.dashboard.machine_display
checked = set(display.order) if machine == ALL else {machine}
session.save_display(display.with_selection(session.settings, checked), session.popup)
def verify_update_notices(session, wait_for, results, captures):
from PySide6.QtCore import QPoint
from unittest.mock import patch
@@ -471,11 +510,11 @@ def verify_update_notices(session, wait_for, results, captures):
assert hover.popup_size().height() > initial_size.height()
assert hover.update_banner.label.text() == available
capture(hover, "update-hover.png")
session.select_machine(ALL, LOCAL)
choose_display(session, ALL)
session.hover.pin(True, LOCAL)
assert hover.update_banner.isVisible() and hover.selected_machine == ALL
assert hover.update_banner.isVisible() and hover.displayed == tuple(session.dashboard.monitored())
session.hover.pin(False)
session.select_machine(LOCAL, LOCAL)
choose_display(session, LOCAL)
hover.hide()
session.open_expanded()
assert expanded.update_banner.isVisible() and expanded.monitor_visible
@@ -505,6 +544,21 @@ def verify_update_notices(session, wait_for, results, captures):
wait_for(lambda: update.job is None)
assert not menu.update.isVisible() and expanded.update_banner.isHidden()
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"
session.hover.pin(True, LOCAL)
expanded.showMinimized()
session.qt.processEvents()
hover.update_banner.action.click()
assert not expanded.isMinimized() and expanded.tabs.currentWidget() is session.about_page
assert session.about_page.document_group.title() == "Change Log"
assert hover.update_banner.isHidden() and expanded.update_banner.isHidden()
assert confirmation.read_bytes() == before
session.hover.pin(False)
hover.hide()
expanded.close()
finally:
fixture.doCleanups()
@@ -516,6 +570,7 @@ def verify_hover_version(session, remote, results, captures):
from arm.version import VERSION
original = session.settings
display = session.dashboard.machine_display
hover = session.popup
scale = round(hover.devicePixelRatioF() * 100)
modes = (
@@ -529,13 +584,15 @@ def verify_hover_version(session, remote, results, captures):
session.apply(replace(original, theme=theme))
for name, selection, anchor, pinned in modes:
session.hover.pin(False)
session.select_machine(selection, anchor)
choose_display(session, selection)
session.hover.show(anchor)
session.hover.pin(pinned, anchor)
session.qt.processEvents()
label = hover.version_label
rect = label.geometry()
assert hover.isVisible() and hover.pinned == pinned
assert hover.selected_machine == selection and session.hover.anchor == anchor
expected = tuple(session.dashboard.monitored()) if selection == ALL else (selection,)
assert hover.displayed == expected and session.hover.anchor == anchor
assert label.isVisible() and label.text() == VERSION
assert rect.bottom() < hover.machine.geometry().top()
assert rect.right() == hover.width() - hover.layout().contentsMargins().right() - 1
@@ -547,19 +604,188 @@ def verify_hover_version(session, remote, results, captures):
session.hover.pin(False)
hover.hide()
session.apply(original)
session.save_display(display, hover)
results["hover_version"] = {"version": VERSION, "scale_percent": scale,
"themes": ["Light", "Dark"], "views": [row[0] for row in modes]}
def verify_machine_display(session, wait_for, results, captures):
from PySide6.QtCore import QEvent, QPoint, QPointF, Qt
from PySide6.QtGui import QKeyEvent, QMouseEvent
from PySide6.QtTest import QTest
from arm.dialogs import ConnectionsDialog
from arm.model import ALL, LOCAL, TOTAL, Connection
from unittest.mock import patch
app, hover, expanded = session.qt, session.popup, session.expanded
local, rain, phantom, lamp, phantomnet = session.dashboard.machines()
tray = session.menus[session.scopes()[0]].machines
menu = hover.machine.checklist
history = session.collectors.history
workers = dict(session.collectors.workers)
left, released = Qt.MouseButton.LeftButton, Qt.MouseButton.NoButton
def capture(widget, filename):
app.processEvents()
if captures:
QTest.qWait(100)
capture_native_window(int(widget.winId()), captures / filename)
def pointer(widget, kind, point):
button = released if kind == QEvent.Type.MouseMove else left
buttons = released if kind == QEvent.Type.MouseButtonRelease else left
event = QMouseEvent(kind, QPointF(widget.mapFromGlobal(point)), QPointF(point), button, buttons,
Qt.KeyboardModifier.NoModifier)
app.sendEvent(widget, event)
app.processEvents()
def drag_to(drag, widget, start, end, cancel=False, scroll_to_end=False):
pointer(widget, QEvent.Type.MouseButtonPress, start)
pointer(widget, QEvent.Type.MouseMove, end)
assert drag.active and drag.line.isVisible()
if scroll_to_end:
bar = drag.scroll.verticalScrollBar()
wait_for(lambda: bar.value() == bar.maximum())
if cancel:
app.sendEvent(widget, QKeyEvent(QEvent.Type.KeyPress, Qt.Key.Key_Escape, Qt.KeyboardModifier.NoModifier))
pointer(widget, QEvent.Type.MouseButtonRelease, end)
assert not drag.active and not drag.line.isVisible()
def persisted():
return session.store.load_display(session.store.load())
choose_display(session, ALL)
session.hover.show(local)
menu.popup(hover.machine.mapToGlobal(hover.machine.rect().bottomLeft()))
app.processEvents()
assert menu.isVisible() and hover.interaction_active
assert menu.master.checkState() == Qt.CheckState.Checked
combos = (
("none", set(), "No Systems Selected"),
("rain", {rain}, "Rain"),
("rain-phantom", {rain, phantom}, "2 Systems Selected"),
("lamp-phantomnet", {lamp, phantomnet}, "2 Systems Selected"),
("local-rain-phantomnet", {local, rain, phantomnet}, "3 Systems Selected"),
("all", {local, rain, phantom, lamp, phantomnet}, "All Systems"),
)
for name, wanted, label in combos:
before = set(hover.displayed)
if name in ("none", "all"):
QTest.mouseClick(menu.master, left)
assert menu.isVisible() and hover.isVisible(), (name, menu.isVisible(), hover.isVisible())
else:
for machine in sorted(before ^ wanted):
QTest.mouseClick(menu.entries[machine], left)
assert menu.isVisible() and hover.isVisible(), (name, menu.isVisible(), hover.isVisible())
assert persisted().visible(session.settings) == hover.displayed == expanded.displayed
checked = Qt.CheckState.Unchecked if not wanted else (
Qt.CheckState.Checked if len(wanted) == 5 else Qt.CheckState.PartiallyChecked)
assert set(hover.displayed) == wanted and menu.master.checkState() == tray.master.checkState() == checked
assert hover.empty.isVisible() == (not wanted)
assert hover.single.isVisible() == (len(wanted) == 1)
assert hover.simultaneous.isVisible() == (len(wanted) > 1)
assert hover.machine.text() == label
assert hover.machine.width() >= hover.machine.fontMetrics().horizontalAdvance(label) + 24
if name == "rain":
observed = history.latest(phantom, TOTAL, "ram.util")
assert observed is not None
wait_for(lambda: history.latest(phantom, TOTAL, "ram.util").timestamp > observed.timestamp)
if name == "rain-phantom":
assert history.since(phantom, TOTAL, "ram.util", 0)[-2].timestamp <= observed.timestamp
assert any(value is not None for _, value in hover.sections[phantom].cards["ram"].plot.data[0][0][0])
capture(menu, "machine-checkbox-dropdown.png")
capture(hover, f"machine-selection-{name}.png")
app.sendEvent(menu, QKeyEvent(QEvent.Type.KeyPress, Qt.Key.Key_Escape, Qt.KeyboardModifier.NoModifier))
assert not menu.isVisible()
menu.popup(hover.machine.mapToGlobal(hover.machine.rect().bottomLeft()))
app.processEvents()
pointer(menu, QEvent.Type.MouseButtonPress, menu.mapToGlobal(QPoint(-25, -25)))
assert not menu.isVisible()
app.processEvents()
viewport = hover.simultaneous.viewport()
local_card = hover.sections[local].cards["ram"].plot
section_objects = dict(hover.sections)
viewport_origin = lambda: viewport.mapToGlobal(QPoint(viewport.width() // 2, 3))
point = lambda w: w.mapToGlobal(w.rect().center())
bottom = viewport.mapToGlobal(QPoint(viewport.width() // 2, viewport.height() - 3))
before = persisted()
drag_to(hover.drag, local_card, point(local_card), bottom, cancel=True)
assert persisted() == before
drag_to(hover.drag, local_card, point(local_card), bottom, scroll_to_end=True)
assert hover.displayed == (rain, phantom, lamp, phantomnet, local)
assert persisted().order == hover.displayed and hover.sections == section_objects
assert tuple(tray.entries) == hover.displayed
session.set_pin(True)
first_header = hover.sections[rain].title
last_header = hover.sections[local].title
drag_to(hover.drag, last_header, point(last_header), viewport_origin())
assert hover.displayed.index(local) < 4 and hover.pinned
hover.simultaneous.ensureWidgetVisible(first_header, 0, 0)
app.processEvents()
session.set_pin(False)
session.open_expanded()
view = expanded.simultaneous.viewport()
start = expanded.displayed[1]
top = view.mapToGlobal(QPoint(view.width() // 2, 3))
drag_to(expanded.drag, expanded.sections[start].title, point(expanded.sections[start].title), top)
assert expanded.displayed[0] == start and expanded.displayed == hover.displayed
capture(expanded, "machine-order-expanded.png")
manager = ConnectionsDialog(session)
manager.show()
app.processEvents()
try:
remote, first = manager.identifiers[-1], manager.identifiers[0]
rows = dict(manager.row_rects())
viewport = manager.table.viewport()
local_slot = hover.displayed.index(local)
drag_to(manager.drag, viewport, viewport.mapToGlobal(rows[remote].center()),
viewport.mapToGlobal(rows[first].topLeft() + QPoint(15, 1)))
assert manager.identifiers[0] == remote and hover.displayed.index(local) == local_slot
assert manager.identifiers == tuple(machine for machine in hover.displayed if machine != local)
capture(manager, "machine-order-remote-targets.png")
finally:
manager.close()
manager.deleteLater()
tray.entries[phantom].click()
assert phantom not in hover.displayed and phantom not in expanded.displayed
assert menu.entries[phantom].checkState() == Qt.CheckState.Unchecked
tray.entries[phantom].click()
assert persisted().visible(session.settings) == hover.displayed
assert session.collectors.history is history and session.collectors.workers == workers
assert all(session.dashboard.state(machine) == Connection.ONLINE for machine in hover.displayed)
before = persisted()
with patch.object(session.store, "save_display", side_effect=OSError("Fixture write failed")), \
patch("arm.application.QMessageBox.warning") as shown, patch("arm.application.LOG.exception"):
tray.entries[phantom].click()
shown.assert_called_once()
assert tray.entries[phantom].isChecked() and persisted() == before
expanded.close()
hover.hide()
session.hover.show(local)
assert hover.displayed == before.visible(session.settings)
hover.simultaneous.verticalScrollBar().setValue(0)
capture(hover, "machine-order-hover.png")
hover.hide()
results["machine_display"] = {
"checkbox_combinations": [name for name, _, _ in combos],
"shared_drag_interfaces": ["hover", "expanded", "Remote Targets"],
"final_order": [session.dashboard.name(machine) for machine in before.order],
"saved_before_close": True, "cancelled_drag_and_failed_write_retained_order": True,
"unchanged_collectors_and_hidden_history": True,
}
def evaluate_app(work, results, short=False, captures=None):
import psutil
from PySide6.QtCore import QEventLoop, QTimer
from PySide6.QtGui import QGuiApplication
from PySide6.QtWidgets import QApplication, QSystemTrayIcon
from PySide6.QtWidgets import QApplication, QDialogButtonBox, QSystemTrayIcon
from arm.application import Application
from arm.branding import set_windows_identity
from arm.config import STATIC_TRAY_MODE, ConfigStore, Settings, Target
from arm.dialogs import ConnectionsDialog, SettingsDialog
from arm.dialogs import ConnectionsDialog
from arm.model import ALL, LOCAL, NETWORK, TOTAL, Connection, RESOURCES
from arm.providers.ssh import update_host_key
from ssh_fixture import Fixture, SECRET
@@ -672,8 +898,13 @@ def evaluate_app(work, results, short=False, captures=None):
assert len(set(modes.values())) == 4, modes
results["rendered_modes"] = modes
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
session.activate_icon(LOCAL, QSystemTrayIcon.ActivationReason.Trigger)
assert session.popup.pinned
assert sum(card.isVisible() for card in session.popup.cards.values()) == len(RESOURCES)
wait_for(lambda: session.popup.frameGeometry().isValid())
if not short:
@@ -681,23 +912,46 @@ def evaluate_app(work, results, short=False, captures=None):
session.popup.pin.click()
assert not session.popup.pinned
session.popup.hide()
session.open_expanded(LOCAL)
session.open_expanded()
assert session.expanded.isVisible() and session.expanded.table.rowCount() > 20
assert session.expanded.device.count() > 10
assert app.primaryScreen().availableGeometry().contains(session.popup.frameGeometry())
if not short:
measure("expanded")
prefs = session.settings_page
assert [session.expanded.tabs.tabText(index) for index in range(session.expanded.tabs.count())] == [
"Resource Monitor", "Settings", "About",
]
session.expanded.tabs.setCurrentWidget(prefs)
assert prefs.isVisible() and prefs.tabs.count() == 7
minimized = session.settings.minimized
control = prefs.controls["minimized"].__self__
control.setChecked(not minimized)
session.expanded.tabs.setCurrentWidget(session.expanded.resource_page)
session.expanded.showMinimized()
next(action for action in menu.actions() if action.text() == "Settings").trigger()
assert session.expanded.tabs.currentWidget() is prefs and not session.expanded.isMinimized()
assert prefs.controls["minimized"]() == (not minimized)
buttons = prefs.findChild(QDialogButtonBox)
buttons.button(QDialogButtonBox.StandardButton.Cancel).click()
assert prefs.controls["minimized"]() == minimized
prefs.controls["minimized"].__self__.setChecked(not minimized)
previous_range = session.settings.hover_range
changed_range = 300 if previous_range != 300 else 60
session.remember_monitor(changed_range)
buttons.button(QDialogButtonBox.StandardButton.Save).click()
saved = session.store.load()
assert saved.minimized == (not minimized) and saved.hover_range == changed_range
assert session.expanded.tabs.currentWidget() is prefs
session.remember_monitor(previous_range)
results["shared_settings_tab"] = "Main window and tray entry, draft retention, Cancel, and Save"
session.expanded.close()
assert not session.expanded.isVisible() and session.icons[LOCAL].isVisible()
if not short:
prefs, connections = SettingsDialog(session), ConnectionsDialog(session)
prefs.show()
connections = ConnectionsDialog(session)
connections.show()
assert prefs.isVisible() and connections.isVisible()
assert prefs.tabs.count() == 7 and connections.table.rowCount() == 0
prefs.close()
assert connections.isVisible() and connections.table.rowCount() == 0
connections.close()
prefs.deleteLater()
connections.deleteLater()
with ExitStack() as stack:
servers = [stack.enter_context(Fixture()) for _ in range(2)]
@@ -714,11 +968,11 @@ def evaluate_app(work, results, short=False, captures=None):
raise AssertionError(f"SSH fixture {i}: {server.connections} TCP sessions, "
f"{len(server.commands)} commands, {server.samples} frames, "
f"{session.dashboard.state(target.identifier)}") from exc
assert "Connected" in menu.remote_entries[target.identifier].text()
menu.remote_entries[target.identifier].trigger()
assert session.popup.selected_machine == target.identifier
choose_display(session, target.identifier)
assert menu.machines.entries[target.identifier].isChecked()
assert session.popup.displayed == (target.identifier,)
assert session.scopes() == [LOCAL]
menu.local.trigger()
choose_display(session, LOCAL)
session.popup.hide()
if i == 1 and not short:
measure("one_loopback_ssh")
@@ -726,26 +980,27 @@ def evaluate_app(work, results, short=False, captures=None):
measure("two_loopback_ssh")
from arm.graphs import tray_icon
primary, other = (target.identifier for target in targets)
prefs = SettingsDialog(session)
session.open_settings()
tray_machine = prefs.controls["tray_machine"].__self__
assert [tray_machine.itemData(i) for i in range(tray_machine.count())] == [LOCAL, primary, other]
tray_machine.setCurrentIndex(tray_machine.findData(primary))
prefs.save()
prefs.deleteLater()
assert session.scopes() == [primary] and session.popup.selected_machine == LOCAL
session.expanded.close()
assert session.scopes() == [primary] and session.popup.displayed == (LOCAL,)
menu = session.menus[primary]
for select, expected in ((menu.all, ALL), (menu.remote_entries[other], other), (menu.local, LOCAL)):
select.trigger()
for choice in (ALL, other, LOCAL):
choose_display(session, choice)
expected = tuple(session.dashboard.monitored()) if choice == ALL else (choice,)
with patch("arm.application.tray_icon", wraps=tray_icon) as draw:
session.render()
assert [call.args[1] for call in draw.call_args_list] == [primary]
assert session.popup.selected_machine == session.expanded.selected_machine == expected
assert select.isChecked()
if expected == ALL:
assert session.popup.displayed == session.expanded.displayed == expected
assert all(menu.machines.entries[machine].isChecked() for machine in expected)
if choice == ALL:
for view in (session.popup, session.expanded):
assert set(view.sections) == {LOCAL, primary, other}
assert all(set(section.cards) == set(RESOURCES) for section in view.sections.values())
menu.all.trigger()
menu.machines.master.click()
history = session.collectors.history
wait_for(lambda: all(
(reading := history.latest(machine, TOTAL, direction)) and reading.valid and reading.value > 0
@@ -762,12 +1017,13 @@ def evaluate_app(work, results, short=False, captures=None):
session.popup.interval.setCurrentIndex(session.popup.interval.findData(300))
session.popup.hide()
menu.defaultAction().trigger()
assert session.expanded.selected_machine == ALL
assert session.expanded.displayed == tuple(session.dashboard.monitored())
session.expanded.close()
session.hover.show(primary)
assert session.popup.selected_machine == ALL and session.popup.span == 300
assert session.popup.displayed == tuple(session.dashboard.monitored()) and session.popup.span == 300
assert session.store.load_display(session.settings).select_new
saved = ConfigStore(root / "settings.json").load()
assert (saved.hover_machine, saved.hover_range, saved.tray_machine) == (ALL, 300, primary)
assert (saved.hover_range, saved.tray_machine) == (300, primary)
session.popup.hide()
session.apply(replace(session.settings, separate_tray_icons=True, persistent=True))
assert set(session.icons) == {LOCAL, *(target.identifier for target in targets)}
@@ -778,17 +1034,32 @@ def evaluate_app(work, results, short=False, captures=None):
assert draw.call_count == 3
results["independent_tray_and_monitor"] = "Local plus two SSH targets, six graphs each, three independent icon sources"
results["loopback_frame_counts"] = [server.samples for server in servers]
for target, name in zip(targets, ("Rain", "Phantom")):
session.save_target(replace(target, name=name), "", False)
for name in ("LAMP", "PhantomNet"):
server = stack.enter_context(Fixture())
target = Target(name=name, host="127.0.0.1", port=server.port, username="tester", interval=1)
update_host_key(session.hosts, f"[127.0.0.1]:{server.port}", server.key)
session.save_target(target, SECRET, False)
targets.append(target)
wait_for(lambda: all(session.dashboard.state(machine) == Connection.ONLINE and
session.collectors.history.latest(machine, TOTAL, "ram.util")
for machine in session.dashboard.monitored()), 15)
verify_machine_display(session, wait_for, results, captures)
for target in targets[2:]:
session.remove_target(next(t for t in session.settings.targets if t.identifier == target.identifier))
targets = targets[:2]
for target in targets:
session.collectors.disconnect(target.identifier)
assert all(session.dashboard.state(t.identifier) == Connection.OFFLINE for t in targets)
assert session.popup.selected_machine == ALL
assert session.popup.displayed == tuple(session.dashboard.monitored())
session.apply(replace(session.settings, separate_tray_icons=False, persistent=False))
if not short:
measure("disconnected_remotes")
assert set(session.icons) == {primary}
for target in list(session.settings.targets):
session.remove_target(target)
assert set(session.icons) == {LOCAL} and session.popup.selected_machine == ALL
assert set(session.icons) == {LOCAL} and session.popup.displayed == (LOCAL,)
exit_action = next(action for action in next(iter(session.menus.values())).actions()
if action.text().startswith("Exit Adaptive Resource Monitor"))
QTimer.singleShot(0, exit_action.trigger)
@@ -803,7 +1074,7 @@ def evaluate_app(work, results, short=False, captures=None):
restart_root = work / "restart"
store = ConfigStore(restart_root / "settings.json")
stored_targets = [replace(target, enabled=False, credential="test-reference") for target in saved.targets]
store.save(replace(saved, targets=stored_targets))
store.save(replace(saved, targets=stored_targets, hover_machine=ALL))
for legacy in (False, True):
if legacy:
source = json.loads(store.path.read_text(encoding="utf-8"))
@@ -821,7 +1092,8 @@ def evaluate_app(work, results, short=False, captures=None):
reopened = Application(app, restart_root)
try:
assert reopened.scopes() == [primary]
assert reopened.popup.selected_machine == reopened.expanded.selected_machine == ALL
assert reopened.popup.displayed == reopened.expanded.displayed == (LOCAL,)
assert reopened.dashboard.machine_display.selected == (LOCAL, primary, other)
assert reopened.popup.span == 300 and not reopened.popup.pinned
assert reopened.settings.targets == stored_targets
panel = reopened.about_page.updates
@@ -833,6 +1105,54 @@ def evaluate_app(work, results, short=False, captures=None):
app.processEvents()
results["restored_monitor_and_tray"] = "New and legacy settings restored All Systems at five minutes with a separate tray source"
results["startup_update_and_periodic_timer"] = True
verify_abrupt_display_restart(work, results)
def verify_abrupt_display_restart(work, results):
from arm.config import ConfigStore, Settings, Target
from arm.model import ALL
root = work / "abrupt-display"
ConfigStore(root / "settings.json").save(Settings(
hover_machine=ALL, targets=[Target(identifier="qa-remote", name="QA profile", os_type="Windows")]
))
argv = [sys.executable, str(Path(__file__).resolve()), "--desktop", results["desktop"], "--work", str(root)]
with subprocess.Popen([*argv, "--abrupt-display", "write"], creationflags=subprocess.CREATE_NO_WINDOW) as instance:
try:
deadline = monotonic() + 20
while not (root / "saved").is_file():
assert instance.poll() is None and monotonic() < deadline, "Isolated display test did not save"
sleep(.05)
finally:
instance.kill()
instance.wait(8)
assert instance.returncode != 0
result = subprocess.run([*argv, "--abrupt-display", "inspect"], timeout=30, creationflags=subprocess.CREATE_NO_WINDOW)
assert result.returncode == 0, f"Isolated restart failed with exit {result.returncode}"
results["forced_termination_restored_display"] = True
def abrupt_display_child(args):
from PySide6.QtWidgets import QApplication
from arm.application import Application
from arm.model import LOCAL
verify_desktop(args.desktop)
app = QApplication([])
assert app.platformName() == "windows"
session = Application(app, args.work)
if args.abrupt_display == "write":
session.reorder_machines(session.popup.displayed, LOCAL, 1, session.popup)
session.popup.machine.checklist.entries[LOCAL].click()
assert session.popup.displayed == ("qa-remote",)
(args.work / "saved").touch()
app.exec()
raise RuntimeError("The isolated process was expected to be terminated")
try:
assert session.dashboard.machines() == ("qa-remote", LOCAL)
assert session.popup.displayed == session.expanded.displayed == ("qa-remote",)
finally:
session.close()
def child(args):
@@ -893,7 +1213,11 @@ if __name__ == "__main__":
parser.add_argument("--upgrade-from", type=Path)
parser.add_argument("--captures", type=Path)
parser.add_argument("--short", action="store_true")
parser.add_argument("--abrupt-display", choices=("write", "inspect"))
args = parser.parse_args()
if args.abrupt_display:
abrupt_display_child(args)
raise SystemExit(0)
if args.desktop:
raise SystemExit(child(args))
raise SystemExit(parent(args))

View File

@@ -12,7 +12,7 @@ from types import SimpleNamespace
from unittest.mock import patch
from uuid import uuid4
from windows_gui import start_isolated, verify_desktop
from windows_gui import choose_display, start_isolated, verify_desktop
def evaluate(root, captures, restart, result):
@@ -50,9 +50,7 @@ def evaluate(root, captures, restart, result):
raise AssertionError(f"Readings not ready: {state}")
def choose(value):
index = session.popup.machine.findData(value)
assert index >= 0
session.popup.machine.setCurrentIndex(index)
choose_display(session, value)
def measure(name, seconds=12):
before, start = proc.cpu_times(), monotonic()
@@ -75,9 +73,9 @@ def evaluate(root, captures, restart, result):
machines = session.dashboard.monitored()
assert len(machines) == 4
if restart:
assert session.settings.hover_machine == ALL and session.settings.hover_range == 300
assert session.dashboard.machine_display.select_new and session.settings.hover_range == 300
session.hover.show(primary)
assert session.popup.selected_machine == ALL and session.popup.span == 300
assert session.popup.displayed == tuple(machines) and session.popup.span == 300
assert not session.popup.pinned
wait(30, lambda: all(session.dashboard.state(m) == Connection.ONLINE for m in machines))
history = session.collectors.history
@@ -110,8 +108,8 @@ def evaluate(root, captures, restart, result):
menu = session.menus[primary]
icon_count = len(session.icons)
menu.all.trigger()
assert menu.all.isChecked() and len(session.icons) == icon_count
menu.machines.master.click()
assert menu.machines.master.isChecked() and len(session.icons) == icon_count
with patch("arm.application.tray_icon", wraps=tray_icon) as draw:
session.render()
assert {call.args[1] for call in draw.call_args_list} == set(session.icons)
@@ -137,7 +135,7 @@ def evaluate(root, captures, restart, result):
session.popup.hide()
session.open_expanded()
assert session.expanded.selected_machine == ALL and set(session.expanded.sections) == set(machines)
assert session.expanded.displayed == tuple(machines) and set(session.expanded.sections) == set(machines)
capture(session.expanded, "04-all-systems-expanded")
assert session.expanded.simultaneous.horizontalScrollBar().maximum() == 0
assert session.expanded.simultaneous.verticalScrollBar().maximum() == 0
@@ -149,7 +147,7 @@ def evaluate(root, captures, restart, result):
measure("All Systems expanded, four connected machines")
session.expanded.showMinimized()
session.expanded.showNormal()
assert session.expanded.selected_machine == ALL
assert session.expanded.displayed == tuple(machines)
session.expanded.close()
session.hover.show(primary)
@@ -181,11 +179,11 @@ def evaluate(root, captures, restart, result):
chosen = machines[1]
choose(chosen)
session.collectors.disconnect(chosen)
assert session.popup.selected_machine == chosen and "Disconnected" in session.popup.header.text()
assert ConfigStore(root / "settings.json").load().hover_machine == chosen
assert session.popup.displayed == (chosen,) and "Disconnected" in session.popup.header.text()
assert session.store.load_display(session.settings).selected == (chosen,)
session.collectors.reconnect(chosen)
wait(25, lambda: session.dashboard.state(chosen) == Connection.ONLINE)
assert session.popup.selected_machine == chosen
assert session.popup.displayed == (chosen,)
choose(ALL)
session.popup.interval.setCurrentIndex(session.popup.interval.findData(300))
session.set_pin(True)
@@ -201,10 +199,10 @@ def evaluate(root, captures, restart, result):
session.hover.tick()
assert session.popup.isHidden()
session.hover.show(primary)
assert session.popup.selected_machine == ALL and session.popup.span == 300
assert session.expanded.selected_machine == ALL
assert session.popup.displayed == tuple(machines) and session.popup.span == 300
assert session.expanded.displayed == tuple(machines)
saved = ConfigStore(root / "settings.json").load()
assert saved.hover_machine == ALL and saved.hover_range == 300
assert session.store.load_display(saved).select_new and saved.hover_range == 300
result["retained_dismissal_pin_disconnect"] = True
finally:
session.close()

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."""
import argparse
from datetime import datetime, timezone
from hashlib import file_digest
from importlib import metadata
from itertools import takewhile
import json
import os
from pathlib import Path
@@ -18,6 +26,7 @@ from zipfile import ZIP_DEFLATED, ZipFile
ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(ROOT))
from arm.version import NAME, VERSION, version_key
from arm.update_release import LICENSE_FILE
from arm.branding import (
APPLICATION_ICON, APPLICATION_IMAGE, APPLICATION_LOGO, APP_MODEL_ID, BUNDLED_ASSETS,
COPYRIGHT, DESCRIPTION, INSTALL_ID, PUBLISHER, SUPPORT_URL, WEBSITE,
@@ -53,6 +62,10 @@ def run(args):
def copy_notices(payload):
notices = payload / "Third-party notices"
notices.mkdir()
for name in ("LGPL-3.0-only.txt", "GPL-3.0-only.txt"):
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",
"paramiko", "cryptography", "cffi", "bcrypt", "PyNaCl", "PyInstaller",
"setuptools", "nvidia-ml-py", "invoke", "pycparser"):
@@ -65,6 +78,11 @@ def copy_notices(payload):
token in entry.name.lower() for token in ("license", "copying", "notice"))]
for index, entry in enumerate(files):
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"
if python_license.is_file():
shutil.copyfile(python_license, notices / "Python-LICENSE.txt")
@@ -145,13 +163,20 @@ def build(compiler, output):
str(ROOT / "monitor.pyw"),
])
payload = temporary / "dist" / "AdaptiveResourceMonitor"
# PyInstaller discovers optional Qt plugins that ARM never loads.
# Qt Virtual Keyboard is GPLv3 or commercial, outside the LGPL Qt runtime.
qt = payload / "_internal" / "PySide6"
for file in ("Qt6VirtualKeyboard.dll", "plugins/platforminputcontexts/qtvirtualkeyboardplugin.dll"):
(qt / file).unlink(missing_ok=True)
shutil.copyfile(temporary / "maintenance" / f"{worker_name}.exe", payload / f"{worker_name}.exe")
(payload / "VERSION.txt").write_text(VERSION + "\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"):
shutil.copyfile(ROOT / name, payload / name)
if (ROOT / "LICENSE.md").is_file():
shutil.copyfile(ROOT / "LICENSE.md", payload / "LICENSE.md")
shutil.copyfile(ROOT / LICENSE_FILE, payload / LICENSE_FILE)
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)
setup_id = INSTALL_ID.replace("{", "{{", 1)
run([
@@ -161,7 +186,7 @@ def build(compiler, output):
f"-DSetupId={setup_id}", f"-DArmPublisher={PUBLISHER}", f"-DArmCopyright={COPYRIGHT}",
f"-DAppWebsite={WEBSITE}", f"-DAppSupport={SUPPORT_URL}", f"-DAppModelId={APP_MODEL_ID}",
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"),
])
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."""
import argparse
from base64 import b64decode, b64encode
from hashlib import file_digest
from hashlib import file_digest, sha256 as hash_bytes
import json
import os
from pathlib import Path
@@ -22,8 +29,8 @@ sys.path.insert(0, str(ROOT))
from arm.branding import APP_MODEL_ID
from arm.update_client import ReleaseClient
from arm.update_release import (
ARCHITECTURE, KINDS, MANIFEST, UpdateError, artifact_name, canonical, sha256, source_config,
verify_file, verify_manifest,
ARCHITECTURE, KINDS, LICENSE_FILE, LICENSE_NOTE, MANIFEST, UpdateError, artifact_name, canonical, sha256,
software_license_digest, source_config, verify_file, verify_manifest,
)
from arm.update_worker import unpack_portable, verify_executable
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)
if not section or not section[1].strip():
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):
@@ -96,6 +107,9 @@ def verify(folder, version, commit, number):
raise UpdateError("Portable package is inconsistent with the selected Jenkins build")
if json.loads((payload / "_internal" / "update-source.json").read_bytes()) != source:
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}")
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

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."""
from hashlib import file_digest
from pathlib import Path