You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2016/11/14 17:07:52 UTC

[49/53] [abbrv] incubator-trafficcontrol git commit: updated to correct the float types to return as floats

updated to correct the float types to return as floats


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/5006eacb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/5006eacb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/5006eacb

Branch: refs/heads/psql-rebase
Commit: 5006eacb2ba59ca74fc64d5e349af01f9cd0bac6
Parents: 57baf3a
Author: Dewayne Richardson <de...@apache.org>
Authored: Thu Nov 10 14:18:55 2016 -0700
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Fri Nov 11 14:43:13 2016 -0700

----------------------------------------------------------------------
 traffic_ops/app/lib/API/Cachegroup.pm      | 16 ++++++++--------
 traffic_ops/app/lib/API/Deliveryservice.pm | 12 ++++++------
 traffic_ops/app/lib/UI/Cdn.pm              |  4 ++--
 3 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5006eacb/traffic_ops/app/lib/API/Cachegroup.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/API/Cachegroup.pm b/traffic_ops/app/lib/API/Cachegroup.pm
index 7066b6c..955b8d2 100644
--- a/traffic_ops/app/lib/API/Cachegroup.pm
+++ b/traffic_ops/app/lib/API/Cachegroup.pm
@@ -46,8 +46,8 @@ sub index {
 				"id"                            => $row->id,
 				"name"                          => $row->name,
 				"shortName"                     => $row->short_name,
-				"latitude"                      => $row->latitude,
-				"longitude"                     => $row->longitude,
+				"latitude"                      => 0.0 + $row->latitude,
+				"longitude"                     => 0.0 + $row->longitude,
 				"lastUpdated"                   => $row->last_updated,
 				"parentCachegroupId"            => $row->parent_cachegroup_id,
 				"parentCachegroupName"          => ( defined $row->parent_cachegroup_id ) ? $idnames{ $row->parent_cachegroup_id } : undef,
@@ -99,8 +99,8 @@ sub show {
 				"id"                            => $row->id,
 				"name"                          => $row->name,
 				"shortName"                     => $row->short_name,
-				"latitude"                      => $row->latitude,
-				"longitude"                     => $row->longitude,
+				"latitude"                      => 0.0 + $row->latitude,
+				"longitude"                     => 0.0 + $row->longitude,
 				"lastUpdated"                   => $row->last_updated,
 				"parentCachegroupId"            => $row->parent_cachegroup_id,
 				"parentCachegroupName"          => ( defined $row->parent_cachegroup_id ) ? $idnames{ $row->parent_cachegroup_id } : undef,
@@ -175,8 +175,8 @@ sub update {
 		$response->{id}                 = $rs->id;
 		$response->{name}               = $rs->name;
 		$response->{shortName}          = $rs->short_name;
-		$response->{latitude}           = $rs->latitude;
-		$response->{longitude}          = $rs->longitude;
+		$response->{latitude}           = 0.0 + $rs->latitude;
+		$response->{longitude}          = 0.0 + $rs->longitude;
 		$response->{lastUpdated}        = $rs->last_updated;
 		$response->{parentCachegroupId} = $rs->parent_cachegroup_id;
 		$response->{parentCachegroupName} =
@@ -251,8 +251,8 @@ sub create {
 		$response->{id}                 = $rs->id;
 		$response->{name}               = $rs->name;
 		$response->{shortName}          = $rs->short_name;
-		$response->{latitude}           = $rs->latitude;
-		$response->{longitude}          = $rs->longitude;
+		$response->{latitude}           = 0.0 + $rs->latitude;
+		$response->{longitude}          = 0.0 + $rs->longitude;
 		$response->{lastUpdated}        = $rs->last_updated;
 		$response->{parentCachegroupId} = $rs->parent_cachegroup_id;
 		$response->{parentCachegroupName} =

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5006eacb/traffic_ops/app/lib/API/Deliveryservice.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/API/Deliveryservice.pm b/traffic_ops/app/lib/API/Deliveryservice.pm
index cbc1d84..6eea73f 100644
--- a/traffic_ops/app/lib/API/Deliveryservice.pm
+++ b/traffic_ops/app/lib/API/Deliveryservice.pm
@@ -87,8 +87,8 @@ sub index {
 				"longDesc2"                => $row->long_desc_2,
 				"maxDnsAnswers"            => $row->max_dns_answers,
 				"midHeaderRewrite"         => $row->mid_header_rewrite,
-				"missLat"                  => $row->miss_lat,
-				"missLong"                 => $row->miss_long,
+				"missLat"                  => 0.0 + $row->miss_lat,
+				"missLong"                 => 0.0 + $row->miss_long,
 				"multiSiteOrigin"          => \$row->multi_site_origin,
 				"multiSiteOriginAlgorithm" => $row->multi_site_origin_algorithm,
 				"orgServerFqdn"            => $row->org_server_fqdn,
@@ -184,8 +184,8 @@ sub show {
 				"matchList"                => \@matchlist,
 				"maxDnsAnswers"            => $row->max_dns_answers,
 				"midHeaderRewrite"         => $row->mid_header_rewrite,
-				"missLat"                  => $row->miss_lat,
-				"missLong"                 => $row->miss_long,
+				"missLat"                  => 0.0 + $row->miss_lat,
+				"missLong"                 => 0.0 + $row->miss_long,
 				"multiSiteOrigin"          => \$row->multi_site_origin,
 				"multiSiteOriginAlgorithm" => $row->multi_site_origin_algorithm,
 				"orgServerFqdn"            => $row->org_server_fqdn,
@@ -326,8 +326,8 @@ sub update {
 				"longDesc2"                => $rs->long_desc_2,
 				"maxDnsAnswers"            => $rs->max_dns_answers,
 				"midHeaderRewrite"         => $rs->mid_header_rewrite,
-				"missLat"                  => $rs->miss_lat,
-				"missLong"                 => $rs->miss_long,
+				"missLat"                  => 0.0 + $rs->miss_lat,
+				"missLong"                 => 0.0 + $rs->miss_long,
 				"multiSiteOrigin"          => \$rs->multi_site_origin,
 				"multiSiteOriginAlgorithm" => $rs->multi_site_origin_algorithm,
 				"orgServerFqdn"            => $rs->org_server_fqdn,

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/5006eacb/traffic_ops/app/lib/UI/Cdn.pm
----------------------------------------------------------------------
diff --git a/traffic_ops/app/lib/UI/Cdn.pm b/traffic_ops/app/lib/UI/Cdn.pm
index c0c0b3f..d9f9d80 100644
--- a/traffic_ops/app/lib/UI/Cdn.pm
+++ b/traffic_ops/app/lib/UI/Cdn.pm
@@ -451,7 +451,7 @@ sub adeliveryservice {
             $row->type->name,               $row->dscp,                  $yesno{ $row->signed },               $row->qstring_ignore,
             $geo_limits{ $row->geo_limit }, $protocol{ $row->protocol }, $yesno{ $row->ipv6_routing_enabled }, $row->range_request_handling,
             $row->http_bypass_fqdn,         $row->dns_bypass_ip,         $row->dns_bypass_ip6,                 $row->dns_bypass_ttl,
-            $row->miss_lat,                 $row->miss_long,
+            0.0 + $row->miss_lat,           0.0 + $row->miss_long,
         ];
         push( @{ $data{'aaData'} }, $line );
     }
@@ -606,7 +606,7 @@ sub acachegroup {
 
     while ( my $row = $rs->next ) {
         my @line = [
-            $row->id, $row->name, $row->short_name, $row->type->name, $row->latitude, $row->longitude,
+            $row->id, $row->name, $row->short_name, $row->type->name, 0.0 + $row->latitude, 0.0 + $row->longitude,
             defined( $row->parent_cachegroup_id )
             ? $id_to_name{ $row->parent_cachegroup_id }
             : undef,