mirror of https://github.com/portainer/portainer
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) {
|
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]
|
environmentStatus, ok := stack.Status[environmentId]
|
||||||
if !ok {
|
if !ok {
|
||||||
environmentStatus = portainer.EdgeStackStatus{
|
environmentStatus = portainer.EdgeStackStatus{
|
||||||
|
|
|
@ -39,11 +39,13 @@ export function DeploymentCounter({
|
||||||
total: number;
|
total: number;
|
||||||
type?: StatusType;
|
type?: StatusType;
|
||||||
}) {
|
}) {
|
||||||
|
const width = total ? (count / total) * 100 : 0;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TooltipWithChildren message={getTooltip(count, total, type)}>
|
<TooltipWithChildren message={getTooltip(count, total, type)}>
|
||||||
<div className="h-2 w-full overflow-hidden rounded-lg bg-gray-4">
|
<div className="h-2 w-full overflow-hidden rounded-lg bg-gray-4">
|
||||||
<div
|
<div
|
||||||
style={{ width: `${(count / total) * 100}%` }}
|
style={{ width: `${width}%` }}
|
||||||
className={clsx('h-full rounded-lg', {
|
className={clsx('h-full rounded-lg', {
|
||||||
'bg-success-7': type === StatusType.Running,
|
'bg-success-7': type === StatusType.Running,
|
||||||
'bg-error-7': type === StatusType.Error,
|
'bg-error-7': type === StatusType.Error,
|
||||||
|
|
|
@ -127,6 +127,12 @@ func (wrapper *PluginWrapper) WaitForStatus(ctx context.Context, name string, st
|
||||||
log.Debug().
|
log.Debug().
|
||||||
Str("project_name", name).
|
Str("project_name", name).
|
||||||
Msg("no output from docker compose ps")
|
Msg("no output from docker compose ps")
|
||||||
|
|
||||||
|
if status == libstack.StatusRemoved {
|
||||||
|
errorMessageCh <- ""
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue