mirror of
https://github.com/jpros/tacticalrmm-web.git
synced 2026-02-23 12:53:38 +00:00
add optional cli args to installer
This commit is contained in:
@@ -10,17 +10,58 @@
|
||||
</q-card-actions>
|
||||
</q-card-section>
|
||||
<q-card-section>
|
||||
<p>Download the agent then run the following command from an elevated command prompt on the device you want to add.</p>
|
||||
<br />
|
||||
<p
|
||||
class="text-subtitle1"
|
||||
>Download the agent then run the following command from an elevated command prompt on the device you want to add.</p>
|
||||
<p>
|
||||
<code>
|
||||
{{ info.exe }} /VERYSILENT /SUPPRESSMSGBOXES
|
||||
&& 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 }}" --power {{ info.power }} --rdp {{ info.rdp }} --ping {{ info.ping }} --auth "{{ info.data.token }}"
|
||||
</code>
|
||||
<q-field outlined color="black">
|
||||
<code>
|
||||
{{ info.exe }} /VERYSILENT /SUPPRESSMSGBOXES
|
||||
&& 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 }}" --power {{ info.power }} --rdp {{ info.rdp }} --ping {{ info.ping }} --auth "{{ info.data.token }}"
|
||||
</code>
|
||||
</q-field>
|
||||
</p>
|
||||
<div v-show="info.data.showextra">
|
||||
<q-expansion-item
|
||||
switch-toggle-side
|
||||
header-class="text-primary"
|
||||
expand-separator
|
||||
label="View optional command line args"
|
||||
>
|
||||
<div class="q-pa-xs q-gutter-xs">
|
||||
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
||||
<code>--log DEBUG</code>
|
||||
</q-badge>
|
||||
<span>To enable verbose output during the install</span>
|
||||
</div>
|
||||
<div class="q-pa-xs q-gutter-xs">
|
||||
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
||||
<code>--local-salt "C:\\<some folder or path>\\salt-minion-setup.exe"</code>
|
||||
</q-badge>
|
||||
<span>
|
||||
To skip downloading the salt-minion during the install. Download it
|
||||
<a
|
||||
href="https://github.com/wh1te909/winagent/raw/master/bin/salt-minion-setup.exe"
|
||||
>here</a>
|
||||
</span>
|
||||
</div>
|
||||
<div class="q-pa-xs q-gutter-xs">
|
||||
<q-badge class="text-caption q-mr-xs" color="grey" text-color="black">
|
||||
<code>--local-mesh "C:\\<some folder or path>\\meshagent.exe"</code>
|
||||
</q-badge>
|
||||
<span>
|
||||
To skip downloading the Mesh Agent during the install. Download it
|
||||
<span
|
||||
style="cursor:pointer;color:blue;text-decoration:underline"
|
||||
@click="downloadMesh"
|
||||
>here</span>
|
||||
</span>
|
||||
</div>
|
||||
</q-expansion-item>
|
||||
</div>
|
||||
<br />
|
||||
<p class="text-italic">Note: the auth token above will be valid for {{ info.expires }} hours.</p>
|
||||
<q-btn type="a" :href="info.download" color="primary" label="Download Agent" />
|
||||
@@ -29,8 +70,25 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixins from "@/mixins/mixins";
|
||||
|
||||
export default {
|
||||
name: "AgentDownload",
|
||||
mixins: [mixins],
|
||||
props: ["info"],
|
||||
methods: {
|
||||
downloadMesh() {
|
||||
this.$axios
|
||||
.post("/api/v1/getmeshexe/", {}, { responseType: "blob" })
|
||||
.then(({ data }) => {
|
||||
const blob = new Blob([data], { type: "application/vnd.microsoft.portable-executable" });
|
||||
let link = document.createElement("a");
|
||||
link.href = window.URL.createObjectURL(blob);
|
||||
link.download = "meshagent.exe";
|
||||
link.click();
|
||||
})
|
||||
.catch(e => this.notifyError("Something went wrong"));
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -102,12 +102,12 @@ export default {
|
||||
this.$q.loading.show();
|
||||
axios
|
||||
.get("/clients/loadclients/")
|
||||
.then((r) => {
|
||||
.then(r => {
|
||||
this.tree = r.data;
|
||||
this.client = Object.keys(r.data)[0];
|
||||
axios
|
||||
.get("/agents/getagentversions/")
|
||||
.then((r) => {
|
||||
.then(r => {
|
||||
this.versions = r.data.versions;
|
||||
this.version = Object.values(r.data.versions)[0];
|
||||
this.github = r.data.github;
|
||||
@@ -126,12 +126,12 @@ export default {
|
||||
},
|
||||
addAgent() {
|
||||
const api = axios.defaults.baseURL;
|
||||
const release = this.github.filter((i) => i.name === this.version)[0];
|
||||
const release = this.github.filter(i => i.name === this.version)[0];
|
||||
const download = release.assets[0].browser_download_url;
|
||||
const exe = `${release.name}.exe`;
|
||||
|
||||
const data = { client: this.client, site: this.site, expires: this.expires };
|
||||
axios.post("/agents/installagent/", data).then((r) => {
|
||||
const data = { client: this.client, site: this.site, expires: this.expires, version: this.version };
|
||||
axios.post("/agents/installagent/", data).then(r => {
|
||||
this.info = {
|
||||
exe,
|
||||
download,
|
||||
|
||||
Reference in New Issue
Block a user