Update TGBeta.ps1

This commit is contained in:
2025-01-05 20:12:02 -05:00
parent 967b0802cb
commit aeee2ef3cd

View File

@@ -694,32 +694,37 @@ function GetHtmlContent {
}
}
function triggerInstall() {
// Priority 1: installSVSMSPModule
const svsMSPCheckbox = document.getElementById('installSVSMSPModule');
if (svsMSPCheckbox && svsMSPCheckbox.checked) {
appendLog("Installing SVS MSP Module...", "blue");
// Perform SVS MSP Module installation logic here
const installSVSMSPModule = document.querySelector('input[name="installSVSMSPModule"]');
if (installSVSMSPModule.checked) {
fetch('/installSVSMSPModule', { method: 'GET' });
appendLog("Installing CyberQP", "cyan");
appendLog("Installing SVSMSP Module", "cyan");
}
// Priority 2: installDattoRMMCheckbox
const dattoRMMCheckbox = document.getElementById('installDattoRMMCheckbox');
if (dattoRMMCheckbox && dattoRMMCheckbox.checked) {
const dattoRMMOptions = document.querySelectorAll('input[name="dattoRMMOption"]:checked');
const dattoRMMValues = Array.from(dattoRMMOptions).map(option => option.value);
// Handle dropdown selection
const dropdown = document.getElementById('dattoRmmDropdown');
const UID = dropdown.options[dropdown.selectedIndex].value;
const Name = dropdown.options[dropdown.selectedIndex].text;
appendLog(`Installing Datto RMM with options: ${dattoRMMValues.join(', ')}`, "cyan");
appendLog(`Selected Datto RMM UID: ${UID}, Name: ${Name}`, "cyan");
const setSVSPowerplan = document.querySelector('input[name="setSVSPowerplan"]');
const installDattoRMM = document.querySelector('input[name="installDattoRMM"]');
const installCyberQP = document.querySelector('input[name="installCyberQP"]');
const installSplashtop = document.querySelector('input[name="installSplashtop"]');
const installSVSHelpDesk = document.querySelector('input[name="installSVSHelpDesk"]');
const installSVSWatchtower = document.querySelector('input[name="installSVSWatchtower"]');
const installThreatLocker = document.querySelector('input[name="installThreatLocker"]');
const installRocketCyber = document.querySelector('input[name="installRocketCyber"]');
if (installDattoRMM.checked) {
const DattoRMMCheckbox = document.querySelectorAll('input[name="dattoRMMOption"]:checked');
appendLog("Installing selected site RMM...", "cyan");
const checkedValues = Array.from(DattoRMMCheckbox).map(c => c.value);
// Perform Datto RMM installation logic here
const payload = {
checkedValues, // Array of selected checkbox values
UID, // Selected site UID
@@ -731,21 +736,12 @@ function GetHtmlContent {
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload),
});
}
const setSVSPowerplan = document.querySelector('input[name="setSVSPowerplan"]');
const installCyberQP = document.querySelector('input[name="installCyberQP"]');
const installSplashtop = document.querySelector('input[name="installSplashtop"]');
const installSVSHelpDesk = document.querySelector('input[name="installSVSHelpDesk"]');
const installSVSWatchtower = document.querySelector('input[name="installSVSWatchtower"]');
const installThreatLocker = document.querySelector('input[name="installThreatLocker"]');
const installRocketCyber = document.querySelector('input[name="installRocketCyber"]');
fetch('/installrmm', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ installRMMCommand, UID, Name })
});
}
if (setSVSPowerplan.checked) {
@@ -753,6 +749,11 @@ function GetHtmlContent {
appendLog("Setting SVS Powerplan", "cyan");
}
if (installSVSMSPModule.checked) {
fetch('/installSVSMSPModule', { method: 'GET' });
appendLog("Installing CyberQP", "cyan");
}
if (installCyberQP.checked) {
fetch('/installCyberQP', { method: 'GET' });