fix(frontend): place host sessions panel beside agent config (0.20.29)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"""Единый источник версии SAC (API, health, логи, OpenAPI)."""
|
||||
|
||||
APP_NAME = "Security Alert Center"
|
||||
APP_VERSION = "0.20.28"
|
||||
APP_VERSION = "0.20.29"
|
||||
APP_VERSION_LABEL = f"{APP_NAME} v.{APP_VERSION}"
|
||||
|
||||
@@ -4,6 +4,6 @@ from app.version import APP_NAME, APP_VERSION, APP_VERSION_LABEL
|
||||
|
||||
|
||||
def test_version_constants():
|
||||
assert APP_VERSION == "0.20.28"
|
||||
assert APP_VERSION == "0.20.29"
|
||||
assert APP_NAME == "Security Alert Center"
|
||||
assert APP_VERSION_LABEL == "Security Alert Center v.0.20.28"
|
||||
assert APP_VERSION_LABEL == "Security Alert Center v.0.20.29"
|
||||
|
||||
@@ -108,6 +108,10 @@ async function terminate(sessionId: string) {
|
||||
margin: 0.75rem 0;
|
||||
}
|
||||
|
||||
.host-sessions {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.host-sessions button.secondary {
|
||||
margin-top: 0.5rem;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/** Fallback до загрузки /health; при релизе держите в sync с backend/app/version.py */
|
||||
export const APP_NAME = "Security Alert Center";
|
||||
export const APP_VERSION = "0.20.28";
|
||||
export const APP_VERSION = "0.20.29";
|
||||
export const APP_VERSION_LABEL = `${APP_NAME} v.${APP_VERSION}`;
|
||||
|
||||
@@ -143,30 +143,32 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section v-if="showAgentConfig" class="card host-agent-config">
|
||||
<h2>Desired config (poll агента)</h2>
|
||||
<p class="muted">Агент заберёт настройки при следующем poll. Revision: {{ host.agent_config_revision ?? 0 }}</p>
|
||||
<form class="agent-config-form" @submit.prevent="saveAgentConfig">
|
||||
<label v-if="isWindowsHost" class="config-field">
|
||||
ServerDisplayName
|
||||
<input v-model="configForm.serverDisplayName" type="text" />
|
||||
</label>
|
||||
<label v-if="isLinuxHost" class="config-field">
|
||||
SERVER_DISPLAY_NAME
|
||||
<input v-model="configForm.serverDisplayName" type="text" />
|
||||
</label>
|
||||
<label v-if="isWindowsHost" class="config-inline">
|
||||
<input v-model="configForm.getInventory" type="checkbox" />
|
||||
GetInventory
|
||||
</label>
|
||||
<button type="submit" :disabled="savingAgentConfig">
|
||||
{{ savingAgentConfig ? "Сохранение…" : "Сохранить config" }}
|
||||
</button>
|
||||
<p v-if="agentConfigMessage" :class="agentConfigOk ? 'success' : 'error'">{{ agentConfigMessage }}</p>
|
||||
</form>
|
||||
</section>
|
||||
<div v-if="showAgentConfig" class="host-config-sessions-row">
|
||||
<section class="card host-agent-config">
|
||||
<h2>Desired config (poll агента)</h2>
|
||||
<p class="muted">Агент заберёт настройки при следующем poll. Revision: {{ host.agent_config_revision ?? 0 }}</p>
|
||||
<form class="agent-config-form" @submit.prevent="saveAgentConfig">
|
||||
<label v-if="isWindowsHost" class="config-field">
|
||||
ServerDisplayName
|
||||
<input v-model="configForm.serverDisplayName" type="text" />
|
||||
</label>
|
||||
<label v-if="isLinuxHost" class="config-field">
|
||||
SERVER_DISPLAY_NAME
|
||||
<input v-model="configForm.serverDisplayName" type="text" />
|
||||
</label>
|
||||
<label v-if="isWindowsHost" class="config-inline">
|
||||
<input v-model="configForm.getInventory" type="checkbox" />
|
||||
GetInventory
|
||||
</label>
|
||||
<button type="submit" :disabled="savingAgentConfig">
|
||||
{{ savingAgentConfig ? "Сохранение…" : "Сохранить config" }}
|
||||
</button>
|
||||
<p v-if="agentConfigMessage" :class="agentConfigOk ? 'success' : 'error'">{{ agentConfigMessage }}</p>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<HostSessionsPanel v-if="showAgentConfig" :host-id="host.id" />
|
||||
<HostSessionsPanel :host-id="host.id" />
|
||||
</div>
|
||||
|
||||
<section v-if="inventory" class="host-inventory card">
|
||||
<h2>Железо и ПО</h2>
|
||||
@@ -847,7 +849,21 @@ watch(
|
||||
}
|
||||
|
||||
.host-agent-config {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.host-config-sessions-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 1rem;
|
||||
margin-top: 1rem;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.host-config-sessions-row > .host-agent-config,
|
||||
.host-config-sessions-row > .host-sessions {
|
||||
flex: 1 1 22rem;
|
||||
min-width: min(100%, 22rem);
|
||||
}
|
||||
|
||||
.agent-config-form {
|
||||
|
||||
Reference in New Issue
Block a user