Class: Watobo::Gui::RequestRulesCtrl

Inherits:
RulesTableCtrl
  • Object
show all
Defined in:
lib/watobo/gui/rewrite_rules_dialog.rb

Instance Attribute Summary

Attributes inherited from RulesTableCtrl

#target

Instance Method Summary collapse

Constructor Details

#initialize(owner, target, opts) ⇒ RequestRulesCtrl

Returns a new instance of RequestRulesCtrl.



107
108
109
110
111
112
113
114
115
116
117
# File 'lib/watobo/gui/rewrite_rules_dialog.rb', line 107

def initialize(owner, target, opts)
  super owner, target, opts
  add_action :rewrite
  add_action :flag
  add_location :url
  add_location :body
  add_location :header
  add_location :cookie
  add_location :http_parm
  
end

Instance Method Details

#open_filter_dialogObject



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

def open_filter_dialog
   rule = @target.current_rule
  return false if rule.nil?
  dlg = Watobo::Gui::RequestFilterDialog.new( self, rule )
  if dlg.execute != 0 then
  # TODO: Apply interceptor settings
  rule.set_filter dlg.filter
  @target.reset_table
  
  end
end