Update TGBeta.ps1
This commit is contained in:
81
TGBeta.ps1
81
TGBeta.ps1
@@ -694,32 +694,37 @@ function GetHtmlContent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function triggerInstall() {
|
|
||||||
// Priority 1: installSVSMSPModule
|
function triggerInstall() {
|
||||||
const svsMSPCheckbox = document.getElementById('installSVSMSPModule');
|
|
||||||
if (svsMSPCheckbox && svsMSPCheckbox.checked) {
|
|
||||||
appendLog("Installing SVS MSP Module...", "blue");
|
|
||||||
// Perform SVS MSP Module installation logic here
|
|
||||||
fetch('/installSVSMSPModule', { method: 'GET' });
|
|
||||||
appendLog("Installing CyberQP", "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");
|
|
||||||
|
|
||||||
// Perform Datto RMM installation logic here
|
const installSVSMSPModule = document.querySelector('input[name="installSVSMSPModule"]');
|
||||||
|
if (installSVSMSPModule.checked) {
|
||||||
|
fetch('/installSVSMSPModule', { method: 'GET' });
|
||||||
|
appendLog("Installing SVSMSP Module", "cyan");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const dropdown = document.getElementById('dattoRmmDropdown');
|
||||||
|
const UID = dropdown.options[dropdown.selectedIndex].value;
|
||||||
|
const Name = dropdown.options[dropdown.selectedIndex].text;
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
const payload = {
|
const payload = {
|
||||||
checkedValues, // Array of selected checkbox values
|
checkedValues, // Array of selected checkbox values
|
||||||
UID, // Selected site UID
|
UID, // Selected site UID
|
||||||
@@ -730,29 +735,25 @@ function GetHtmlContent {
|
|||||||
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 })
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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"]');
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (setSVSPowerplan.checked) {
|
if (setSVSPowerplan.checked) {
|
||||||
fetch('/SetSVSPowerplan', { method: 'GET' });
|
fetch('/SetSVSPowerplan', { method: 'GET' });
|
||||||
appendLog("Setting SVS Powerplan", "cyan");
|
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' });
|
||||||
|
|||||||
Reference in New Issue
Block a user