fix(edge-stacks): take not-found stack as removed EE-6758 (#11248)
parent
88185d7f6d
commit
385fd95779
|
@ -135,6 +135,11 @@ func (handler *Handler) updateEdgeStackStatus(tx dataservices.DataStoreTx, r *ht
|
|||
}
|
||||
|
||||
func updateEnvStatus(environmentId portainer.EndpointID, stack *portainer.EdgeStack, deploymentStatus portainer.EdgeStackDeploymentStatus) {
|
||||
if deploymentStatus.Type == portainer.EdgeStackStatusRemoved {
|
||||
delete(stack.Status, environmentId)
|
||||
return
|
||||
}
|
||||
|
||||
environmentStatus, ok := stack.Status[environmentId]
|
||||
if !ok {
|
||||
environmentStatus = portainer.EdgeStackStatus{
|
||||
|
|
|
@ -39,11 +39,13 @@ export function DeploymentCounter({
|
|||
total: number;
|
||||
type?: StatusType;
|
||||
}) {
|
||||
const width = total ? (count / total) * 100 : 0;
|
||||
|
||||
return (
|
||||
<TooltipWithChildren message={getTooltip(count, total, type)}>
|
||||
<div className="h-2 w-full overflow-hidden rounded-lg bg-gray-4">
|
||||
<div
|
||||
style={{ width: `${(count / total) * 100}%` }}
|
||||
style={{ width: `${width}%` }}
|
||||
className={clsx('h-full rounded-lg', {
|
||||
'bg-success-7': type === StatusType.Running,
|
||||
'bg-error-7': type === StatusType.Error,
|
||||
|
|
|
@ -127,6 +127,12 @@ func (wrapper *PluginWrapper) WaitForStatus(ctx context.Context, name string, st
|
|||
log.Debug().
|
||||
Str("project_name", name).
|
||||
Msg("no output from docker compose ps")
|
||||
|
||||
if status == libstack.StatusRemoved {
|
||||
errorMessageCh <- ""
|
||||
return
|
||||
}
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue