From d2af24b4edc54a57f0111f31d20602cacf0f6a50 Mon Sep 17 00:00:00 2001 From: dcore94 Date: Fri, 17 Mar 2023 10:11:44 +0100 Subject: [PATCH] fix computation of executbility --- ccp/js/methodlistcontroller2.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ccp/js/methodlistcontroller2.js b/ccp/js/methodlistcontroller2.js index ac5dea5..4b1ff5f 100644 --- a/ccp/js/methodlistcontroller2.js +++ b/ccp/js/methodlistcontroller2.js @@ -177,10 +177,14 @@ class CCPMethodList2 extends HTMLElement{ }).then(infras=>{ for(let m=0; m < this.#data.length; m++){ const method = this.#data[m] + method["executable"] = false for(let i=0; i < infras.length; i++){ const infra = infras[i] const matches = method.links.filter(l => l.rel === "compatibleWith" && l.href === "infrastructures/" + infra.id) - method["executable"] = matches.length > 0 + if(matches.length > 0){ + method["executable"] = true + break + } } } this.updateList()