rustploy-gui 0.1.54

Rustploy — desktop client (glacier-ui) for the Rustploy PaaS daemon
// Seção `ingress` (view = ingress) das telas globais; importada por home.component.gv.
component {
  resources {
    component(name = SemPortasDeHost) {
      text(
        "{t('ingress.no_service_has_a_host')}",
        class = u-muted,
      )
    }
  }

  row(class = page-head) {
    column(class = page-head__titles) {
      text("{t('common.ingress')}", class = page-head__title)

      text(
        "{t('ingress.active_routes_in_the_reverse')}",
        class = page-head__subtitle,
      )
    }

    row(class = page-head__stats) {
      StatCard(
        label = "{t('ingress.routes')}",
        value = @ingress_count
      )
      StatCard(
        label = "{t('ingress.host_ports')}",
        value = @host_ports_count
      )
    }
  }

  column(class = "panel panel--fill") {
    tableview(
      :items = ingress,
      :sort = ingress_sort,
      var = i,
      header_class = "table__head table__head-cell",
      row_class = "table__row table__cell table__row--divided",
      class = u-fill-all,
    ) {
      tablecolumn(
        key = domain,
        label = "{t('ingress.domain')}",
        class = table__col-svc
      ) {
        text("@i.domain", class = "table__cell table__cell--key")
      }

      tablecolumn(
        key = service,
        label = "{t('common.service')}",
        class = table__col-proj
      ) {
        TableLink(kind = service, id = @i.service_id, label = @i.service)
      }

      tablecolumn(
        key = upstream,
        label = "{t('ingress.upstream')}",
        class = table__col-dur
      )

      tablecolumn(
        key = tls,
        label = "{t('common.tls')}",
        class = table__col-start
      ) {
        text("@i.tls", class = u-muted)
      }

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

    text(
      "{t('ingress.host_tcp_ports', host_ports_count=host_ports_count)}",
      class = u-label-cap,
    )

    // Sem `height`: a lista é curta e cresce com a página, sem rolagem própria.
    tableview(
      :items = host_ports,
      :sort = host_ports_sort,
      var = hp,
      header_class = "table__head table__head-cell",
      row_class = "table__row table__cell table__row--divided",
      width = fill,
    ) {
      tablecolumn(
        key = service,
        label = "{t('common.service')}",
        class = table__col-svc
      ) {
        TableLink(
          kind = service,
          id = @hp.service_id,
          label = @hp.service
        )
      }

      tablecolumn(
        key = project,
        label = "{t('common.project')}",
        class = table__col-proj
      ) {
        TableLink(
          kind = project,
          id = @hp.project_id,
          label = @hp.project
        )
      }

      tablecolumn(
        key = host_port,
        label = "{t('ingress.host_port')}",
        class = table__col-dur
      )

      tablecolumn(
        key = container_port,
        label = "{t('ingress.container_port')}",
        class = table__col-start,
      ) {
        text("@hp.container_port", class = u-muted)
      }

      SemPortasDeHost
    }
  }
}