Update SVSTaskGate.ps1
This commit is contained in:
100
SVSTaskGate.ps1
100
SVSTaskGate.ps1
@@ -8,8 +8,7 @@
|
|||||||
|
|
||||||
### Missing the /installSVSMSPModule in the powershell section
|
### Missing the /installSVSMSPModule in the powershell section
|
||||||
|
|
||||||
### add tweek to set default provider, add to toolkit?
|
### add tweak to set default provider, add to toolkit?
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
# 1) CREATE A GLOBAL LOG CACHE (NEW)
|
# 1) CREATE A GLOBAL LOG CACHE (NEW)
|
||||||
@@ -498,7 +497,7 @@ function GetHtmlContent {
|
|||||||
<div class="sidebar">
|
<div class="sidebar">
|
||||||
<button class="tab-button active" data-tab="onboardTab" aria-expanded="true">On-Boarding</button>
|
<button class="tab-button active" data-tab="onboardTab" aria-expanded="true">On-Boarding</button>
|
||||||
<button class="tab-button" data-tab="offboardTab" aria-expanded="false">Off-Boarding</button>
|
<button class="tab-button" data-tab="offboardTab" aria-expanded="false">Off-Boarding</button>
|
||||||
<button class="tab-button" data-tab="TweeksTab" aria-expanded="false">Tweeks</button>
|
<button class="tab-button" data-tab="tweaksTab" aria-expanded="false">Tweaks</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<!-- On-Boarding Tab -->
|
<!-- On-Boarding Tab -->
|
||||||
@@ -578,12 +577,59 @@ function GetHtmlContent {
|
|||||||
<button class="install-button" id="fetchSitesButton" onclick="fetchSites()" disabled>Fetch
|
<button class="install-button" id="fetchSitesButton" onclick="fetchSites()" disabled>Fetch
|
||||||
Sites</button>
|
Sites</button>
|
||||||
<button class="install-button" onclick="triggerInstall()">Install</button>
|
<button class="install-button" onclick="triggerInstall()">Install</button>
|
||||||
<button class="exit-button" onclick="endSession()">Exit</button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="log" id="logArea">
|
<div class="log" id="logArea">
|
||||||
<p>Logs will appear here...</p>
|
<p>Logs will appear here...</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Off-Boarding Tab -->
|
||||||
|
<div id="offboardTab" class="tab-content inactive">
|
||||||
|
<h2>Off-Boarding</h2>
|
||||||
|
<div class="checkbox-group">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" id="selectAllOffboardCheckbox" onclick="toggleOffboardCheckboxes(this)">
|
||||||
|
Select All
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="uninstallSVSMSPModule" id="uninstallSVSMSPModuleCheckbox">
|
||||||
|
Uninstall SVSMSP Module
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="uninstallThreatLocker" id="uninstallThreatLockerCheckbox">
|
||||||
|
Uninstall ThreatLocker
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- tweaks Tab -->
|
||||||
|
<div id="tweaksTab" class="tab-content inactive">
|
||||||
|
<h2>Tweaks</h2>
|
||||||
|
<div class="checkbox-group">
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" id="selectAllTweaksCheckbox" onclick="toggleTweaksCheckboxes(this)">
|
||||||
|
Select All
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="enableDarkMode" id="enableDarkModeCheckbox">
|
||||||
|
Enable Dark Mode
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="disableAnimations" id="disableAnimationsCheckbox">
|
||||||
|
Disable Animations
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="optimizePerformance" id="optimizePerformanceCheckbox">
|
||||||
|
Optimize Performance
|
||||||
|
</label>
|
||||||
|
<label>
|
||||||
|
<input type="checkbox" name="increaseFontSize" id="increaseFontSizeCheckbox">
|
||||||
|
Increase Font Size
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Shared Exit Button -->
|
||||||
|
<div class="button-group">
|
||||||
|
<button class="exit-button" onclick="endSession()">Exit</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -612,6 +658,46 @@ function GetHtmlContent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggleOffboardCheckboxes(selectAllCheckbox) {
|
||||||
|
// Get all checkboxes inside the offboardTab container
|
||||||
|
const checkboxes = document
|
||||||
|
.getElementById('offboardTab')
|
||||||
|
.querySelectorAll('input[type="checkbox"]:not(#selectAllOffboardCheckbox)');
|
||||||
|
|
||||||
|
// Set the checked state of all checkboxes to match the "Select All" checkbox
|
||||||
|
checkboxes.forEach(checkbox => {
|
||||||
|
checkbox.checked = selectAllCheckbox.checked;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleTweaksCheckboxes(selectAllCheckbox) {
|
||||||
|
// Get all checkboxes inside the tweaksTab container
|
||||||
|
const checkboxes = document
|
||||||
|
.getElementById('tweaksTab')
|
||||||
|
.querySelectorAll('input[type="checkbox"]:not(#selectAllTweaksCheckbox)');
|
||||||
|
|
||||||
|
// Set the checked state of all checkboxes to match the "Select All" checkbox
|
||||||
|
checkboxes.forEach(checkbox => {
|
||||||
|
checkbox.checked = selectAllCheckbox.checked;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateSelectAllTweaks() {
|
||||||
|
const selectAllCheckbox = document.getElementById('selectAllTweaksCheckbox');
|
||||||
|
const checkboxes = document
|
||||||
|
.getElementById('tweaksTab')
|
||||||
|
.querySelectorAll('input[type="checkbox"]:not(#selectAllTweaksCheckbox)');
|
||||||
|
|
||||||
|
// If any checkbox is unchecked, uncheck "Select All"
|
||||||
|
selectAllCheckbox.checked = Array.from(checkboxes).every(checkbox => checkbox.checked);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Attach the updateSelectAllTweaks function to all individual checkboxes
|
||||||
|
document.querySelectorAll('#tweaksTab input[type="checkbox"]:not(#selectAllTweaksCheckbox)').forEach(checkbox => {
|
||||||
|
checkbox.addEventListener('change', updateSelectAllTweaks);
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
function toggleDattoRMMOptions() {
|
function toggleDattoRMMOptions() {
|
||||||
const checkbox = document.getElementById('installDattoRMMCheckbox');
|
const checkbox = document.getElementById('installDattoRMMCheckbox');
|
||||||
const optionsContainer = document.getElementById('dattoRMMOptionsContainer');
|
const optionsContainer = document.getElementById('dattoRMMOptionsContainer');
|
||||||
@@ -779,6 +865,12 @@ function GetHtmlContent {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Intercept window close or refresh
|
||||||
|
window.addEventListener('beforeunload', (event) => {
|
||||||
|
endSession(); // Clean up on window close
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
function appendLog(message, color = "white") {
|
function appendLog(message, color = "white") {
|
||||||
const log = document.createElement('p');
|
const log = document.createElement('p');
|
||||||
log.style.color = color;
|
log.style.color = color;
|
||||||
|
|||||||
Reference in New Issue
Block a user