Skip to content

Commit 514c144

Browse files
iguannalinargaudreaucyber-arsenull
authored
Operations select dead agent bug in add potential link menu (#2344)
* Fix opacity for view command buttons in operation links; Fixed bug where if first agent is dead, does not let user select a different agent when creating a command * Update templates/operations.html Remove unnecessary assignment Co-authored-by: Jordan Hanna <[email protected]> Co-authored-by: Adam Gaudreau <[email protected]> Co-authored-by: Jordan Hanna <[email protected]>
1 parent 0ba7e82 commit 514c144

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

templates/operations.html

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ <h2 class="is-size-7 has-text-weight-normal mb-5 mt-0">Decisions</h2>
284284
<template x-if="!isLinkEditable">
285285
<div class="is-flex is-justify-content-center is-flex-direction-column">
286286
<button class="button is-primary is-small"
287-
x-bind:class="{'hover-opacity':selectedLink !== link}"
288287
x-on:click="getLink(link); openModal='showCommand'"
289288
title="view output">View Command
290289
</button>
@@ -1244,11 +1243,11 @@ <h2 class="is-size-7 has-text-weight-normal mb-5 mt-0">Decisions</h2>
12441243
getAgent(agentPaw) {
12451244
apiV2('GET', `api/v2/agents/${agentPaw}`)
12461245
.then((res) => {
1247-
this.selectedAgentIndex = 0;
1248-
this.potentialLink.agent = res;
12491246
// Check if agent has been seen in the last hour
12501247
if ((new Date() - new Date(res.last_seen)) > 3600000) {
12511248
toast(`Command might not run. Is Agent #${res.paw} still alive?`);
1249+
} else {
1250+
this.potentialLink.agent = res;
12521251
}
12531252
})
12541253
.catch(() => {
@@ -1704,14 +1703,6 @@ <h2 class="is-size-7 has-text-weight-normal mb-5 mt-0">Decisions</h2>
17041703
margin-bottom: 1em;
17051704
}
17061705

1707-
#operationsPage .hover-opacity {
1708-
opacity: 0.5;
1709-
}
1710-
1711-
#operationsPage .hover-opacity:hover {
1712-
opacity: 1;
1713-
}
1714-
17151706
#operationsPage .controls-container button {
17161707
margin: 0 2rem;
17171708
padding: 0;

0 commit comments

Comments
 (0)