nickname
This commit is contained in:
1 parent
8948171ae7
commit
f034fc5afd
11 files changed
+303
-18
No files matched your search
@@ -11,6 +11,7 @@ import {
|
||||
fetchAlerts,
|
||||
fetchAudit,
|
||||
revokeAgent,
|
||||
setAgentNickname,
|
||||
} from "@/api";
|
||||
import { AppLayout } from "@/layout/AppLayout";
|
||||
import { AgentsPage } from "@/pages/AgentsPage";
|
||||
@@ -73,6 +74,15 @@ export function App() {
|
||||
return result.revoked;
|
||||
}
|
||||
|
||||
async function onSetAgentNickname(
|
||||
agentId: string,
|
||||
nickname: string | null,
|
||||
): Promise<boolean> {
|
||||
const result = await setAgentNickname(agentId, nickname);
|
||||
await loadAll();
|
||||
return result.updated;
|
||||
}
|
||||
|
||||
async function refreshAlertsAndHistory() {
|
||||
const [nextAlerts, nextHistory] = await Promise.all([
|
||||
fetchAlerts(),
|
||||
@@ -149,6 +159,7 @@ export function App() {
|
||||
selectedAgentId={selectedAgentId}
|
||||
onSelectAgent={setSelectedAgentId}
|
||||
onRevokeAgent={onRevokeAgent}
|
||||
onSetAgentNickname={onSetAgentNickname}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user