Class: Watobo::Gui::ProjectInfo

Inherits:
FXVerticalFrame
  • Object
show all
Defined in:
lib/watobo/gui/dashboard.rb

Instance Method Summary collapse

Constructor Details

#initialize(owner, opts) ⇒ ProjectInfo

Returns a new instance of ProjectInfo.



129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/watobo/gui/dashboard.rb', line 129

def initialize(owner, opts)
  super(owner, opts)
  frame = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X)
  FXLabel.new(frame, "Project:")
  @project_name = FXLabel.new(frame, "-")

  frame = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X)
  FXLabel.new(frame, "Session:")
  @session_name = FXLabel.new(frame, "-")

  frame = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X)
  FXLabel.new(frame, "Project Path:")
  @project_path = FXLabel.new(frame, "-")

  frame = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X)
  FXLabel.new(frame, "Session Path:")
  @session_path = FXLabel.new(frame, "-")

  frame = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X)
  FXLabel.new(frame, "Number available ActiveModules:")
  @number_active_checks = FXLabel.new(frame, "-")

  frame = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X)
  FXLabel.new(frame, "Number of PassiveModules:")
  @number_passive_checks = FXLabel.new(frame, "-")

  frame = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X)
  FXLabel.new(frame, "Number Current Chats:")
  @number_total_chats = FXLabel.new(frame, "-")

  #  frame = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X)
  #  FXLabel.new(frame, "Number Critical Findings:")
  #  @number_critical_findings = FXLabel.new(frame,"-")

  #  frame = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X)
  #  FXLabel.new(frame, "Number High Findings:")
  #  @number_high_findings = FXLabel.new(frame,"-")

  #  frame = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X)
  #  FXLabel.new(frame, "Number Medium Findings:")
  #  @number_medium_findings = FXLabel.new(frame,"-")

  #  frame = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X)
  #  FXLabel.new(frame, "Number Low Findings:")
  #  @number_low_findings = FXLabel.new(frame,"-")
end

Instance Method Details

#updateObject



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/watobo/gui/dashboard.rb', line 113

def update()
  if Watobo.project then

    @project_name.text = Watobo.project.settings[:project_name]
    @session_name.text = Watobo.project.settings[:session_name]
    @project_path.text = Watobo.project.settings[:project_path]
    @session_path.text = Watobo.project.settings[:session_path]

    @number_active_checks.text = Watobo::ActiveModules.length.to_s
    @number_passive_checks = Watobo::PassiveModules.length.to_s
    @number_total_chats.text = Watobo::Chats.length.to_s
  end


end