Sha256: e9a96d1c920e56b4a5e293d34949563354c8876c9c66d8f4468406a059cbdf0c

Contents?: true

Size: 749 Bytes

Versions: 2

Compression:

Stored size: 749 Bytes

Contents

json.labels(@polling_time.map {|v| v[:timestamp].strftime('%B %d. %H:%M')})
json.datasets do
  json.array! [
    {
      label: 'Average',
      data: @polling_time.map {|v| (v[:avg] * 1000).to_i},
      borderColor: '#96C0CE',
      backgroundColor: 'rgba(171,221,235,0.5)',
      fill: false,
      type: 'line'
    },
    {
      label: 'Minimum',
      data: @polling_time.map {|v| (v[:min] * 1000).to_i},
      borderColor: '#32b643',
      backgroundColor: 'rgba(50,182,67,0.5)',
      fill: false,
      type: 'line'
    },
    {
      label: 'Maximum',
      data: @polling_time.map {|v| (v[:max] * 1000).to_i},
      borderColor: '#ffd59c',
      backgroundColor: 'rgba(255,213,156,0.5)',
      fill: false,
      type: 'line'
    }
  ]
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aeternitas_web_ui-0.2.1 app/views/aeternitas/web_ui/pollables/execution_time.json.jbuilder
aeternitas_web_ui-0.2.0 app/views/aeternitas/web_ui/pollables/execution_time.json.jbuilder