Update SVSTaskGate.ps1

This commit is contained in:
2025-01-05 20:44:08 -05:00
parent 0c866d739d
commit e1106513b3

View File

@@ -709,66 +709,61 @@ function GetHtmlContent {
const installThreatLocker = document.querySelector('input[name="installThreatLocker"]'); const installThreatLocker = document.querySelector('input[name="installThreatLocker"]');
const installRocketCyber = document.querySelector('input[name="installRocketCyber"]'); const installRocketCyber = document.querySelector('input[name="installRocketCyber"]');
// Priority 1: Install SVSMSP Module
if (installSVSMSPModule.checked) {
appendLog("Installing SVSMSP Module (Priority 1)...", "cyan");
fetch('/installSVSMSPModule', { method: 'GET' })
}
// Priority 2: Install DattoRMM
if (installDattoRMM.checked) { if (installDattoRMM.checked) {
const DattoRMMCheckbox = document.querySelectorAll('input[name="dattoRMMOption"]:checked'); const DattoRMMCheckbox = document.querySelectorAll('input[name="dattoRMMOption"]:checked');
appendLog("Installing selected site RMM...", "cyan"); appendLog("Installing selected site RMM (Priority 2)...", "cyan");
const checkedValues = Array.from(DattoRMMCheckbox).map(c => c.value); const checkedValues = Array.from(DattoRMMCheckbox).map(c => c.value);
const payload = { const payload = {
checkedValues, // Array of selected checkbox values checkedValues, // Array of selected checkbox values
UID, // Selected site UID UID, // Selected site UID
Name, // Selected site name Name // Selected site name
}; };
fetch('/installrmm', { fetch('/installrmm', {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload), body: JSON.stringify(payload)
}); })
fetch('/installrmm', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ installRMMCommand, UID, Name })
});
} }
// Lower-priority tasks
if (setSVSPowerplan.checked) { if (setSVSPowerplan.checked) {
fetch('/SetSVSPowerplan', { method: 'GET' }); fetch('/SetSVSPowerplan', { method: 'GET' })
appendLog("Setting SVS Powerplan", "cyan");
}
if (installSVSMSPModule.checked) {
fetch('/installSVSMSPModule', { method: 'GET' });
appendLog("Installing CyberQP", "cyan");
} }
if (installCyberQP.checked) { if (installCyberQP.checked) {
fetch('/installCyberQP', { method: 'GET' }); fetch('/installCyberQP', { method: 'GET' })
appendLog("Installing CyberQP", "cyan");
} }
if (installSplashtop.checked) { if (installSplashtop.checked) {
fetch('/installSplashtop', { method: 'GET' }); fetch('/installSplashtop', { method: 'GET' })
appendLog("Installing Splashtop", "cyan");
} }
if (installSVSHelpDesk.checked) { if (installSVSHelpDesk.checked) {
fetch('/installSVSHelpDesk', { method: 'GET' }); fetch('/installSVSHelpDesk', { method: 'GET' })
appendLog("Installing SVSHelpdesk", "cyan");
} }
if (installSVSWatchtower.checked) { if (installSVSWatchtower.checked) {
fetch('/installSVSWatchtower', { method: 'GET' }); fetch('/installSVSWatchtower', { method: 'GET' })
appendLog("Installing SVSWatchtower", "cyan");
} }
if (installThreatLocker.checked) { if (installThreatLocker.checked) {
fetch('/installThreatLocker', { method: 'GET' }); fetch('/installThreatLocker', { method: 'GET' })
appendLog("Installing ThreatLocker", "cyan");
} }
if (installRocketCyber.checked) { if (installRocketCyber.checked) {
fetch('/installRocketCyber', { method: 'GET' }); fetch('/installRocketCyber', { method: 'GET' })
appendLog("Installing RocketCyber", "cyan");
} }
} }
function endSession() { function endSession() {