Class: Opsicle::Monitor::Panels::Help

Inherits:
Opsicle::Monitor::Panel show all
Defined in:
lib/opsicle/monitor/panels/help.rb

Instance Attribute Summary

Attributes inherited from Opsicle::Monitor::Panel

#divider_length, #dividers, #height, #left, #top, #width

Instance Method Summary collapse

Methods inherited from Opsicle::Monitor::Panel

#close, #refresh, #refresh_spies

Methods included from Translatable

#translate

Constructor Details

#initialize(height, width, top, left) ⇒ Help

Returns a new instance of Help.



6
7
8
# File 'lib/opsicle/monitor/panels/help.rb', line 6

def initialize(height, width, top, left)
  super(height, width, top, left, structure(height), :divider_r => " ")
end

Instance Method Details

#structure(height) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/opsicle/monitor/panels/help.rb', line 10

def structure(height)
  # [
  #   [relative_column_width, data_left, data_right]
  # ]
  s = [
    [
      [1, "'h' : Show this help screen", nil],
    ],
    [
      [1, "'d' : Show deployment list on this OpsWorks stack", nil],
    ],
    [
      [1, "'i' : Show instance list on this OpsWorks stack", nil],
    ],
    [
      [1, "'b' : Open OpsWorks screen for this stack in your browser", nil],
    ],
    [
      [1, "'q' : Quit", nil],
    ]
  ]
end