rename $Global:Tasks -> $Global:SamyTasks
This commit is contained in:
@@ -573,7 +573,7 @@ $ConfirmPreference = 'None'
|
|||||||
# HandlerFn → the PowerShell function to invoke
|
# HandlerFn → the PowerShell function to invoke
|
||||||
# Page → which tab/page it appears on
|
# Page → which tab/page it appears on
|
||||||
|
|
||||||
$Global:Tasks = @(
|
$Global:SamyTasks = @(
|
||||||
# On-Boarding, left column
|
# On-Boarding, left column
|
||||||
@{ Id='setSVSPowerplan'; Name='setSVSPowerplan'; Label='Set SVS Powerplan'; HandlerFn='Handle-setSVSPowerPlan'; Page='onboard'; Column='left' },
|
@{ 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' },
|
@{ 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=$(
|
Write-LogHybrid "Tasks by page: onboard=$(
|
||||||
($Global:Tasks | Where-Object Page -eq 'onboard').Count
|
($Global:SamyTasks | Where-Object Page -eq 'onboard').Count
|
||||||
) offboard=$(
|
) offboard=$(
|
||||||
($Global:Tasks | Where-Object Page -eq 'offboard').Count
|
($Global:SamyTasks | Where-Object Page -eq 'offboard').Count
|
||||||
) tweaks=$(
|
) tweaks=$(
|
||||||
($Global:Tasks | Where-Object Page -eq 'tweaks').Count
|
($Global:SamyTasks | Where-Object Page -eq 'tweaks').Count
|
||||||
) apps=$(
|
) apps=$(
|
||||||
($Global:Tasks | Where-Object Page -eq 'SVSApps').Count
|
($Global:SamyTasks | Where-Object Page -eq 'SVSApps').Count
|
||||||
)" Info UI -LogToEvent
|
)" Info UI -LogToEvent
|
||||||
|
|
||||||
#endregion building the Menus
|
#endregion building the Menus
|
||||||
@@ -630,7 +630,7 @@ Write-LogHybrid "Tasks by page: onboard=$(
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Start with all tasks on the given page
|
# 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)
|
# Only filter by Column when it actually matters (onboard left/right)
|
||||||
if (-not [string]::IsNullOrEmpty($Column)) {
|
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:
|
# On-boarding now has two columns:
|
||||||
@@ -1527,7 +1527,7 @@ $script
|
|||||||
|
|
||||||
# Tasks JS array (fixed)
|
# Tasks JS array (fixed)
|
||||||
$tasksJsAll = (
|
$tasksJsAll = (
|
||||||
$Global:Tasks | ForEach-Object {
|
$Global:SamyTasks | ForEach-Object {
|
||||||
" { id: '$($_.Id)', handler: '/$($_.Name)', label: '$($_.Label)' }"
|
" { id: '$($_.Id)', handler: '/$($_.Name)', label: '$($_.Label)' }"
|
||||||
}
|
}
|
||||||
) -join ",`n"
|
) -join ",`n"
|
||||||
@@ -2098,7 +2098,7 @@ function Install-DattoRMM {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# ---- Task invocation ----
|
# ---- Task invocation ----
|
||||||
$task = $Global:Tasks | Where-Object Name -EQ $path
|
$task = $Global:SamyTasks | Where-Object Name -EQ $path
|
||||||
if ($task) {
|
if ($task) {
|
||||||
& $task.HandlerFn $Context
|
& $task.HandlerFn $Context
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user