Fix ScriptTask UI button actions and scheduled job handling for current MeshCentral versions#69
Open
fud18 wants to merge 9 commits into
Open
Fix ScriptTask UI button actions and scheduled job handling for current MeshCentral versions#69fud18 wants to merge 9 commits into
fud18 wants to merge 9 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix ScriptTask UI compatibility and editor functionality for current MeshCentral versions
Summary
This pull request fixes several compatibility issues in the ScriptTask plugin that prevent normal operation on current versions of MeshCentral.
While testing the plugin against the latest MeshCentral release, several UI actions, scheduled task functions, and the script editor were either non-functional or generated server-side errors. This PR restores those features while preserving the plugin’s original workflow and behavior.
⸻
User Interface
Toolbar Improvements
⸻
Script Editor
Save Functionality
Fixed an issue where editing a script did not properly save changes on current MeshCentral versions.
Changes include:
⸻
Scheduled Jobs
Scheduling
Schedule Deletion
⸻
Backend Improvements
Added validation before processing script content to prevent orphaned or invalid scheduled jobs from causing server exceptions.
This prevents errors similar to:
TypeError: Cannot read properties of undefined (reading 'content')
and previously:
TypeError: Cannot read properties of undefined (reading 'match')
when scheduled jobs reference missing or deleted scripts.
Instead of crashing, invalid scheduled jobs are now skipped safely.
⸻
Compatibility
These changes improve compatibility with current MeshCentral releases while maintaining backward compatibility with the existing plugin design.
No changes were made to the overall plugin workflow or user experience beyond restoring broken functionality.
⸻
Testing Performed
The following functionality has been tested successfully:
Script Management
Execution
History
General
⸻
Goal
The goal of this pull request is to restore compatibility with current MeshCentral releases while preserving the original functionality and user workflow of the ScriptTask plugin.
This pull request intentionally focuses on bug fixes and compatibility improvements without introducing new features or altering the existing design.
Future enhancements—such as additional UI modernization, dark mode improvements, and code cleanup—can be submitted separately to keep this pull request focused and easy to review.