From 1d50ab91a52be49724771accae7cc82740e83956 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 21 Apr 2016 12:07:29 -0700 Subject: generate sector coverage maps with Splat, checkpoint, #37802 --- httemplate/edit/process/tower.html | 1 + httemplate/edit/tower.html | 2 +- httemplate/elements/tower_sector.html | 5 +- httemplate/misc/sector-create_map.html | 10 ++++ httemplate/search/elements/gmap.html | 19 +++++++ httemplate/search/sector.html | 85 ++++++++++++++++++++++++++++++++ httemplate/search/svc_broadband-map.html | 16 +++++- httemplate/view/sector_map-png.cgi | 8 +++ 8 files changed, 142 insertions(+), 4 deletions(-) create mode 100644 httemplate/misc/sector-create_map.html create mode 100644 httemplate/search/sector.html create mode 100644 httemplate/view/sector_map-png.cgi (limited to 'httemplate') diff --git a/httemplate/edit/process/tower.html b/httemplate/edit/process/tower.html index 02362db6a..d14ac56f8 100644 --- a/httemplate/edit/process/tower.html +++ b/httemplate/edit/process/tower.html @@ -4,6 +4,7 @@ process_o2m => { 'table' => 'tower_sector', 'fields' => [qw( sectorname ip_addr height freq_mhz direction width + downtilt v_width margin sector_range )], }, diff --git a/httemplate/edit/tower.html b/httemplate/edit/tower.html index 4d8ad1e89..377a33e9b 100644 --- a/httemplate/edit/tower.html +++ b/httemplate/edit/tower.html @@ -38,7 +38,7 @@ my $m2_error_callback = sub { # reconstruct the list my ($cgi, $object) = @_; my @fields = qw( - sectorname ip_addr height freq_mhz direction width sector_range + sectorname ip_addr height freq_mhz direction width tilt v_width margin sector_range ); map { diff --git a/httemplate/elements/tower_sector.html b/httemplate/elements/tower_sector.html index 151d3ba65..987177582 100644 --- a/httemplate/elements/tower_sector.html +++ b/httemplate/elements/tower_sector.html @@ -56,8 +56,11 @@ tie my %label, 'Tie::IxHash', 'height' => 'Height', 'freq_mhz' => 'Freq. (MHz)', 'direction' => 'Direction', # or a button to set these to 0 for omni - 'width' => 'Width', # + 'downtilt' => 'Downtilt', + 'width' => 'Horiz. width', + 'v_width' => 'Vert. width', 'sector_range' => 'Range', + 'margin' => 'Signal margin (dB)', ; my @fields = keys %label; diff --git a/httemplate/misc/sector-create_map.html b/httemplate/misc/sector-create_map.html new file mode 100644 index 000000000..6af5fddbe --- /dev/null +++ b/httemplate/misc/sector-create_map.html @@ -0,0 +1,10 @@ +<% $server->process %> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); # ??? + +my $server = + new FS::UI::Web::JSRPC 'FS::tower_sector::process_generate_coverage', $cgi; + + diff --git a/httemplate/search/elements/gmap.html b/httemplate/search/elements/gmap.html index 8b070ebf9..632a32338 100644 --- a/httemplate/search/elements/gmap.html +++ b/httemplate/search/elements/gmap.html @@ -1,5 +1,6 @@ <%args> @features +@overlays <%doc> Generic Google Maps front end. @@ -24,6 +25,14 @@ Generic Google Maps front end. } }, # end of feature ], + overlays => [ + { url => 'https://localhost/freeside/view/sector_overlay-png.html?102', + west => -130.0, + east => -128.0, + south => 10.0, + north => 12.0, + }, # make a ground overlay + ], &> @@ -54,6 +63,7 @@ body { height: 100%; margin: 0px; padding: 0px }