Skip to content

Commit

Permalink
Release 0.15.2
Browse files Browse the repository at this point in the history
  • Loading branch information
wh1te909 committed Oct 25, 2022
2 parents da18587 + bf3c657 commit 1d102ef
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 15 deletions.
23 changes: 18 additions & 5 deletions api/tacticalrmm/agents/management/commands/fake_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
EvtLogFailWhen,
EvtLogNames,
EvtLogTypes,
GoArch,
PAAction,
ScriptShell,
TaskSyncStatus,
Expand All @@ -47,10 +48,12 @@
temp_dir_stdout,
wmi_deb,
wmi_pi,
wmi_mac,
disks_mac,
)
from winupdate.models import WinUpdate, WinUpdatePolicy

AGENTS_TO_GENERATE = 20
AGENTS_TO_GENERATE = 250

SVCS = settings.BASE_DIR.joinpath("tacticalrmm/test_data/winsvcs.json")
WMI_1 = settings.BASE_DIR.joinpath("tacticalrmm/test_data/wmi1.json")
Expand Down Expand Up @@ -177,6 +180,8 @@ def handle(self, *args, **kwargs) -> None:
"WSUS",
"DESKTOP-12345",
"LAPTOP-55443",
"db-aws-01",
"Karens-MacBook-Air.local",
)
descriptions = ("Bob's computer", "Primary DC", "File Server", "Karen's Laptop")
modes = AgentMonType.values
Expand All @@ -194,6 +199,7 @@ def handle(self, *args, **kwargs) -> None:

linux_deb_os = "Debian 11.2 x86_64 5.10.0-11-amd64"
linux_pi_os = "Raspbian 11.2 armv7l 5.10.92-v7+"
mac_os = "Darwin 12.5.1 arm64 21.6.0"

public_ips = ("65.234.22.4", "74.123.43.5", "44.21.134.45")

Expand Down Expand Up @@ -313,18 +319,25 @@ def handle(self, *args, **kwargs) -> None:
mode = AgentMonType.SERVER
# pi arm
if plat_pick == 7:
agent.goarch = "arm"
agent.goarch = GoArch.ARM32
agent.wmi_detail = wmi_pi
agent.disks = disks_linux_pi
agent.operating_system = linux_pi_os
else:
agent.goarch = "amd64"
agent.goarch = GoArch.AMD64
agent.wmi_detail = wmi_deb
agent.disks = disks_linux_deb
agent.operating_system = linux_deb_os
elif plat_pick in (4, 14):
agent.plat = AgentPlat.DARWIN
mode = random.choice([AgentMonType.SERVER, AgentMonType.WORKSTATION])
agent.goarch = GoArch.ARM64
agent.wmi_detail = wmi_mac
agent.disks = disks_mac
agent.operating_system = mac_os
else:
agent.plat = AgentPlat.WINDOWS
agent.goarch = "amd64"
agent.goarch = GoArch.AMD64
mode = random.choice(modes)
agent.wmi_detail = random.choice(wmi_details)
agent.services = services
Expand All @@ -334,8 +347,8 @@ def handle(self, *args, **kwargs) -> None:
else:
agent.operating_system = random.choice(op_systems_workstations)

agent.hostname = random.choice(hostnames)
agent.version = settings.LATEST_AGENT_VER
agent.hostname = random.choice(hostnames)
agent.site = Site.objects.get(name=site)
agent.agent_id = self.rand_string(40)
agent.description = random.choice(descriptions)
Expand Down
1 change: 0 additions & 1 deletion api/tacticalrmm/checks/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ def test_run_checks(self, nats_cmd):
r = self.client.post(url)
self.assertEqual(r.status_code, 200)
nats_cmd.assert_called_with({"func": "runchecks"}, timeout=15)
self.assertEqual(r.json(), f"Checks will now be re-run on {agent.hostname}")

nats_cmd.reset_mock()
nats_cmd.return_value = "timeout"
Expand Down
2 changes: 1 addition & 1 deletion api/tacticalrmm/checks/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,6 @@ def run_checks(request, agent_id):
if r == "busy":
return notify_error(f"Checks are already running on {agent.hostname}")
elif r == "ok":
return Response(f"Checks will now be re-run on {agent.hostname}")
return Response(f"Checks will now be run on {agent.hostname}")

return notify_error("Unable to contact the agent")
10 changes: 9 additions & 1 deletion api/tacticalrmm/core/mac_uninstall.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
#!/bin/bash

/usr/local/mesh_services/meshagent/meshagent -fulluninstall
if [ -f /usr/local/mesh_services/meshagent/meshagent ]; then
/usr/local/mesh_services/meshagent/meshagent -fulluninstall
fi

if [ -f /opt/tacticalmesh/meshagent ]; then
/opt/tacticalmesh/meshagent -fulluninstall
fi

launchctl bootout system /Library/LaunchDaemons/tacticalagent.plist
rm -rf /usr/local/mesh_services
rm -rf /opt/tacticalmesh
rm -f /etc/tacticalagent
rm -rf /opt/tacticalagent
rm -f /Library/LaunchDaemons/tacticalagent.plist
4 changes: 2 additions & 2 deletions api/tacticalrmm/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ hiredis==2.0.0
requests==2.28.1
six==1.16.0
sqlparse==0.4.3
twilio==7.14.2
twilio==7.15.0
urllib3==1.26.12
uWSGI==2.0.20
uWSGI==2.0.21
validators==0.20.0
vine==5.0.0
websockets==10.3
Expand Down
51 changes: 51 additions & 0 deletions api/tacticalrmm/tacticalrmm/demo_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,41 @@
},
]

disks_mac = [
{
"free": "94.2 GB",
"used": "134.1 GB",
"total": "228.3 GB",
"device": "/dev/disk3s1s1",
"fstype": "apfs",
"percent": 58,
},
{
"free": "481.6 MB",
"used": "18.4 MB",
"total": "500.0 MB",
"device": "/dev/disk1s3",
"fstype": "apfs",
"percent": 3,
},
{
"free": "3.4 GB",
"used": "1.6 GB",
"total": "5.0 GB",
"device": "/dev/disk2s1",
"fstype": "apfs",
"percent": 32,
},
{
"free": "94.2 GB",
"used": "134.1 GB",
"total": "228.3 GB",
"device": "/dev/disk3s1",
"fstype": "apfs",
"percent": 58,
},
]

wmi_deb = {
"cpus": ["AMD Ryzen 9 3900X 12-Core Processor"],
"gpus": ["Cirrus Logic GD 5446"],
Expand All @@ -111,6 +146,22 @@
"make_model": "Raspberry Pi 2 Model B Rev 1.1",
}

wmi_mac = {
"cpus": ["Apple M1"],
"gpus": [],
"disks": [
"Apple APPLE SSD AP0256Q SCSI SSD disk0 233.8 GB",
"Apple APPLE SSD AP0256Q SCSI SSD disk1 500.0 MB",
"Apple APPLE SSD AP0256Q SCSI SSD disk2 5.0 GB",
"Apple APPLE SSD AP0256Q SCSI SSD disk3 228.3 GB",
],
"local_ips": [
"192.168.45.113/24",
"fe80::476:c390:c8dc:11af/64",
],
"make_model": "MacBookAir10,1",
}

check_network_loc_aware_ps1 = r"""
$networkstatus = Get-NetConnectionProfile | Select NetworkCategory | Out-String
Expand Down
10 changes: 5 additions & 5 deletions api/tacticalrmm/tacticalrmm/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
AUTH_USER_MODEL = "accounts.User"

# latest release
TRMM_VERSION = "0.15.1"
TRMM_VERSION = "0.15.2"

# https://github.com/amidaware/tacticalrmm-web
WEB_VERSION = "0.101.3"
WEB_VERSION = "0.101.5"

# bump this version everytime vue code is changed
# to alert user they need to manually refresh their browser
APP_VER = "0.0.172"
APP_VER = "0.0.173"

# https://github.com/amidaware/rmmagent
LATEST_AGENT_VER = "2.4.0"
LATEST_AGENT_VER = "2.4.1"

MESH_VER = "1.0.85"
MESH_VER = "1.0.90"

NATS_SERVER_VER = "2.9.3"

Expand Down

0 comments on commit 1d102ef

Please sign in to comment.