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
|
<& /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',
'Census blocks',
],
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_block->count('zonenum = '.$self->zonenum)
},
],
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, ],
align => 'clllllr',
nohtmlheader => 1,
disable_maxselect => 1,
disable_total => 1,
&>
<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
],
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)
},
],
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, ],
align => 'clllllr',
nohtmlheader => 1,
disable_maxselect => 1,
disable_total => 1,
&>
<& /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 $tech_label = FS::part_pkg_fcc_option->technology_labels;
my $spec_label = FS::part_pkg_fcc_option->spectrum_labels;
</%init>
|