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.


128
129
130
131
132
133
134
135
136
137
138
# File 'lib/watobo/gui/rewrite_rules_dialog.rb', line 128

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


140
141
142
143
144
145
146
147
148
149
150
# File 'lib/watobo/gui/rewrite_rules_dialog.rb', line 140

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