Skip to content

RivetMSP 26.10.22

Choose a tag to compare

@TheTractorHacker TheTractorHacker released this 14 Oct 16:04
· 3 commits to master since this release

[26.10.22] RivetMSP — the Run script dialog offers the script library, and one Scripts area

The bug. On an asset page the top Run script button opened a dialog whose "What to run" list held only "PowerShell text" (and "A saved script" when the older table had rows). The RivetCore script library (the Starter pack and your own scripts) was not in it, and Linux devices had no Run script button at all.

Deploy notes: back up the database, pull this tag. No database change (DB stays 2.6.93), no new cron line, no setting. The older addresses keep working.

  • One dialog, every source. "What to run" is now: Script library (N) (when the Scripts switch is on, you may run saved scripts and the library has scripts for the device's platform), A saved script (the older list, Windows, only when it has rows), Synced from (N) (older scripts that can run through the vendor RMM the asset is linked to, only with the older scripts grant) and PowerShell (type or paste) on Windows or Shell (type or paste) on Linux, only where Core supports that free-form job for your role. A single choice is shown as text, not as a one-option dropdown. Linux devices get the button.
  • Script library source. A search box (name, tag, description), the scripts grouped by risk class (Read only, Changes the system, Disruptive, Not classified), the chosen script's description, tags and risk badge, and its parameter form built from the script's schema (typed inputs, ranges and length hints, required fields, secrets as password fields, choices). Dry run (nothing is changed) is a tick box that starts ticked for a script that changes things (and follows the script's own default for a read-only one); unticking it really sends false. A script that needs approval says so and the button reads Request approval; a destructive script needs its confirmation box. It submits through the same handler as the Run a library script card of the Jobs tab (CSRF, client scoping, Core's checks), and the answer is a message with a link to the Jobs tab (or to Approvals). Empty states explain and link the Starter pack (administrators) or Scripts.
  • One Scripts area. The Endpoints menu had both Script library and Scripts. There is now ONE Scripts entry and one page with tabs: Library (the RivetCore library, the default) and Synced from (the older list, labelled with the vendor RMM's real name; shown when older rows exist or a vendor RMM that provides scripts is on). rmm_script_library.php redirects to the Library tab with its query string, rmm_scripts.php?category= opens the synced tab, rmm_script_run.php is unchanged. The older list is responsive now.
  • Import into the library. A one-time, idempotent action for the hand-made older scripts (no vendor script id): creates library scripts through Core's API as you (platform from the stored type, the old category as a tag, the risk class you pick, default Changes the system, approval only for Disruptive, note "imported from legacy Scripts"), skips what is already there with the same name and text, copies a name clash to " (legacy)", reports CMD and empty scripts as skipped, audits it, and leaves the older rows alone ("Imported" mark). Needs write access to scripts; Core checks you again for each script.
  • Wording. "Scripts" in the menu, titles and help text.

Tests: new tests/rmm_ui_p23_d_scripts_hub.php (dialog sources by platform and role, grouping, forms, dry-run default, approvals, destructive confirmation, client scoping, switch and module off at zero queries, synced scripts, one menu entry, tabs, older addresses, import and its idempotence) and tests/browser/rmm_run_dialog_smoke.mjs (desktop and 390 px, light and dark, keyboard); the existing RMM suites and smokes are updated for the single menu entry.