RT# 78356 - updated documentation and added ability to create access points as Saisei...
[freeside.git] / FS / FS / tower_sector.pm
index 2b0efa3..524fcec 100644 (file)
@@ -1,14 +1,16 @@
 package FS::tower_sector;
 
-use Class::Load qw(load_class);
-use File::Path qw(make_path);
-use Data::Dumper;
-
 use strict;
 use base qw( FS::Record );
 use FS::Record qw( qsearch qsearchs );
 use FS::tower;
 use FS::svc_broadband;
+use Class::Load qw(load_class);
+use File::Path qw(make_path);
+use Data::Dumper;
+use Storable qw(thaw);
+use MIME::Base64 qw(decode_base64);
+
 
 =head1 NAME
 
@@ -91,6 +93,18 @@ The coverage map, as a PNG.
 
 The coordinate boundaries of the coverage map.
 
+=item title
+
+The sector title.
+
+=item up_rate
+
+Up rate for sector.
+
+=item down_rate
+
+down rate for sector.
+
 =back
 
 =head1 METHODS
@@ -153,6 +167,8 @@ sub check {
     || $self->ut_numbern('downtilt')
     || $self->ut_floatn('sector_range')
     || $self->ut_numbern('margin')
+    || $self->ut_numbern('up_rate')
+    || $self->ut_numbern('down_rate')
     || $self->ut_anything('image')
     || $self->ut_sfloatn('west')
     || $self->ut_sfloatn('east')
@@ -271,6 +287,9 @@ PARAMS must include 'sectornum'.
 sub process_generate_coverage {
   my $job = shift;
   my $param = shift;
+  if (!ref($param)) {
+    $param = thaw(decode_base64($param));
+  }
   $job->update_statustext('0,generating map') if $job;
   my $sectornum = $param->{sectornum};
   my $sector = FS::tower_sector->by_key($sectornum)