rustploy-gui 0.1.12

Rustploy — desktop client (glacier-ui) for the Rustploy PaaS daemon
// Seção `schedules` (view = schedules) das telas globais; importada por home.gvb.
component {
  resources {
    component(name = SemJobs) {
      text(class = u-muted, content = "Nenhum job cadastrado ainda.")
    }
  }

  row(class = page-head) {
    column(class = page-head__titles) {
      text(class = page-head__title, content = "Schedules")

      text(
        class = page-head__subtitle,
        content = """
          Tarefas one-shot (docker-compose) agendadas ou manuais, de todos
          os projetos.
        """,
      )
    }

    row(class = "page-head__stats page-head__stats--hide-md") {
      StatCard(label = JOBS, value = @jobs_count)
    }

    button(
      class = "btn btn--primary",
      on_click = open_new_job_window,
      disabled = @busy_open_new_job_window,
      text = "+ Novo job",
    )
  }

  column(class = "panel panel--fill") {
    tableview(
      :items = jobs_summary,
      :sort = jobs_sort,
      var = j,
      header_class = "table__head table__head-cell",
      row_class = "table__row table__cell table__row--divided",
      class = u-fill-all,
    ) {
      tablecolumn(key = name, label = NOME, class = table__col-svc) {
        text(class = "table__cell table__cell--key", content = "@j.name")
      }

      tablecolumn(key = owner, label = "PROJETO / GATILHO", class = table__col-proj)

      tablecolumn(
        key = last_run_label,
        label = "ÚLTIMA EXECUÇÃO",
        class = table__col-state,
      ) {
        StateCell(kind = @j.last_run_kind, label = @j.last_run_label)
      }

      tablecolumn(key = recurrence, label = "RECORRÊNCIA", class = table__col-dur) {
        text(class = u-muted, content = "@j.recurrence")
      }

      tablecolumn(
        key = next_run_at,
        label = "PRÓXIMA EXECUÇÃO",
        class = table__col-dur,
      ) {
        text(class = u-muted, content = "@j.next_run_at")
      }

      tablecolumn(label = AQUECIMENTO, class = table__col-state) {
        StateCell(kind = @j.warm_kind, label = @j.warm_label)
      }

      tablecolumn(label = "AÇÕES", class = table__col-act-2, align = right) {
        row(class = table__col-act-2) {
          JobActions(
            job_id = @j.id,
            job_name = @j.name_full,
            running = @j.running,
            enabled = @j.enabled,
            enabled_label = @j.enabled_label,
            last_run_id = @j.last_run_id,
            is_warm = @j.is_warm,
            is_warming = @j.is_warming,
            warm_kind = @j.warm_kind,
            warm_label = @j.warm_label,
            warm_reason = @j.warm_reason,
            warmed_at_label = @j.warmed_at_label,
          )
        }
      }

      SemJobs
    }
  }
}