Sha256: c1341ed3a758c7b5c0b00caec54dc7202de876964dd4c1a00d56268f4171a536

Contents?: true

Size: 898 Bytes

Versions: 2

Compression:

Stored size: 898 Bytes

Contents

-# coding: utf-8

- unless $pool.is_a? RestFtpDaemon::WorkerPool
  - log_error "Dashboard: invalid WorkerPool"
- variables = $pool.worker_variables

%h2 Worker status

%table.table.table-striped.table-hover.table-condensed

  %thead
    %tr
      %th worker
      %th pool
      %th status
      %th job
      %th.text-right seen

  %tbody
    - variables.each do |wid, vars|
      - status = vars[:status]
      - alive = $pool.worker_alive? wid
      - trclass = WORKER_STYLES[status]

      - unless alive
        - trclass = "danger"
        - status = "DEAD"

      %tr{class: trclass.to_s}
        %td= wid
        %td= vars[:pool]
        %td= status
        %td= vars[:jid]
        %td.text-right

          - if vars[:updated_at].is_a? Time
            - no_news_for = (Time.now - vars[:updated_at]).round(0)
            = formatted_duration no_news_for
          - else
            = "?"

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rest-ftp-daemon-0.306.1 lib/rest-ftp-daemon/views/dashboard_workers.haml
rest-ftp-daemon-0.306.0 lib/rest-ftp-daemon/views/dashboard_workers.haml