rename $Global:Tasks -> $Global:SamyTasks

This commit is contained in:
2025-11-24 16:25:17 -05:00
parent 84f35327d3
commit b285047df8

View File

@@ -573,7 +573,7 @@ $ConfirmPreference = 'None'
# HandlerFn → the PowerShell function to invoke
# Page → which tab/page it appears on
$Global:Tasks = @(
$Global:SamyTasks = @(
# On-Boarding, left column
@{ Id='setSVSPowerplan'; Name='setSVSPowerplan'; Label='Set SVS Powerplan'; HandlerFn='Handle-setSVSPowerPlan'; Page='onboard'; Column='left' },
@{ Id='installSVSMSPModule'; Name='installSVSMSPModule'; Label='Install SVSMSP Module'; HandlerFn='Handle-InstallSVSMSP'; Page='onboard'; Column='left' },
@@ -611,13 +611,13 @@ $ConfirmPreference = 'None'
)
Write-LogHybrid "Tasks by page: onboard=$(
($Global:Tasks | Where-Object Page -eq 'onboard').Count
($Global:SamyTasks | Where-Object Page -eq 'onboard').Count
) offboard=$(
($Global:Tasks | Where-Object Page -eq 'offboard').Count
($Global:SamyTasks | Where-Object Page -eq 'offboard').Count
) tweaks=$(
($Global:Tasks | Where-Object Page -eq 'tweaks').Count
($Global:SamyTasks | Where-Object Page -eq 'tweaks').Count
) apps=$(
($Global:Tasks | Where-Object Page -eq 'SVSApps').Count
($Global:SamyTasks | Where-Object Page -eq 'SVSApps').Count
)" Info UI -LogToEvent
#endregion building the Menus
@@ -630,7 +630,7 @@ Write-LogHybrid "Tasks by page: onboard=$(
)
# Start with all tasks on the given page
$tasks = $Global:Tasks | Where-Object Page -EQ $Page
$tasks = $Global:SamyTasks | Where-Object Page -EQ $Page
# Only filter by Column when it actually matters (onboard left/right)
if (-not [string]::IsNullOrEmpty($Column)) {
@@ -1513,7 +1513,7 @@ $script
"@
#
# 4) Build the checkbox HTML and tasks JS from $Global:Tasks
# 4) Build the checkbox HTML and tasks JS from $Global:SamyTasks
#
# On-boarding now has two columns:
@@ -1527,7 +1527,7 @@ $script
# Tasks JS array (fixed)
$tasksJsAll = (
$Global:Tasks | ForEach-Object {
$Global:SamyTasks | ForEach-Object {
" { id: '$($_.Id)', handler: '/$($_.Name)', label: '$($_.Label)' }"
}
) -join ",`n"
@@ -2098,7 +2098,7 @@ function Install-DattoRMM {
}
# ---- Task invocation ----
$task = $Global:Tasks | Where-Object Name -EQ $path
$task = $Global:SamyTasks | Where-Object Name -EQ $path
if ($task) {
& $task.HandlerFn $Context
return