feat(api, web): enhance agent installation process with invited status and policy support
Build and Push EvoFirewall Docker Image / build-and-push (push) Successful in 1m48s
Build and Push EvoFirewall Docker Image / create-release (push) Skipped

- Updated the agent enrollment process to include an 'invited' status, allowing for better tracking of agent states.
- Implemented support for install links that can now include an `install_link_id`, facilitating the transition from invited to pending status upon enrollment.
- Enhanced the MikroTik installation script to include the `EvofwInstallLinkId` for better tracking and management.
- Added new API endpoints for fetching agent policies and serving MikroTik-specific installation scripts.
- Improved the web UI to reflect the new agent statuses and provide copyable installation commands for agents.

Co-authored-by: Cursor <[email protected]>
This commit is contained in:
Denozordec
2026-07-21 01:45:38 +07:00
co-authored by Cursor
parent ef56da4d91
commit d5784b9f35
20 changed files with 793 additions and 104 deletions
+3 -3
View File
@@ -19,7 +19,7 @@ import { refreshAllLists } from './services/lists/refresh.js'
import { repos } from '@evofw/db'
import {
isValidInstallSlug,
resolveAndRenderInstallScript,
resolveAndRenderInstall,
} from './services/install-links.js'
export interface BuildAppOptions {
@@ -85,13 +85,13 @@ export async function buildApp(opts: BuildAppOptions = {}) {
) {
const link = repos.getInstallLinkBySlug(app.db, segment)
if (link) {
const script = resolveAndRenderInstallScript(
const { body, contentType } = resolveAndRenderInstall(
app.db,
link,
config.publicBaseUrl,
config.enrollSeed,
)
return reply.type('text/x-shellscript').send(script)
return reply.type(contentType).send(body)
}
}