Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# This file is part of Edgehog.
#
# Copyright 2025 SECO Mind Srl
# Copyright 2025-2026 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -201,7 +201,9 @@ defmodule Edgehog.Containers.Container.Deployment do
end

calculations do
calculate :is_ready, :boolean, Calculations.Ready
calculate :is_ready, :boolean, Calculations.Ready do
public? true
end

calculate :dangling?,
:boolean,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# This file is part of Edgehog.
#
# Copyright 2025 SECO Mind Srl
# Copyright 2025-2026 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -144,7 +144,9 @@ defmodule Edgehog.Containers.DeviceMapping.Deployment do
end

calculations do
calculate :is_ready, :boolean, expr(state in [:present, :not_present])
calculate :is_ready, :boolean, expr(state in [:present, :not_present]) do
public? true
end

calculate :dangling?,
:boolean,
Expand Down
6 changes: 4 additions & 2 deletions backend/lib/edgehog/containers/image/deployment/deployment.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# This file is part of Edgehog.
#
# Copyright 2025 SECO Mind Srl
# Copyright 2025-2026 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -143,7 +143,9 @@ defmodule Edgehog.Containers.Image.Deployment do
end

calculations do
calculate :is_ready, :boolean, expr(state in [:pulled, :unpulled])
calculate :is_ready, :boolean, expr(state in [:pulled, :unpulled]) do
public? true
end

calculate :dangling?,
:boolean,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# This file is part of Edgehog.
#
# Copyright 2025 SECO Mind Srl
# Copyright 2025-2026 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -143,7 +143,9 @@ defmodule Edgehog.Containers.Network.Deployment do
end

calculations do
calculate :is_ready, :boolean, expr(state in [:available, :unavailable])
calculate :is_ready, :boolean, expr(state in [:available, :unavailable]) do
public? true
end

calculate :dangling?,
:boolean,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# This file is part of Edgehog.
#
# Copyright 2025 SECO Mind Srl
# Copyright 2025-2026 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -145,7 +145,9 @@ defmodule Edgehog.Containers.Volume.Deployment do
end

calculations do
calculate :is_ready, :boolean, expr(state in [:available, :unavailable])
calculate :is_ready, :boolean, expr(state in [:available, :unavailable]) do
public? true
end

calculate :dangling?,
:boolean,
Expand Down
24 changes: 23 additions & 1 deletion backend/test/edgehog_web/schema/query/deployment_test.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# This file is part of Edgehog.
#
# Copyright 2025 SECO Mind Srl
# Copyright 2025-2026 SECO Mind Srl
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -83,18 +83,29 @@ defmodule EdgehogWeb.Schema.Query.DeploymentTest do
state
imageDeployment {
state
isReady
}
networkDeployments {
edges {
node {
state
isReady
}
}
}
volumeDeployments {
edges {
node {
state
isReady
}
}
}
deviceMappingDeployments {
edges {
node {
state
isReady
}
}
}
Expand All @@ -118,16 +129,27 @@ defmodule EdgehogWeb.Schema.Query.DeploymentTest do
container_deployment = container_deployment["node"]

assert container_deployment["imageDeployment"]["state"] == "created"
refute container_deployment["imageDeployment"]["isReady"]

assert [network_deployment] = container_deployment["networkDeployments"]["edges"]
network_deployment = network_deployment["node"]

assert network_deployment["state"] == "created"
refute network_deployment["isReady"]

assert [volume_deployment] = container_deployment["volumeDeployments"]["edges"]
volume_deployment = volume_deployment["node"]

assert volume_deployment["state"] == "created"
refute volume_deployment["isReady"]

assert [device_mapping_deployment] =
container_deployment["deviceMappingDeployments"]["edges"]

device_mapping_deployment = device_mapping_deployment["node"]

assert device_mapping_deployment["state"] == "created"
refute device_mapping_deployment["isReady"]
end

defp get_deployment(opts) do
Expand Down
13 changes: 13 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@formatjs/cli": "^6.2.12",
"@fortawesome/fontawesome-svg-core": "^7.1.0",
"@fortawesome/free-brands-svg-icons": "^7.1.0",
"@fortawesome/free-regular-svg-icons": "^7.1.0",
"@fortawesome/free-solid-svg-icons": "^7.1.0",
"@fortawesome/react-fontawesome": "^3.1.1",
"@hookform/resolvers": "^5.2.2",
Expand Down
Loading
Loading