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.



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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/watobo/gui/dashboard.rb', line 148

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



134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/watobo/gui/dashboard.rb', line 134

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