diff --git a/frontend/src/app/app-module/guides/guide-linux-agent/guide-linux-agent.component.ts b/frontend/src/app/app-module/guides/guide-linux-agent/guide-linux-agent.component.ts
index 1eeb0dfb6..3a9d15653 100644
--- a/frontend/src/app/app-module/guides/guide-linux-agent/guide-linux-agent.component.ts
+++ b/frontend/src/app/app-module/guides/guide-linux-agent/guide-linux-agent.component.ts
@@ -11,6 +11,7 @@ export class GuideLinuxAgentComponent implements OnInit {
@Input() integrationId: number;
module = UtmModulesEnum;
@Input() serverId: number;
+ @Input() version: string;
token: string;
constructor(private federationConnectionService: FederationConnectionService) { }
@@ -32,30 +33,40 @@ export class GuideLinuxAgentComponent implements OnInit {
getCommandUbuntu(): string {
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;
- return `sudo apt update -y && sudo apt install wget -y && mkdir -p /opt/utmstack-linux-agent && wget -P /opt/utmstack-linux-agent ` +
- `https://cdn.utmstack.com/agent_updates/release/installer/v10.2.0/utmstack_agent_installer && chmod -R 777 ` +
- `/opt/utmstack-linux-agent/utmstack_agent_installer && sudo /opt/utmstack-linux-agent/utmstack_agent_installer install ` + ip + ` ` + this.token + ` yes`;
+
+ return `sudo bash -c "apt update -y && apt install wget -y && mkdir -p /opt/utmstack-linux-agent && \
+ wget -P /opt/utmstack-linux-agent https://cdn.utmstack.com/agent_updates/release/installer/v${this.version}/utmstack_agent_installer && \
+ chmod -R 777 /opt/utmstack-linux-agent/utmstack_agent_installer && \
+ /opt/utmstack-linux-agent/utmstack_agent_installer install ${ip} ${this.token} yes"`;
}
getCommandCentos7RedHat(): string {
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;
- return `sudo yum install wget -y && mkdir /opt/utmstack-linux-agent && wget -P /opt/utmstack-linux-agent ` +
- `https://cdn.utmstack.com/agent_updates/release/installer/v10.2.0/utmstack_agent_installer && chmod -R 777 ` +
- `/opt/utmstack-linux-agent/utmstack_agent_installer && sudo /opt/utmstack-linux-agent/utmstack_agent_installer install ` + ip + ` ` + this.token + ` yes`;
+
+ return `sudo bash -c "yum install wget -y && mkdir /opt/utmstack-linux-agent && wget -P /opt/utmstack-linux-agent \
+ https://cdn.utmstack.com/agent_updates/release/installer/v${this.version}/utmstack_agent_installer && \
+ chmod -R 777 /opt/utmstack-linux-agent/utmstack_agent_installer && \
+ /opt/utmstack-linux-agent/utmstack_agent_installer install ${ip} ${this.token} yes"`;
+
}
getCommandCentos8Almalinux(): string {
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;
- return `sudo dnf install wget -y && mkdir /opt/utmstack-linux-agent && wget -P /opt/utmstack-linux-agent ` +
- `https://cdn.utmstack.com/agent_updates/release/installer/v10.2.0/utmstack_agent_installer && chmod -R 777 ` +
- `/opt/utmstack-linux-agent/utmstack_agent_installer && sudo /opt/utmstack-linux-agent/utmstack_agent_installer install ` + ip + ` ` + this.token + ` yes`;
+
+ return `sudo bash -c "dnf install wget -y && mkdir /opt/utmstack-linux-agent && \
+ wget -P /opt/utmstack-linux-agent https://cdn.utmstack.com/agent_updates/release/installer/v${this.version}/utmstack_agent_installer && \
+ chmod -R 777 /opt/utmstack-linux-agent/utmstack_agent_installer && \
+ /opt/utmstack-linux-agent/utmstack_agent_installer install ${ip} ${this.token} yes"`;
}
getUninstallCommand(): string {
- return `sudo /opt/utmstack-linux-agent/utmstack_agent_installer uninstall || true; sudo systemctl stop UTMStackAgent 2>/dev/null || true; ` +
- `sudo systemctl disable UTMStackAgent 2>/dev/null || true; sudo rm /etc/systemd/system/UTMStackAgent.service 2>/dev/null || true; sudo systemctl stop UTMStackRedline 2>/dev/null || true; ` +
- `sudo systemctl disable UTMStackRedline 2>/dev/null || true; sudo rm /etc/systemd/system/UTMStackRedline.service 2>/dev/null || true; ` +
- `sudo systemctl stop UTMStackUpdater 2>/dev/null || true; sudo systemctl disable UTMStackUpdater 2>/dev/null || true; ` +
- `sudo rm /etc/systemd/system/UTMStackUpdater.service 2>/dev/null || true; sudo systemctl stop UTMStackModulesLogsCollector 2>/dev/null || true; ` +
- `sudo systemctl disable UTMStackModulesLogsCollector 2>/dev/null || true; sudo rm /etc/systemd/system/UTMStackModulesLogsCollector.service 2>/dev/null || true; ` +
- `sudo systemctl daemon-reload 2>/dev/null || true; echo "Removing UTMStack Agent dependencies..." ` +
- `&& sleep 10 && sudo rm -rf "/opt/utmstack-linux-agent" && echo "UTMStack Agent dependencies removed successfully."`;
+ return `sudo bash -c "/opt/utmstack-linux-agent/utmstack_agent_installer uninstall || true; \
+ systemctl stop UTMStackAgent 2>/dev/null || true; systemctl disable UTMStackAgent 2>/dev/null || true; \
+ rm /etc/systemd/system/UTMStackAgent.service 2>/dev/null || true; systemctl stop UTMStackRedline 2>/dev/null || true; \
+ systemctl disable UTMStackRedline 2>/dev/null || true; rm /etc/systemd/system/UTMStackRedline.service 2>/dev/null || true; \
+ systemctl stop UTMStackUpdater 2>/dev/null || true; systemctl disable UTMStackUpdater 2>/dev/null || true; \
+ rm /etc/systemd/system/UTMStackUpdater.service 2>/dev/null || true; systemctl stop UTMStackModulesLogsCollector 2>/dev/null || true; \
+ systemctl disable UTMStackModulesLogsCollector 2>/dev/null || true; \
+ rm /etc/systemd/system/UTMStackModulesLogsCollector.service 2>/dev/null || true; \
+ systemctl daemon-reload 2>/dev/null || true; \
+ echo 'Removing UTMStack Agent dependencies...' && sleep 10 && rm -rf /opt/utmstack-linux-agent && \
+ echo 'UTMStack Agent dependencies removed successfully.'"`;
}
}
diff --git a/frontend/src/app/app-module/guides/guide-winlogbeat/guide-winlogbeat.component.ts b/frontend/src/app/app-module/guides/guide-winlogbeat/guide-winlogbeat.component.ts
index 8301c5a86..473ae4404 100644
--- a/frontend/src/app/app-module/guides/guide-winlogbeat/guide-winlogbeat.component.ts
+++ b/frontend/src/app/app-module/guides/guide-winlogbeat/guide-winlogbeat.component.ts
@@ -12,6 +12,7 @@ export class GuideWinlogbeatComponent implements OnInit {
@Input() serverId: number;
module = UtmModulesEnum;
token: string;
+ @Input() version: string;
constructor(private federationConnectionService: FederationConnectionService) {
}
@@ -34,7 +35,7 @@ export class GuideWinlogbeatComponent implements OnInit {
getCommand(): string {
const ip = window.location.host.includes(':') ? window.location.host.split(':')[0] : window.location.host;
return `New-Item -ItemType Directory -Force -Path "C:\\Program Files\\UTMStack\\UTMStack Agent"; ` +
- `Invoke-WebRequest -Uri "https://cdn.utmstack.com/agent_updates/release/installer/v10.2.0/utmstack_agent_installer.exe" ` +
+ `Invoke-WebRequest -Uri "https://cdn.utmstack.com/agent_updates/release/installer/v${this.version}/utmstack_agent_installer.exe" ` +
`-OutFile "C:\\Program Files\\UTMStack\\UTMStack Agent\\utmstack_agent_installer.exe"; ` +
`Start-Process "C:\\Program Files\\UTMStack\\UTMStack Agent\\utmstack_agent_installer.exe" ` +
`-ArgumentList 'install', '` + ip + `', '` + this.token + `', 'yes' -NoNewWindow -Wait`;
diff --git a/frontend/src/app/app-module/module-integration/module-integration.component.html b/frontend/src/app/app-module/module-integration/module-integration.component.html
index 4811435c5..605d3eee6 100644
--- a/frontend/src/app/app-module/module-integration/module-integration.component.html
+++ b/frontend/src/app/app-module/module-integration/module-integration.component.html
@@ -2,6 +2,7 @@
@@ -57,6 +58,7 @@
[filebeatModule]="module.moduleName">
{
+ this.currentVersion = response.body.build.version;
+ });
}
}
diff --git a/frontend/src/app/shared/components/utm/util/utm-code-view/utm-code-view.component.html b/frontend/src/app/shared/components/utm/util/utm-code-view/utm-code-view.component.html
index aafc206bd..ea3c79f00 100644
--- a/frontend/src/app/shared/components/utm/util/utm-code-view/utm-code-view.component.html
+++ b/frontend/src/app/shared/components/utm/util/utm-code-view/utm-code-view.component.html
@@ -1,5 +1,5 @@
-
+
diff --git a/frontend/src/app/shared/components/utm/util/utm-code-view/utm-code-view.component.scss b/frontend/src/app/shared/components/utm/util/utm-code-view/utm-code-view.component.scss
index e69de29bb..b3dd10285 100644
--- a/frontend/src/app/shared/components/utm/util/utm-code-view/utm-code-view.component.scss
+++ b/frontend/src/app/shared/components/utm/util/utm-code-view/utm-code-view.component.scss
@@ -0,0 +1,4 @@
+.user-select {
+ width: 95%;
+ user-select: none
+}
diff --git a/frontend/src/app/shared/components/utm/util/utm-code-view/utm-code-view.component.ts b/frontend/src/app/shared/components/utm/util/utm-code-view/utm-code-view.component.ts
index afd9b95c4..f95d4dbdb 100644
--- a/frontend/src/app/shared/components/utm/util/utm-code-view/utm-code-view.component.ts
+++ b/frontend/src/app/shared/components/utm/util/utm-code-view/utm-code-view.component.ts
@@ -27,6 +27,10 @@ export class UtmCodeViewComponent implements OnInit, OnChanges {
}
}
+ preventCopy(event: ClipboardEvent): void {
+ event.preventDefault();
+ }
+
copyCode() {
const selBox = document.createElement('textarea');
const copyText = this.removeSecretsTags(this.str.split('
').join(''));