Sha256: be4a4990b5351c22dc127d78a0ddffe104b6c55e8c7ac40d14000bab73a1cbef

Contents?: true

Size: 1.99 KB

Versions: 7

Compression:

Stored size: 1.99 KB

Contents

- jobs.each do |job|
  - progress = job.get :progress
  - source_count = job.get(:source_count) || 0
  - source_processed = job.get(:source_processed) || 0
  - source_current = job.get(:source_current)
  - presented = present job, :with => RestFtpDaemon::API::Entities::JobPresenter, hide_params: true
  - bitrate = job.get :transfer_bitrate

  - trclass = JOB_STYLES[job.status]

  - unless job.error.nil?
    - trclass = "warning"

  %tr{class: trclass.to_s}

    %td{title: presented.to_json}
      %b= job.id

    %td= job.label

    %td{title: job.get(:source_path)}
      = Helpers.highlight_tokens job.source

    %td
      = Helpers.job_method_label (job.get :target_method)

    %td{title: job.get(:target_url)}
      = Helpers.highlight_tokens job.target

    %td
      = Helpers.datetime_short(job.queued_at)

    %td
      %span.push-status
        = job.status

      - if (job.status != JOB_STATUS_FINISHED) && (source_processed < source_count)
        = " (#{source_processed}/#{source_count})"

      - if job.status == JOB_STATUS_UPLOADING

        - unless progress.nil?
          %span.push-progress
            = "#{progress}%"
        %br
        %span.push-filename
          %b= source_current unless source_current.nil?

    %td
      - unless job.error || job.status == JOB_STATUS_FINISHED
        .progress
          .progress-bar{style:"width: #{progress}%;"}
            =# "#{progress}%" unless progress.nil?
            = Helpers.format_bytes(job.get(:transfer_sent), "B")

      - else
        .error{title: job.get(:error_message)}
          = Helpers.text_or_empty(job.error)

    %td.nobr.text-right
      = Helpers.format_bytes(job.get(:transfer_total), "B")

    %td.nobr.text-right{title: "time: #{job.exectime} s"}
      - if bitrate
        %span.push-bitrate
          = Helpers.format_bytes(bitrate, "bps")

    %td
      - unless job.priority.nil?
        .label.label-default.flag.worker-label= job.priority

      - unless job.wid.nil?
        .label.label-warning.flag.worker-label= job.wid


Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rest-ftp-daemon-0.220.4 lib/rest-ftp-daemon/views/dashboard_table.haml
rest-ftp-daemon-0.220.3 lib/rest-ftp-daemon/views/dashboard_table.haml
rest-ftp-daemon-0.220.1 lib/rest-ftp-daemon/views/dashboard_table.haml
rest-ftp-daemon-0.220.0 lib/rest-ftp-daemon/views/dashboard_table.haml
rest-ftp-daemon-0.214.0 lib/rest-ftp-daemon/views/dashboard_table.haml
rest-ftp-daemon-0.213.0 lib/rest-ftp-daemon/views/dashboard_table.haml
rest-ftp-daemon-0.212.0 lib/rest-ftp-daemon/views/dashboard_table.haml