diff --git a/api/http/handler/endpoints/filter.go b/api/http/handler/endpoints/filter.go index 8d008fcc7..a0006a48d 100644 --- a/api/http/handler/endpoints/filter.go +++ b/api/http/handler/endpoints/filter.go @@ -208,9 +208,12 @@ func endpointStatusInStackMatchesFilter(edgeStackStatus map[portainer.EndpointID status, ok := edgeStackStatus[envId] // consider that if the env has no status in the stack it is in Pending state - // workaround because Stack.Status[EnvId].Details.Pending is never set to True in the codebase - if !ok && statusFilter == portainer.EdgeStackStatusPending { - return true + if statusFilter == portainer.EdgeStackStatusPending { + return !ok || len(status.Status) == 0 + } + + if !ok { + return false } return slices.ContainsFunc(status.Status, func(s portainer.EdgeStackDeploymentStatus) bool { diff --git a/app/edge/__module.js b/app/edge/__module.js index a6e659d65..90ab30890 100644 --- a/app/edge/__module.js +++ b/app/edge/__module.js @@ -72,6 +72,11 @@ angular component: 'editEdgeStackView', }, }, + params: { + status: { + dynamic: true, + }, + }, }; const edgeJobs = { diff --git a/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/EnvironmentsDatatable.tsx b/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/EnvironmentsDatatable.tsx index 37e2b61fc..bb5287b0e 100644 --- a/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/EnvironmentsDatatable.tsx +++ b/app/react/edge/edge-stacks/ItemView/EnvironmentsDatatable/EnvironmentsDatatable.tsx @@ -4,7 +4,6 @@ import { useMemo, useState } from 'react'; import { EdgeStackStatus, StatusType } from '@/react/edge/edge-stacks/types'; import { useEnvironmentList } from '@/react/portainer/environments/queries'; -import { isBE } from '@/react/portainer/feature-flags/feature-flags.service'; import { useParamState } from '@/react/hooks/useParamState'; import { EnvironmentId } from '@/react/portainer/environments/types'; @@ -92,23 +91,21 @@ export function EnvironmentsDatatable() { emptyContentLabel="No environment available." disableSelect description={ - isBE && ( -