// Seção `schedules` (view = schedules) das telas globais; importada por home.gvb.
component {
resources {
component(name = SemJobs) {
text(class = muted, content = "Nenhum job cadastrado ainda.")
}
}
row(class = header_row) {
column(class = header_titles) {
text(class = title, content = "Schedules")
text(
class = subtitle,
content = """
Tarefas one-shot (docker-compose) agendadas ou manuais, de todos
os projetos.
""",
)
}
row(class = "stats_row stats_hide_md") {
StatCard(label = JOBS, value = @jobs_count)
}
button(
class = btn_primary,
on_click = open_new_job_window,
text = "+ Novo job",
)
}
column(class = panel_fill) {
row(class = thead) {
text(class = "th col_svc", content = "NOME")
text(class = "th col_proj", content = "PROJETO / GATILHO")
text(class = "th col_state", content = "ÚLTIMA EXECUÇÃO")
text(class = "th col_dur", content = "RECORRÊNCIA")
text(class = "th col_dur", content = "PRÓXIMA EXECUÇÃO")
text(class = "th col_act_5", content = "AÇÕES")
}
scrollable(direction = vertical, class = scroll_fill) {
column(class = table_body) {
template(
:for-each = jobs_summary,
var = j,
foreach_fallback = SemJobs,
) {
column(class = row_wrap) {
row(class = trow) {
text(class = "td_key col_svc", content = "@j.name")
text(class = "td col_proj", content = "@j.owner")
StateCell(kind = @j.last_run_kind, label = @j.last_run_label)
text(class = "muted col_dur", content = "@j.recurrence")
text(class = "muted col_dur", content = "@j.next_run_at")
row(class = col_act_5) {
button(
class = copy_btn,
if = @j.running,
not_equals = true,
on_click = job_run_now:@j.id,
text = "▶",
tooltip = "Rodar agora",
)
button(
class = env_del,
if = @j.running,
equals = true,
on_click = job_run_cancel:@j.last_run_id,
text = "■",
tooltip = Cancelar,
)
button(
class = copy_btn,
if = @j.last_run_id,
not_equals = "",
on_click = open_job_logs_window:@j.last_run_id,
text = "≡",
tooltip = "Ver logs",
)
button(
class = copy_btn,
if = @j.enabled,
equals = true,
on_click = job_toggle:@j.id,
text = "‖",
tooltip = Pausar,
)
button(
class = copy_btn,
if = @j.enabled,
not_equals = true,
on_click = job_toggle:@j.id,
text = "▶",
tooltip = Ativar,
)
button(
class = copy_btn,
on_click = open_edit_job_window:@j.id,
text = "✎",
tooltip = Editar,
)
button(
class = env_del,
on_click = job_del:@j.id,
text = "✕",
tooltip = Remover,
)
}
}
hr
}
}
}
}
}
}