rustploy-gui 0.1.9

Rustploy — desktop client (glacier-ui) for the Rustploy PaaS daemon
// Lista de deployments (view = deployments); importada por shell.gvb.
component {
  resources {
    component(name = SemDeployments) {
      text(class = u-muted, content = "Nenhum deployment ainda.")
    }
  }

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

        text(
          class = page-head__subtitle,
          content = "Real-time status of services in the cluster.",
        )
      }

      row(class = "page-head__stats page-head__stats--hide-lg") {
        StatCard(label = STATUS, value = @services_label, accent = 1)
        StatCard(label = UPTIME, value = @daemon_uptime)
      }

      // Rótulo por extenso quando cabe; ícone + tooltip abaixo de 860px
      // (alternância no app.gss, como as ações da tela de serviço).
      button(
        class = "btn btn--danger page-head__clear--full",
        on_click = deployments_clear_finished,
        disabled = @busy_deployments_clear_finished,
        text = "Limpar parados/falhos",
      )

      button(
        class = "btn btn--danger page-head__clear--compact",
        on_click = deployments_clear_finished,
        disabled = @busy_deployments_clear_finished,
        text = "✕",
        tooltip = "Limpar parados/falhos",
      )
    }

    text(
      if = @deployments_message,
      not_equals = "",
      class = u-muted,
      content = "@deployments_message",
    )

    column(class = "panel panel--fill") {
      tableview(
        :items = deployments,
        :sort = deployments_sort,
        var = d,
        header_class = "table__head table__head-cell",
        row_class = "table__row table__cell table__row--divided",
        class = u-fill-all,
      ) {
        tablecolumn(key = service, label = "SERVIÇO", class = table__col-svc) {
          text(class = "table__cell table__cell--key", content = "@d.service")
        }

        tablecolumn(key = project, label = PROJETO, class = table__col-proj)

        tablecolumn(key = state_label, label = ESTADO, class = table__col-state) {
          StateCell(kind = @d.state_kind, label = @d.state_label)
        }

        // Sem `key`: "2m 3s" não ordena como texto, e o valor cru não vem.
        tablecolumn(label = "DURAÇÃO", class = table__col-dur) {
          text(class = table__cell, content = "@d.duration")
        }

        tablecolumn(
          key = start,
          sort_key = start_iso,
          label = "INÍCIO",
          class = table__col-start,
        ) {
          text(class = u-muted, content = "@d.start")
        }

        if @data_loading == "true" {
          LoadingRow
        } else {
          SemDeployments
        }
      }
    }
  }
}