|
54 | 54 | GameServerLiveStatusDto? live, |
55 | 55 | BanFileMonitorGameTypeCard? card) |
56 | 56 | { |
57 | | - if (m.GameServer is null || !m.GameServer.BanFileSyncEnabled) |
| 57 | + if (m.GameServer is null) |
| 58 | + return ("bg-secondary", "Unknown", "Game server data unavailable."); |
| 59 | + |
| 60 | + // Ban file sync is a sub-feature of the agent. If sync is on but the agent is off, |
| 61 | + // the watcher cannot run — surface this as a config error rather than the misleading |
| 62 | + // "Stale" badge it would otherwise produce. |
| 63 | + if (m.GameServer.BanFileSyncEnabled && !m.GameServer.AgentEnabled) |
| 64 | + return ("bg-warning text-dark", "Misconfigured", |
| 65 | + "Ban file sync requires the agent to be enabled. Toggle Agent Enabled on the game server's edit page, or disable Ban File Sync."); |
| 66 | + |
| 67 | + if (!m.GameServer.BanFileSyncEnabled) |
58 | 68 | return ("bg-secondary", "Disabled", "Ban file sync is disabled for this server."); |
59 | 69 |
|
60 | 70 | if (m.LastCheckUtc is null) |
|
96 | 106 | <div class="alert alert-primary" role="alert"> |
97 | 107 | <i class="fa-solid fa-fw fa-circle-info" aria-hidden="true"></i> |
98 | 108 | Ban file monitors are now <strong>read-only status snapshots</strong> written by the server agent. |
99 | | - To enable / disable monitoring for a server, toggle <strong>Ban File Sync</strong> on |
| 109 | + To enable / disable monitoring for a server, toggle <strong>Agent Enabled</strong> + <strong>Ban File Sync</strong> on |
100 | 110 | <a asp-controller="GameServers" asp-action="Index">the game server's edit page</a>. |
101 | | - The FTP path is resolved automatically from the server's <strong>Ban File Root Path</strong> |
102 | | - plus per-game-type rules and the currently-running mod. |
| 111 | + Ban file sync is a sub-feature of the agent and requires Agent Enabled. The FTP path is resolved |
| 112 | + automatically from the server's <strong>Ban File Root Path</strong> plus per-game-type rules and |
| 113 | + the currently-running mod. |
103 | 114 | </div> |
104 | 115 |
|
105 | 116 | @if (Model.GameTypeCards.Count > 0) |
|
0 commit comments