Sha256: ec7d32f5eab354474f3a7092536151aedb88f5f98de67c73b66616816df107e4

Contents?: true

Size: 1 KB

Versions: 4

Compression:

Stored size: 1 KB

Contents

-# coding: utf-8
- info_procs = (Facter.value :processorcount).to_i
- info_load = Sys::CPU.load_avg.first.to_f
- info_norm = info_procs.zero? ? "N/A" : (100 * info_load / info_procs).round(1)
- info_trans = $counters.get :data, :transferred
- info_processed = $counters.get :jobs, :processed
- mem = GetProcessMem.new


.navbar-header

  %h1
    = Conf.app_name
    %small
      = "v#{Conf.app_ver} [#{Conf.app_env}]"


.header-indicators.navbar-header.pull-right

  .btn-group.btn-group-sm
    .btn.btn-default.btn-warning Load
    .btn.btn-default= info_load.round(1)

  .btn-group.btn-group-sm
    .btn.btn-default.btn-warning CPU
    .btn.btn-default= "#{info_norm} %"

  .btn-group.btn-group-sm
    .btn.btn-default.btn-warning Mem
    .btn.btn-default= format_bytes(mem.bytes, "B")

  .btn-group.btn-group-sm
    .btn.btn-default.btn-success Processed
    .btn.btn-default= info_processed.to_i

  .btn-group.btn-group-sm
    .btn.btn-default.btn-success Transferred
    .btn.btn-default= format_bytes(info_trans, "B", 1)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rest-ftp-daemon-0.306.4 lib/rest-ftp-daemon/views/dashboard_header.haml
rest-ftp-daemon-0.306.3 lib/rest-ftp-daemon/views/dashboard_header.haml
rest-ftp-daemon-0.306.1 lib/rest-ftp-daemon/views/dashboard_header.haml
rest-ftp-daemon-0.306.0 lib/rest-ftp-daemon/views/dashboard_header.haml