// Healthcheck (editável)
component {
resources {
component(name = SemChecks) {
text(
class = u-muted,
content = "Nenhum check configurado — deploy segue direto.",
)
}
}
form(
class = form-panel,
name = healthcheck,
on_submit = healthcheck_save,
) {
text(class = u-label-cap, content = "KIND")
scroll(class = tabs__scroll, direction = horizontal) {
tabbar(
:value = service_form_healthcheck_kind, active = @service_form_healthcheck_kind, :items = healthcheck_kinds,
tab_class = tabs__tab, tab_active_class = "tabs__tab tabs__tab--active", padding = "9 16", size = 14,
)
}
if @service_form_healthcheck_kind == "http" {
text(class = u-label-cap, content = "HTTP PATH")
input(
class = field__input,
form_control = service_form_healthcheck_path,
:value = service_form_healthcheck_path,
on_change = field:service_form_healthcheck_path,
placeholder = "/health",
)
text(class = u-label-cap, content = "EXPECTED STATUS")
spinbox(
field_class = field__spin,
form_control = service_form_healthcheck_status,
:value = service_form_healthcheck_status,
min = 100,
max = 599,
width = 90,
placeholder = 200,
)
}
row(class = healthcheck__grid) {
column(class = healthcheck__field) {
text(class = u-label-cap, content = "INTERVAL (s)")
spinbox(
field_class = field__spin,
form_control = service_form_healthcheck_interval,
:value = service_form_healthcheck_interval,
min = 1,
max = 3600,
width = 90,
)
}
column(class = healthcheck__field) {
text(class = u-label-cap, content = "TIMEOUT (s)")
spinbox(
field_class = field__spin,
form_control = service_form_healthcheck_timeout,
:value = service_form_healthcheck_timeout,
min = 1,
max = 3600,
width = 90,
)
}
}
row(class = healthcheck__grid) {
column(class = healthcheck__field) {
text(class = u-label-cap, content = "RETRIES")
spinbox(
field_class = field__spin,
form_control = service_form_healthcheck_retries,
:value = service_form_healthcheck_retries,
min = 1,
max = 10,
width = 90,
)
}
column(class = healthcheck__field) {
text(class = u-label-cap, content = "START PERIOD (s)")
spinbox(
field_class = field__spin,
form_control = service_form_healthcheck_start,
:value = service_form_healthcheck_start,
min = 0,
max = 3600,
width = 90,
)
}
}
row(class = env__add) {
button(class = "btn btn--primary", on_click = healthcheck_save, disabled = @busy_healthcheck_save, text = Save)
text(class = u-muted, content = "@service_action_message")
}
}
}