From e2ebf9973bec9884154093d6bd7a9688261e6fed Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rapha=C3=ABl=20Catarino?= <raphcatarino@gmail.com>
Date: Sat, 19 Mar 2022 13:52:41 +0100
Subject: select environments

---
 src/components/services/Portainer.vue | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'src/components/services/Portainer.vue')

diff --git a/src/components/services/Portainer.vue b/src/components/services/Portainer.vue
index c7e9962..2e0d1e2 100644
--- a/src/components/services/Portainer.vue
+++ b/src/components/services/Portainer.vue
@@ -83,6 +83,12 @@ export default {
 
       let containers = [];
       for (let endpoint of this.endpoints) {
+        if (
+          this.item.environments &&
+          !this.item.environments.includes(endpoint.Name)
+        ) {
+          continue;
+        }
         const uri = `/api/endpoints/${endpoint.Id}/docker/containers/json?all=1`;
         const endpointContainers = await this.fetch(uri, { headers }).catch(
           (e) => {
-- 
cgit v1.2.3

