Add files via upload
This commit is contained in:
12 files changed
+4682
No files matched your search
@@ -0,0 +1,76 @@
|
||||
# PTW Auto-Disconnect
|
||||
|
||||
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
|
||||
|
||||
## Requirements
|
||||
|
||||
- **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 from source
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
Or double-click **Start PTW Auto-Disconnect.vbs** (no terminal window).
|
||||
|
||||
## Build executables
|
||||
|
||||
```bash
|
||||
npm run dist
|
||||
```
|
||||
|
||||
Output in **`dist`**:
|
||||
|
||||
| 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 the exe from the extracted folder.
|
||||
|
||||
## Running on a new PC
|
||||
|
||||
- **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