Update disconnect keywords and rebuild distributables.
Add 19 and 9 to auto-disconnect targets and regenerate packaged outputs so the built app reflects the new disconnect criteria. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
048ab8b980
commit
6274341ef5
11 files changed
+141
-24
No files matched your search
+54
-14
@@ -1,38 +1,78 @@
|
||||
# PTW Auto-Disconnect (Standalone GUI)
|
||||
# PTW Auto-Disconnect
|
||||
|
||||
Runs your PTW monitor in a small desktop window **without opening Chrome**. It stays connected to `http://localhost:1947/_int_/sessions.html`, scans for the same keywords, and clicks Disconnect on matching rows. Logs and Monitor ON/OFF state are kept in the GUI.
|
||||
Standalone desktop app that monitors your PTW sessions page and automatically disconnects sessions matching certain product/feature keywords. Runs in a small window **without opening Chrome**.
|
||||
|
||||
## Features
|
||||
|
||||
- **Auto-disconnect** — When Monitor is ON, scans the sessions table and clicks Disconnect on rows containing any of the target keywords.
|
||||
- **Logged in** — Left panel shows who is logged in, grouped by user, with product/feature per session.
|
||||
- **Activity log** — Right panel shows timestamps and disconnect/refresh events.
|
||||
- **Config on startup** — On launch, checks `http://localhost:1947/_int_/config.html` and ensures **Table Rows per Page** is set to **100** (and submits if changed).
|
||||
- **Stay awake** — While the app is running, prevents Windows from sleeping and the display from turning off.
|
||||
- **One-click run** — Double-click **Start PTW Auto-Disconnect.vbs** (or the built exe) to run without opening a terminal.
|
||||
|
||||
## Target keywords (disconnect when present)
|
||||
|
||||
- PTW_DATAEXCHANGE
|
||||
- PTW_ARC_FLASH
|
||||
- PTW_DEVEVAL
|
||||
- PTW_AFAULT
|
||||
- PTW_DAPPER
|
||||
- PTW_COOREVAL
|
||||
- PTW_CAPTOR
|
||||
- PTW_IEC_FAULT
|
||||
- PTW_IEC61363
|
||||
- 19
|
||||
- 9
|
||||
|
||||
## Requirements
|
||||
|
||||
- Node.js (LTS recommended)
|
||||
- The sessions page must be available at `http://localhost:1947/_int_/sessions.html` (start your server first)
|
||||
- **To run from source:** Node.js (LTS) and `npm install`.
|
||||
- **Sessions server:** The app expects the sessions page at `http://localhost:1947/_int_/sessions.html` (and config at `http://localhost:1947/_int_/config.html`). Start your server first.
|
||||
|
||||
## Run
|
||||
## Run from source
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
## Build an executable (optional)
|
||||
Or double-click **Start PTW Auto-Disconnect.vbs** (no terminal window).
|
||||
|
||||
## Build executables
|
||||
|
||||
```bash
|
||||
npm run dist
|
||||
```
|
||||
|
||||
- **`dist\PTW Auto-Disconnect Setup 2.1.0.exe`** — Installer (Start Menu, etc.).
|
||||
- **`dist\win-unpacked\`** — No-install: run **PTW Auto-Disconnect.exe** from this folder (all DLLs stay next to the exe; avoids ffmpeg.dll errors).
|
||||
Output in **`dist`**:
|
||||
|
||||
To build and also create a single zip for the no-install version:
|
||||
| Output | Description |
|
||||
|--------|-------------|
|
||||
| **PTW Auto-Disconnect Setup 2.1.0.exe** | Windows installer |
|
||||
| **PTW Auto-Disconnect 2.1.0.exe** | Portable single exe (no install) |
|
||||
| **win-unpacked/** | No-install folder; run **PTW Auto-Disconnect.exe** from inside (avoids ffmpeg path issues on some systems) |
|
||||
|
||||
Optional: build and create a zip of the no-install folder:
|
||||
|
||||
```bash
|
||||
npm run dist:portable
|
||||
```
|
||||
|
||||
Then use **`dist\PTW Auto-Disconnect-no-install.zip`**: unzip anywhere and run **PTW Auto-Disconnect.exe** from the extracted folder.
|
||||
Then use **`dist\PTW Auto-Disconnect-no-install.zip`** — unzip anywhere and run the exe from the extracted folder.
|
||||
|
||||
## Behavior
|
||||
## Running on a new PC
|
||||
|
||||
- **Monitor ON/OFF** — Same as your script; when ON, the page is monitored and reloaded every 60 seconds.
|
||||
- **Clear** — Clears the log display (state is still persisted until you clear).
|
||||
- The page is loaded in a hidden webview inside the app; only the compact log + buttons window is visible.
|
||||
- **From source:** Install Node.js, copy the project, run `npm install`, then `npm start` or the VBS launcher.
|
||||
- **Built exe/installer:** Copy the installer or the **win-unpacked** folder (or the portable exe). No Node.js required.
|
||||
|
||||
## Behavior summary
|
||||
|
||||
- **Monitor ON/OFF** — Toggle monitoring; when ON, the sessions page is reloaded every 60 seconds and matching rows are disconnected.
|
||||
- **Clear** — Clears the activity log display (persisted logs are cleared).
|
||||
- **Config check** — On startup the app loads the config page, sets rows per page to 100 if needed, submits, then opens the sessions page. The activity log shows: *Config: rows per page already 100* or *Config: rows per page set to 100* (or a message if the input was not found).
|
||||
- The sessions page is loaded in a hidden webview; only the compact GUI (panels + buttons) is visible.
|
||||
|
||||
## License
|
||||
|
||||
See [LICENSE](LICENSE).
|
||||
Reference in new issue
Block a user