rustploy-gui 0.1.53

Rustploy — desktop client (glacier-ui) for the Rustploy PaaS daemon
// Deployments
component {
  resources {
    component(name = SemDeploysDoServico) {
      text("{t('deployments.no_deploy_yet')}", class = u-muted)
    }
  }

  column(class = deployments__wrap) {
    // Webhook de deploy: servido pelo MESMO listener da API (base
    // derivada de [api] domain/port). Compose não tem webhook.
    column(
      if = @service_webhook_supported,
      equals = true,
      class = form-panel,
    ) {
      text("{t('common.deploy_webhook')}", class = u-label-cap)

      column(if = @service_webhook_url, not_equals = "", class = webhook) {
        text(
          "@service_webhook_url_short",
          class = webhook__url,
          tooltip = @service_webhook_url,
        )

        row(class = webhook__actions) {
          button(
            class = "btn btn--ghost btn--xs",
            on_click = copy_ctx:service_webhook_url,
            text = "{t('common.copy')}",
          )

          button(
            class = "btn btn--danger btn--xs",
            on_click = regenerate_webhook,
            disabled = @busy_regenerate_webhook,
            text = "{t('deployments.regenerate')}",
          )
        }
      }

      text(
        "{t('deployments.the_token_is_born_on_this')}",
        if = @service_webhook_url,
        equals = "",
        class = u-muted,
      )

      text(
        "{t('deployments.a_post_to_this_url_triggers')}",
        class = u-muted,
      )
    }

    text("{t('deployments.deployments', service_deployments_count=service_deployments_count)}", class = u-muted)

    scrollable(direction = vertical, class = deployments__list-scroll) {
      column(class = u-fill) {
        each @service_deployments as d (fallback = SemDeploysDoServico) {
          column(class = u-fill) {
            row(class = table__row) {
              text("@d.id", class = "table__cell table__cell--key table__col-dep-id")
              StateCell(kind = @d.state_kind, label = @d.state_label)
              text("@d.duration", class = "table__cell table__col-dur")
              text("@d.start", class = "u-muted table__col-dep-start")

              row(class = deployments__actions) {
                button(
                  class = "btn btn--ghost btn--xs",
                  on_click = deployment_logs:@d.id_full,
                  disabled = @busy_deployment_logs,
                  text = "≡",
                  tooltip = "{t('deployments.view_build_log')}",
                )

                button(
                  if = @d.can_delete,
                  equals = 1,
                  class = "btn btn--danger btn--xs",
                  on_click = delete_deployment:@d.id_full,
                  disabled = @busy_delete_deployment,
                  text = "✕",
                  tooltip = "{t('deployments.remove_deployment')}",
                )
              }
            }

            text("@d.image", class = deployments__image)
            hr
          }
        }
      }
    }
  }
}