replace unicode nonbreaking space with ascii space (#794)

This commit is contained in:
nick n
2021-06-23 23:00:33 +02:00
committed by GitHub
parent ec1c0b5f39
commit 83a946d36e
49 changed files with 171 additions and 171 deletions

View File

@@ -239,7 +239,7 @@ sub match_with_radius {
my $conf = setting('radius');
my $radius = Authen::Radius->new(@$conf);
# my $dict_dir = Path::Class::Dir->new( dist_dir('App-Netdisco') )
#  ->subdir('radius_dictionaries')->stringify;
# ->subdir('radius_dictionaries')->stringify;
Authen::Radius->load_dictionary(); # put $dict_dir in here once it's useful
$radius->add_attributes(

View File

@@ -157,7 +157,7 @@ post '/login' => sub {
};
# ugh, *puke*, but D::P::Swagger has no way to set this with swagger_path
# must be after the path is declared, above.
# must be after the path is declared, above.
Dancer::Plugin::Swagger->instance->doc
->{paths}->{ setting('url_base')->with('/login')->path }
->{post}->{security}->[0]->{BasicAuth} = [];

View File

@@ -26,7 +26,7 @@ hook 'before_template' => sub {
or return;
# override ports form defaults with cookie settings
# always do this so that embedded links to device ports page have user prefs
# always do this so that embedded links to device ports page have user prefs
if (param('reset')) {
cookie('nd_ports-form' => '', expires => '-1 day');
}
@@ -50,7 +50,7 @@ hook 'before_template' => sub {
return if param('reset')
or not var('sidebar_key') or (var('sidebar_key') ne 'device_ports');
# update cookie from params we just recieved in form submit
# update cookie from params we just recieved in form submit
my $uri = URI->new();
foreach my $key (keys %{ $defaults }) {
$uri->query_param($key => param($key));

View File

@@ -32,15 +32,15 @@ ajax '/ajax/data/device/netmappositions' => require_login sub {
my $mapshow = param('mapshow');
return if !defined $mapshow or $mapshow !~ m/^(?:all|neighbors)$/;
# list of groups selected by user and passed in param
# list of groups selected by user and passed in param
my $hgroup = (ref [] eq ref param('hgroup') ? param('hgroup') : [param('hgroup')]);
# list of groups validated as real host groups and named host groups
# list of groups validated as real host groups and named host groups
my @hgrplist = List::MoreUtils::uniq
grep { exists setting('host_group_displaynames')->{$_} }
grep { exists setting('host_groups')->{$_} }
grep { defined } @{ $hgroup };
# list of locations selected by user and passed in param
# list of locations selected by user and passed in param
my $lgroup = (ref [] eq ref param('lgroup') ? param('lgroup') : [param('lgroup')]);
my @lgrplist = List::MoreUtils::uniq grep { defined } @{ $lgroup };
@@ -76,7 +76,7 @@ ajax '/ajax/data/device/netmappositions' => require_login sub {
}
};
# copied from SNMP::Info to avoid introducing dependency to web frontend
# copied from SNMP::Info to avoid introducing dependency to web frontend
sub munge_highspeed {
my $speed = shift;
my $fmt = "%d Mbps";
@@ -147,15 +147,15 @@ ajax '/ajax/data/device/netmap' => require_login sub {
$mapshow = 'neighbors' if $mapshow !~ m/^(?:all|neighbors)$/;
$mapshow = 'all' unless $qdev->in_storage;
# list of groups selected by user and passed in param
# list of groups selected by user and passed in param
my $hgroup = (ref [] eq ref param('hgroup') ? param('hgroup') : [param('hgroup')]);
# list of groups validated as real host groups and named host groups
# list of groups validated as real host groups and named host groups
my @hgrplist = List::MoreUtils::uniq
grep { exists setting('host_group_displaynames')->{$_} }
grep { exists setting('host_groups')->{$_} }
grep { defined } @{ $hgroup };
# list of locations selected by user and passed in param
# list of locations selected by user and passed in param
my $lgroup = (ref [] eq ref param('lgroup') ? param('lgroup') : [param('lgroup')]);
my @lgrplist = List::MoreUtils::uniq grep { defined } @{ $lgroup };
@@ -217,21 +217,21 @@ ajax '/ajax/data/device/netmap' => require_login sub {
}
DEVICE: while (my $device = $devices->next) {
# if in neighbors mode then use %ok_dev to filter
# if in neighbors mode then use %ok_dev to filter
next DEVICE if ($device->ip ne $qdev->ip)
and ($mapshow eq 'neighbors')
and (not $ok_dev{$device->ip}); # showing only neighbors but no link
# if location picked then filter
# if location picked then filter
next DEVICE if ((scalar @lgrplist) and ((!defined $device->location)
or (0 == scalar grep {$_ eq $device->location} @lgrplist)));
# if host groups picked then use ACLs to filter
# if host groups picked then use ACLs to filter
my $first_hgrp =
first { check_acl_only($device, setting('host_groups')->{$_}) } @hgrplist;
next DEVICE if ((scalar @hgrplist) and (not $first_hgrp));
# now reset first_hgroup to be the group matching the device, if any
# now reset first_hgroup to be the group matching the device, if any
$first_hgrp = first { check_acl_only($device, setting('host_groups')->{$_}) }
keys %{ setting('host_group_displaynames') || {} };
@@ -273,7 +273,7 @@ ajax '/ajax/data/device/netmap' => require_login sub {
if $qdev and $qdev->in_storage and $device->ip eq $qdev->ip;
}
# to help get a sensible range of node sizes
# to help get a sensible range of node sizes
$metadata{'numsizes'} = scalar keys %logvals;
content_type('application/json');

View File

@@ -99,11 +99,11 @@ get '/ajax/content/device/ports' => require_login sub {
$set = $set->search({-or => \@combi});
}
# so far only the basic device_port data
# now begin to join tables depending on the selected columns/options
# so far only the basic device_port data
# now begin to join tables depending on the selected columns/options
# get vlans on the port
# leave this query dormant (lazy) unless c_vmember is set or vlan filtering
# leave this query dormant (lazy) unless c_vmember is set or vlan filtering
my $vlans = $set->search({}, {
select => [
'port',
@@ -117,7 +117,7 @@ get '/ajax/content/device/ports' => require_login sub {
if (param('c_vmember') or ($prefer eq 'vlan') or (not $prefer and $f =~ m/^\d+$/)) {
$vlans = { map {(
$_->port => {
# DBIC smart enough to work out this should be an arrayref :)
# DBIC smart enough to work out this should be an arrayref :)
vlan_set => $_->get_column('vlan_set'),
vlan_count => $_->get_column('vlan_count'),
},