Skip to content

Commit

Permalink
Match potential link on platform and name (#2843)
Browse files Browse the repository at this point in the history
* Match potential link on platform and name

* Restore original formatting
  • Loading branch information
d3vco authored Jan 19, 2024
1 parent 1c944c6 commit 5a090ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/operations.html
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ <h2>Operations</h2>
this.setPotentialLinksToAdd();
if (!this.selectedPotentialLink.ability_id) return;

const executor = link.executors.find((e) => this.potentialLink.executor === e.name);
const executor = link.executors.find((ex) => ex.platform === this.potentialLink.agent.platform && this.potentialLink.executor === ex.name);
const fields = [...new Set([...executor.command.matchAll(/#{(.*?)}/gm)].map((field) => field[1]))];
const opSource = this.SOURCES.find((s) => s.id === this.selectedOperation.source.id);
const opSourceCollected = this.SOURCES.find((source) => source.name === this.selectedOperation.name);
Expand Down Expand Up @@ -1654,7 +1654,7 @@ <h2>Operations</h2>

let executor;
if (this.selectedPotentialLink.executors) {
executor = this.selectedPotentialLink.executors.find((e) => this.potentialLink.executor === e.name);
executor = this.selectedPotentialLink.executors.find((ex) => ex.platform === this.potentialLink.agent.platform && this.potentialLink.executor === ex.name);
}

if (!combinations.length) {
Expand Down Expand Up @@ -2144,4 +2144,4 @@ <h2>Operations</h2>
#operationsPage span.status-timeout::after {
box-shadow: 0 0 0 0.2em cornflowerblue;
}
</style>
</style>

0 comments on commit 5a090ee

Please sign in to comment.