component {
props {
prop(name = filler)
prop(name = id)
prop(name = name)
prop(name = port)
prop(name = status_label)
prop(name = status_color)
prop(name = kind_label)
prop(name = branch)
prop(name = detail)
prop(name = domains)
prop(name = cpu)
prop(name = mem)
prop(name = checks)
prop(name = has_webhook)
prop(name = webhook)
prop(name = webhook_shown)
prop(name = reveal_label)
prop(name = has_warm)
prop(name = warm_label)
prop(name = warm_color)
}
column(if = @filler, equals = 1, class = u-fill)
column(else, class = card) {
row(class = card__head) {
row(class = "u-fill u-align-y-end") {
text("@name", class = card__title)
text(":@port", class = card__port)
}
row(class = "card__badges") {
rp-badge(
if = @has_warm,
equals = true,
color = @warm_color,
label = "◐ @warm_label"
)
rp-badge(
color = @status_color,
label = @status_label
)
}
}
text("@kind_label", class = u-label-cap)
row(class = card__container, if = @branch, not_equals = "") {
text("{t('common.branch')}", class = u-label-cap)
text("@branch", class = card__title)
}
text("@detail", class = u-muted, if = @detail, not_equals = "")
text("@domains", class = u-muted, if = @domains, not_equals = "")
row(class = card__stats) {
column(class = card__stat) {
text("{t('common.cpu')}", class = u-label-cap)
text("@cpu", class = card__stat-num)
}
column(class = card__stat) {
text("{t('common.mem')}", class = u-label-cap)
text("@mem", class = card__stat-num)
}
}
hr
text("{t('running_card.pre_deploy_checks')}", class = u-label-cap)
text("@checks", class = u-muted)
text("{t('common.deploy_webhook')}", class = u-label-cap)
text("@webhook_shown", class = u-muted)
row(class = card__actions, if = @has_webhook, equals = true) {
button(
class = "card__action",
on_click = copy_webhook:@webhook,
disabled = @busy_copy_webhook,
text = "{t('running_card.copy')}",
)
button(
class = "card__action",
on_click = running_toggle_reveal:@id,
disabled = @busy_running_toggle_reveal,
text = "@reveal_label",
)
}
button(
class = "card__action card__action--open",
on_click = open_service:@id, disabled = @busy_open_service,
text = "{t('running_card.open_service')}"
)
row(class = card__actions) {
button(
class = "card__action",
on_click = running_deploy:@id,
disabled = @busy_running_deploy,
text = "{t('running_card.deploy')}",
)
button(
class = "card__action card__action--icon",
on_click = service_stop_id:@id,
disabled = @busy_service_stop_id,
text = "■",
tooltip = "{t('common.stop')}",
)
}
}
}