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.



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
175
176
177
# File 'lib/watobo/gui/dashboard.rb', line 132

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 ActiveChecks:")
   @number_active_checks = FXLabel.new(frame,"-")

   frame = FXHorizontalFrame.new(self, :opts => LAYOUT_FILL_X)
   FXLabel.new(frame, "Number of PassiveChecks:")
   @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

#update(project) ⇒ Object



118
119
120
121
122
123
124
125
126
127
128
129
130
# File 'lib/watobo/gui/dashboard.rb', line 118

def update(project)
   if project then
      @project_name.text = project.settings[:project_name]
      @session_name.text = project.settings[:session_name]
      @project_path.text = project.settings[:project_path]
      @session_path.text = project.settings[:session_path]

      @number_active_checks.text = project.active_checks.length.to_s
      @number_passive_checks = project.passive_checks.length.to_s
      @number_total_chats.text = project.chats.length.to_s
   end

end