Class: Watobo::Gui::ScanProgressFrame
- Inherits:
-
FXVerticalFrame
- Object
- FXVerticalFrame
- Watobo::Gui::ScanProgressFrame
- Includes:
- Icons
- Defined in:
- lib/watobo/gui/dashboard.rb
Constant Summary
Constants included from Icons
Icons::ICON_ADD_PROJECT, Icons::ICON_BROWSER_MEDIUM, Icons::ICON_BROWSER_SMALL, Icons::ICON_BTN_DOWN, Icons::ICON_BTN_UP, Icons::ICON_CB_CHECKED, Icons::ICON_CB_CHECKED_ORANGE, Icons::ICON_CB_UNCHECKED, Icons::ICON_CONVERSATION, Icons::ICON_DASHBOARD, Icons::ICON_DIFFER, Icons::ICON_FOLDER, Icons::ICON_FOLDER_SMALL, Icons::ICON_FUZZER, Icons::ICON_FUZZER_MEDIUM, Icons::ICON_FUZZER_SMALL, Icons::ICON_FUZZ_FILTER, Icons::ICON_FUZZ_GENERATOR, Icons::ICON_FUZZ_TAG, Icons::ICON_HINTS, Icons::ICON_HINTS_INFO, Icons::ICON_HINTS_INFO_SMALL, Icons::ICON_HINTS_SMALL, Icons::ICON_INFO, Icons::ICON_INFO_INFO, Icons::ICON_INFO_INFO_SMALL, Icons::ICON_INFO_SMALL, Icons::ICON_INFO_USER, Icons::ICON_INFO_USER_SMALL, Icons::ICON_INTERCEPTOR, Icons::ICON_LOGIN_WIZZARD, Icons::ICON_MANUAL_REQUEST, Icons::ICON_MANUAL_REQUEST_MEDIUM, Icons::ICON_MANUAL_REQUEST_SMALL, Icons::ICON_PAUSE, Icons::ICON_PLUGIN, Icons::ICON_PROJECT, Icons::ICON_PROJECT_SMALL, Icons::ICON_REPORT, Icons::ICON_REQUEST, Icons::ICON_REQUEST_SMALL, Icons::ICON_SEND_REQUEST, Icons::ICON_SITE, Icons::ICON_SITE_SMALL, Icons::ICON_START, Icons::ICON_STOP, Icons::ICON_TOKEN, Icons::ICON_TRANSCODER, Icons::ICON_VULN, Icons::ICON_VULN_BP, Icons::ICON_VULN_BP_SMALL, Icons::ICON_VULN_CRITICAL, Icons::ICON_VULN_CRITICAL_SMALL, Icons::ICON_VULN_HIGH, Icons::ICON_VULN_HIGH_SMALL, Icons::ICON_VULN_LOW, Icons::ICON_VULN_LOW_SMALL, Icons::ICON_VULN_MEDIUM, Icons::ICON_VULN_MEDIUM_SMALL, Icons::ICON_VULN_SMALL, Icons::ICON_WATOBO, Icons::SIBERAS_ICON, Icons::TBL_ICON_LOCK, Icons::WATOBO_LOGO
Instance Attribute Summary collapse
-
#progress_bars ⇒ Object
readonly
Returns the value of attribute progress_bars.
-
#scan_status ⇒ Object
readonly
Returns the value of attribute scan_status.
Instance Method Summary collapse
-
#initialize(owner, opts) ⇒ ScanProgressFrame
constructor
A new instance of ScanProgressFrame.
- #setup(modules = []) ⇒ Object
Constructor Details
#initialize(owner, opts) ⇒ ScanProgressFrame
Returns a new instance of ScanProgressFrame.
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/watobo/gui/dashboard.rb', line 116 def initialize(owner, opts) super(owner, opts) # frame = FXScrollWindow.new(self, SCROLLERS_NORMAL|LAYOUT_FILL_X|LAYOUT_FILL_Y) frame = FXScrollWindow.new(self, SCROLLERS_NORMAL|LAYOUT_FILL_X|LAYOUT_FILL_Y) info_container = FXVerticalFrame.new(frame, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y) frame = FXHorizontalFrame.new(info_container, :opts => LAYOUT_FILL_X) FXLabel.new(frame, "Scan-Status:") @scan_status = FXLabel.new(frame, "N/A") @progress_frame = FXVerticalFrame.new(info_container, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0) #FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0) #FXLabel.new(@main, "No Information Available") @progress_bars = Hash.new end |
Instance Attribute Details
#progress_bars ⇒ Object (readonly)
Returns the value of attribute progress_bars.
89 90 91 |
# File 'lib/watobo/gui/dashboard.rb', line 89 def @progress_bars end |
#scan_status ⇒ Object (readonly)
Returns the value of attribute scan_status.
90 91 92 |
# File 'lib/watobo/gui/dashboard.rb', line 90 def scan_status @scan_status end |
Instance Method Details
#setup(modules = []) ⇒ Object
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/watobo/gui/dashboard.rb', line 94 def setup(modules=[]) @progress_bars.clear @progress_frame.each_child do |child| @progress_frame.removeChild(child) end #@progress_bars = Hash.new modules.each do |check_name, num_checks| puts "* new ProgressInfo: #{check_name} - #{num_checks}" pi = ProgressInfo.new(@progress_frame, check_name, num_checks[:total]) pi.create @progress_bars[check_name] = pi end @progress_frame.recalc @progress_frame.update end |