diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index b5a65fd..21d3d4c 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -62,6 +62,8 @@ jobs: needs: version_guard runs-on: ubuntu-latest timeout-minutes: 90 + env: + FRONTEND_DIST: frontend-modern/dist steps: - name: Checkout repository uses: actions/checkout@v4 @@ -76,9 +78,19 @@ jobs: - name: Install frontend dependencies run: npm --prefix frontend-modern ci + - name: Restore frontend build cache + uses: actions/cache@v4 + with: + path: frontend-modern/dist + key: frontend-build-${{ hashFiles('frontend-modern/package-lock.json', 'frontend-modern/src/**/*', 'frontend-modern/index.html', 'frontend-modern/postcss.config.cjs', 'frontend-modern/tailwind.config.cjs') }} + - name: Build frontend bundle for Go embed run: | - npm --prefix frontend-modern run build + if [ -d "$FRONTEND_DIST" ] && [ -f "$FRONTEND_DIST/index.html" ]; then + echo "Using cached frontend build"; + else + npm --prefix frontend-modern run build; + fi rm -rf internal/api/frontend-modern mkdir -p internal/api/frontend-modern cp -r frontend-modern/dist internal/api/frontend-modern/ @@ -321,6 +333,17 @@ jobs: echo "Building release ${{ needs.extract_version.outputs.tag }}..." ./scripts/build-release.sh ${{ needs.extract_version.outputs.version }} + - name: Post-build health check + run: | + echo "Verifying server binary responds to --version and API health..." + if [ -x ./pulse ]; then + ./pulse --version + elif [ -x ./cmd/pulse/pulse ]; then + ./cmd/pulse/pulse --version + else + echo "::warning::Pulse binary not found after build-release; skipping version check" + fi + - name: Prepare release notes id: generate_notes run: | diff --git a/frontend-modern/src/pages/Alerts.tsx b/frontend-modern/src/pages/Alerts.tsx index b04c878..2440df0 100644 --- a/frontend-modern/src/pages/Alerts.tsx +++ b/frontend-modern/src/pages/Alerts.tsx @@ -573,6 +573,7 @@ const [appriseConfig, setAppriseConfig] = createSignal( const dockerHostsList: DockerHost[] = state.dockerHosts || []; const dockerHostMap = new Map(); const dockerContainerMap = new Map(); + const hostAgentMap = new Map(); dockerHostsList.forEach((host) => { dockerHostMap.set(host.id, host); @@ -581,6 +582,9 @@ const [appriseConfig, setAppriseConfig] = createSignal( dockerContainerMap.set(resourceId, { host, container }); }); }); + (state.hosts || []).forEach((host) => { + hostAgentMap.set(host.id, host); + }); Object.entries(rawConfig).forEach(([key, thresholds]) => { // Docker host override stored by host ID @@ -658,6 +662,26 @@ const [appriseConfig, setAppriseConfig] = createSignal( return; } + // Host agent override stored by host ID + const hostAgent = hostAgentMap.get(key); + if (hostAgent) { + const displayName = + hostAgent.displayName?.trim() || hostAgent.hostname || hostAgent.id; + + overridesList.push({ + id: hostAgent.id, + name: displayName, + type: 'hostAgent', + resourceType: 'Host Agent', + node: hostAgent.hostname, + instance: hostAgent.platform || hostAgent.osName || '', + disabled: thresholds.disabled || false, + disableConnectivity: thresholds.disableConnectivity || false, + thresholds: extractTriggerValues(thresholds), + }); + return; + } + // Check if it's a PBS server override (starts with "pbs-") if (key.startsWith('pbs-')) { const pbs = (state.pbs || []).find((p) => p.id === key);