Sha256: 0b8e2edb583a9c62315c40665165ff9ad1c6f915cbf4d1a074268be045f29218
Contents?: true
Size: 1.21 KB
Versions: 57
Compression:
Stored size: 1.21 KB
Contents
module Opsicle module Monitor module Panels class Instances < Monitor::Panel def initialize(height, width, top, left) super(height, width, top, left, structure(height), :divider_r => " ") @spies[:instances] = Monitor::Spy::Instances.new end def structure(height) # [ # [relative_column_width, data_left, data_right] # ] s = [ [ # table header slots [1, translate[:heading][:ec2_instance_id], nil], [1, translate[:heading][:hostname], nil], [1, translate[:heading][:status], nil], [1, translate[:heading][:zone], nil], [1, translate[:heading][:ip], nil] ], ] (0...(height - 1)).each do |i| s << [ # table row slots [1, -> { @spies[:instances][i][:ec2_instance_id] }, nil], [1, -> { @spies[:instances][i][:hostname] }, nil], [1, -> { @spies[:instances][i][:status] }, nil], [1, -> { @spies[:instances][i][:zone] }, nil], [1, -> { @spies[:instances][i][:ip] }, nil] ] end s end end end end end
Version data entries
57 entries across 57 versions & 1 rubygems