Fix: Prioritize custom label over dynamic account label on Map pins
This commit is contained in:
1 parent
bc30a8a0e4
commit
8a73d266d8
1 file changed
+3
-4
@@ -175,11 +175,10 @@ export default function AgentsPage() {
|
|||||||
.filter(loc => agents.some(a => (a.uuid || a.serial) === loc.agent_uuid))
|
.filter(loc => agents.some(a => (a.uuid || a.serial) === loc.agent_uuid))
|
||||||
.map(loc => {
|
.map(loc => {
|
||||||
const agent = agents.find(a => (a.uuid || a.serial) === loc.agent_uuid);
|
const agent = agents.find(a => (a.uuid || a.serial) === loc.agent_uuid);
|
||||||
|
const dynamicLabel = resolveAgentLabel(loc.agent_uuid, managedUsers);
|
||||||
const agentLabel = agent
|
const agentLabel = agent
|
||||||
? (resolveAgentLabel(loc.agent_uuid, managedUsers) !== loc.agent_uuid
|
? (agent.label || (dynamicLabel !== loc.agent_uuid ? dynamicLabel : loc.agent_uuid))
|
||||||
? resolveAgentLabel(loc.agent_uuid, managedUsers)
|
: (loc.label || (dynamicLabel !== loc.agent_uuid ? dynamicLabel : loc.agent_uuid));
|
||||||
: (agent.label || loc.label || loc.agent_uuid))
|
|
||||||
: (loc.label || loc.agent_uuid);
|
|
||||||
const isOnline = !!(agent?.last_seen_at?.human === 'Online' ||
|
const isOnline = !!(agent?.last_seen_at?.human === 'Online' ||
|
||||||
agent?.last_seen_at?.human === 'Flows Detected' ||
|
agent?.last_seen_at?.human === 'Flows Detected' ||
|
||||||
(agent?.last_seen_at?.human && agent.last_seen_at.human.startsWith('Last seen:')));
|
(agent?.last_seen_at?.human && agent.last_seen_at.human.startsWith('Last seen:')));
|
||||||
|
|||||||
Reference in new issue
Block a user