Revision 4c091cd8
Added by Ohad Levy over 12 years ago
- ID 4c091cd8bfb4efbdc116743109c0a30de2f97d90
app/controllers/subnets_controller.rb | ||
---|---|---|
head :status => 500
|
||
end
|
||
|
||
def import
|
||
proxy = SmartProxy.find(params[:smart_proxy_id])
|
||
@subnets = Subnet.import(proxy)
|
||
if @subnets.empty?
|
||
redirect_to :subnets, :notice => "No new subnets found"
|
||
end
|
||
end
|
||
|
||
def create_multiple
|
||
@subnets = Subnet.create(params[:subnets]).reject { |s| s.errors.empty? }
|
||
if @subnets.empty?
|
||
process_success(:object => @subnets, :success_msg => "Imported Subnets")
|
||
else
|
||
render :action => "import"
|
||
end
|
||
end
|
||
|
||
end
|
Also available in: Unified diff
fixes #1201 - Import Subnets from DHCP server