rustploy-gui 0.1.21

Rustploy — desktop client (glacier-ui) for the Rustploy PaaS daemon
// Containers — um por serviço gerido pelo Rustploy (ligação com
// projeto/serviço é direta, já que o container nasce de um Service).
component {
  resources {
    component(name = SemContainersDocker) {
      text(class = u-muted, content = "Nenhum container.")
    }
  }

  column(class = "panel panel--fill") {
    row(class = env__head) {
      text(
        class = "u-muted u-fill",
        content = "@docker_containers_count container(s)",
      )

      button(
        class = "btn btn--danger",
        on_click = docker_prune_containers,
        disabled = @busy_docker_prune_containers,
        text = "Limpar parados",
      )
    }

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

    tableview(
      :items = docker_containers,
      :sort = docker_containers_sort,
      var = c,
      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 = "@c.name")
      }

      tablecolumn(key = image, label = IMAGEM, class = table__col-img)

      tablecolumn(key = owner, label = DONO, class = table__col-state) {
        text(class = u-muted, content = "@c.owner")
      }

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

      tablecolumn(label = "AÇÃO", class = table__col-act) {
        button(
          if = @c.can_remove,
          equals = 1,
          class = "btn btn--danger btn--xs",
          on_click = docker_remove_container:@c.id_full,
          disabled = @busy_docker_remove_container,
          text = Remover,
        )
      }

      // Sem linha nenhuma: o "carregando" do primeiro snapshot, ou o vazio.
      if @data_loading == "true" {
        LoadingRow
      } else {
        SemContainersDocker
      }
    }
  }
}