feat(actions): add icons to apps actions (#25343) (#25344)

Signed-off-by: Rick Brouwer <rickbrouwer@gmail.com>
This commit is contained in:
Rick Brouwer
2025-11-25 19:39:37 +01:00
committed by GitHub
parent df1035d236
commit 0c77f3ca1f
3 changed files with 31 additions and 10 deletions

View File

@@ -1,3 +1,7 @@
local actions = {}
actions["restart"] = {}
actions["restart"] = {
["iconClass"] = "fa fa-fw fa-redo"
}
return actions

View File

@@ -1,18 +1,30 @@
local actions = {}
actions["restart"] = {}
actions["restart"] = {
["iconClass"] = "fa fa-fw fa-redo"
}
local paused = false
if obj.spec.paused ~= nil then
paused = obj.spec.paused
actions["pause"] = {paused}
actions["pause"] = {
["disabled"] = paused,
["iconClass"] = "fa fa-fw fa-pause-circle"
}
end
actions["resume"] = {["disabled"] = not(paused)}
actions["resume"] = {
["disabled"] = not(paused),
["iconClass"] = "fa fa-fw fa-play-circle"
}
actions["scale"] = {
["iconClass"] = "fa fa-fw fa-plus-circle",
["params"] = {
{
["name"] = "replicas"
}
},
}
return actions

View File

@@ -1,11 +1,16 @@
local actions = {}
actions["restart"] = {}
actions["restart"] = {
["iconClass"] = "fa fa-fw fa-redo"
}
actions["scale"] = {
["params"] = {
["iconClass"] = "fa fa-fw fa-plus-circle",
["params"] = {
{
["name"] = "replicas"
}
},
},
}
return actions