mirror of
https://github.com/argoproj/argo-cd
synced 2026-04-21 17:07:16 +00:00
16 lines
463 B
Lua
16 lines
463 B
Lua
hs = { status = "Progressing", message = "No status available" }
|
|
if obj.status ~= nil then
|
|
if obj.status.state ~= nil then
|
|
if obj.status.state == "Completed" then
|
|
hs.status = "Healthy"
|
|
hs.message = obj.kind .. " Completed"
|
|
elseif obj.status.state == "Running" then
|
|
hs.status = "Progressing"
|
|
hs.message = obj.kind .. " Running"
|
|
else
|
|
hs.status = "Degraded"
|
|
hs.message = obj.status.state
|
|
end
|
|
end
|
|
end
|
|
return hs
|