1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
<& /elements/header.html, 'Deployment zones' &>
<& /elements/menubar.html,
'Add a new fixed broadband zone' => $p.'edit/deploy_zone-fixed.html',
'Add a new mobile zone' => $p.'edit/deploy_zone-mobile.html',
&>
<P><FONT SIZE="+1"><B>Fixed Broadband Zones</B></FONT></P>
<& elements/browse.html,
name_singular => 'zone',
query => { table => 'deploy_zone',
hashref => { zonetype => 'B' },
},
count_query => "SELECT COUNT(*) FROM deploy_zone WHERE zonetype = 'B'",
agent_virt => 1,
header => [ '#',
'Description',
'Technology',
'Market',
'Advertised Mbps',
'Contractual Mbps',
'Vertices',
'Census blocks',
'Shapefile',
'KMZ',
'GeoJSON',
],
footer => [ '',
'All fixed zones',
'',
'',
'',
'',
'',
'',
'<A HREF="'. $fixed_shp. '">download</A>',
'<A HREF="'. $fixed_kmz. '">download</A>',
'<A HREF="'. $fixed_json. '">download</A>',
],
fields => [ 'zonenum',
'description',
sub { my $self = shift;
$tech_label->{$self->technology} },
sub { my $self = shift;
join( ' / ',
$self->is_consumer ? 'consumer' : (),
$self->is_business ? 'business' : ()
)
},
sub { my $self = shift;
join( ' / ', grep $_,
$self->adv_speed_down,
$self->adv_speed_up
)
},
sub { my $self = shift;
join( ' / ', grep $_,
$self->cir_speed_down,
$self->cir_speed_up
)
},
sub { my $self = shift;
FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
},
sub { my $self = shift;
FS::deploy_zone_block->count('zonenum = '.$self->zonenum)
},
sub { my $self = shift;
FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
? 'download' : ''
},
sub { my $self = shift;
FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
? 'download' : ''
},
sub { my $self = shift;
FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
? 'download' : ''
},
],
sort_fields => [ 'zonenum',
'description',
'technology',
'(is_consumer is not null, is_business is not null)',
'(adv_speed_down, adv_speed_up)',
'(cir_speed_down, cir_speed_up)',
],
links => [ $link_fixed, $link_fixed, '', '', '', '', '', '', $link_shp, $link_kmz, $link_json, ],
align => 'cllllrrr',
nohtmlheader => 1,
disable_maxselect => 1,
disable_total => 1,
disableable => 1,
disabled_statuspos => 2,
&>
<P><FONT SIZE="+1"><B>Mobile Zones</B></FONT></P>
<& elements/browse.html,
name_singular => 'zone',
query => { table => 'deploy_zone',
hashref => { zonetype => 'P' },
},
count_query => "SELECT COUNT(*) FROM deploy_zone WHERE zonetype = 'P'",
agent_virt => 1,
header => [ '#',
'Description',
'Technology',
'Spectrum',
'Service Type',
'Advertised Mbps',
'Vertices', # number of vertices? not so useful
'Shapefile',
'KMZ',
'GeoJSON',
],
fields => [ 'zonenum',
'description',
sub { my $self = shift;
$tech_label->{$self->technology} },
sub { my $self = shift;
$spec_label->{$self->spectrum} },
sub { my $self = shift;
join( ' / ',
$self->is_voice ? 'voice' : (),
$self->is_broadband ? 'broadband' : (),
)
},
sub { my $self = shift;
join( ' / ', grep $_,
$self->adv_speed_down,
$self->adv_speed_up
)
},
sub { my $self = shift;
FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
},
sub { my $self = shift;
FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
? 'download' : ''
},
sub { my $self = shift;
FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
? 'download' : ''
},
sub { my $self = shift;
FS::deploy_zone_vertex->count('zonenum = '.$self->zonenum)
? 'download' : ''
},
],
sort_fields => [ 'zonenum',
'description',
'technology',
'spectrum',
'(is_voice is not null, is_broadband is not null)',
'(adv_speed_down, adv_speed_up)',
],
links => [ $link_mobile, $link_mobile, '', '', '', '', '', $link_shp, $link_kmz, $link_json, ],
align => 'clllllr',
nohtmlheader => 1,
disable_maxselect => 1,
disable_total => 1,
disableable => 1,
disabled_statuspos => 2,
&>
<& /elements/footer.html &>
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;
my $acl_edit = $curuser->access_right('Edit FCC report configuration');
my $acl_edit_global = $curuser->access_right('Edit FCC report configuration for all agents');
die "access denied"
unless $acl_edit or $acl_edit_global;
my $link_fixed = [ $p.'edit/deploy_zone-fixed.html?', 'zonenum' ];
my $link_mobile = [ $p.'edit/deploy_zone-mobile.html?', 'zonenum' ];
my $link_shp = [ $p.'view/deploy_zone-shp.cgi?', 'zonenum' ];
my $link_kmz = [ $p.'view/deploy_zone-kmz.cgi?', 'zonenum' ];
my $link_json = [ $p.'view/deploy_zone-geojson.cgi?', 'zonenum' ];
my $fixed_shp = $p.'view/deploy_zone-shp.cgi?zonetype=B';
my $fixed_kmz = $p.'view/deploy_zone-kmz.cgi?zonetype=B';
my $fixed_json = $p.'view/deploy_zone-geojson.cgi?zonetype=B';
my $tech_label = FS::part_pkg_fcc_option->technology_labels;
my $spec_label = FS::part_pkg_fcc_option->spectrum_labels;
</%init>
|