From 745fd71225e022c5f5a71ed738badf74b88349b4 Mon Sep 17 00:00:00 2001
From: wh1te909
Date: Mon, 10 Aug 2020 04:47:46 +0000
Subject: [PATCH] optional install args
wh1te909/winagent@9cb8d5ba3912ec5af16e5453844ee810524e2a92
---
api/tacticalrmm/agents/views.py | 4 +-
api/tacticalrmm/tacticalrmm/settings.py | 2 +-
.../modals/agents/AgentDownload.vue | 6 +-
.../components/modals/agents/InstallAgent.vue | 134 +++++++++++-------
4 files changed, 91 insertions(+), 55 deletions(-)
diff --git a/api/tacticalrmm/agents/views.py b/api/tacticalrmm/agents/views.py
index 67ccf9b1..2126267b 100644
--- a/api/tacticalrmm/agents/views.py
+++ b/api/tacticalrmm/agents/views.py
@@ -295,7 +295,9 @@ def install_agent(request):
client = get_object_or_404(Client, client=request.data["client"])
site = get_object_or_404(Site, client=client, site=request.data["site"])
- _, token = AuthToken.objects.create(user=request.user, expiry=dt.timedelta(hours=1))
+ _, token = AuthToken.objects.create(
+ user=request.user, expiry=dt.timedelta(hours=request.data["expires"])
+ )
resp = {"token": token, "client": client.pk, "site": site.pk}
return Response(resp)
diff --git a/api/tacticalrmm/tacticalrmm/settings.py b/api/tacticalrmm/tacticalrmm/settings.py
index f0a63025..e705a922 100644
--- a/api/tacticalrmm/tacticalrmm/settings.py
+++ b/api/tacticalrmm/tacticalrmm/settings.py
@@ -11,7 +11,7 @@ AUTH_USER_MODEL = "accounts.User"
# bump this version everytime vue code is changed
# to alert user they need to manually refresh their browser
-APP_VER = "0.0.18"
+APP_VER = "0.0.19"
# https://github.com/wh1te909/salt
LATEST_SALT_VER = "1.0.3"
diff --git a/web/src/components/modals/agents/AgentDownload.vue b/web/src/components/modals/agents/AgentDownload.vue
index e8acc68e..5e06633a 100644
--- a/web/src/components/modals/agents/AgentDownload.vue
+++ b/web/src/components/modals/agents/AgentDownload.vue
@@ -1,5 +1,5 @@
-
+
Installation Instructions
@@ -18,11 +18,11 @@
&& timeout /t 20 /nobreak > NUL
&& "C:\Program Files\TacticalAgent\tacticalrmm.exe" -m install --api "{{ info.api }}"
--client-id {{ info.data.client }} --site-id {{ info.data.site }}
- --agent-type "{{ info.agenttype }}" --auth "{{ info.data.token }}"
+ --agent-type "{{ info.agenttype }}" --power {{ info.power }} --rdp {{ info.rdp }} --ping {{ info.ping }} --auth "{{ info.data.token }}"
- Note: the auth token above will be valid for 1 hour.
+ Note: the auth token above will be valid for {{ info.expires }} hours.
diff --git a/web/src/components/modals/agents/InstallAgent.vue b/web/src/components/modals/agents/InstallAgent.vue
index 09e3260e..add185aa 100644
--- a/web/src/components/modals/agents/InstallAgent.vue
+++ b/web/src/components/modals/agents/InstallAgent.vue
@@ -1,53 +1,73 @@
-
-
-
-
- Add an agent
-
-
-
-
-
-
-
-
-
-
+
+
+ Add an agent
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
- Agent type:
-
-
-
-
-
-
- Select Version
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+ Select Version
+
+
+
+
+
+
+
+
+
+
+