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