filters types by useInTable so each form shows the right types

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

Branch: refs/heads/psql
Commit: 395d9efb989a417a055ce5ca4badd67537742e81
Parents: 57b70fe
Author: Jeremy Mitchell <mitchell...@gmail.com>
Authored: Fri Oct 14 10:37:46 2016 -0600
Committer: Jeremy Mitchell <mitchell...@gmail.com>
Committed: Fri Oct 14 10:37:46 2016 -0600

----------------------------------------------------------------------
 traffic_ops/experimental/ui/app/src/common/api/TypeService.js    | 4 ++--
 .../common/modules/form/cacheGroup/FormCacheGroupController.js   | 2 +-
 .../form/deliveryService/FormDeliveryServiceController.js        | 2 +-
 .../app/src/common/modules/form/server/FormServerController.js   | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/395d9efb/traffic_ops/experimental/ui/app/src/common/api/TypeService.js
----------------------------------------------------------------------
diff --git a/traffic_ops/experimental/ui/app/src/common/api/TypeService.js 
b/traffic_ops/experimental/ui/app/src/common/api/TypeService.js
index 28b2c70..6441223 100644
--- a/traffic_ops/experimental/ui/app/src/common/api/TypeService.js
+++ b/traffic_ops/experimental/ui/app/src/common/api/TypeService.js
@@ -1,7 +1,7 @@
 var TypeService = function(Restangular, locationUtils, messageModel) {
 
-    this.getTypes = function() {
-        return Restangular.all('types').getList();
+    this.getTypes = function(useInTable) {
+        return Restangular.all('types').getList({ useInTable: useInTable });
     };
 
     this.getType = function(id) {

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/395d9efb/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/FormCacheGroupController.js
----------------------------------------------------------------------
diff --git 
a/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/FormCacheGroupController.js
 
b/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/FormCacheGroupController.js
index 2f4ff7b..2b8e3c7 100644
--- 
a/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/FormCacheGroupController.js
+++ 
b/traffic_ops/experimental/ui/app/src/common/modules/form/cacheGroup/FormCacheGroupController.js
@@ -8,7 +8,7 @@ var FormCacheGroupController = function(cacheGroup, $scope, 
formUtils, locationU
     };
 
     var getTypes = function() {
-        typeService.getTypes()
+        typeService.getTypes('cachegroup')
             .then(function(result) {
                 $scope.types = result;
             });

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/395d9efb/traffic_ops/experimental/ui/app/src/common/modules/form/deliveryService/FormDeliveryServiceController.js
----------------------------------------------------------------------
diff --git 
a/traffic_ops/experimental/ui/app/src/common/modules/form/deliveryService/FormDeliveryServiceController.js
 
b/traffic_ops/experimental/ui/app/src/common/modules/form/deliveryService/FormDeliveryServiceController.js
index 34da5a3..51619ad 100644
--- 
a/traffic_ops/experimental/ui/app/src/common/modules/form/deliveryService/FormDeliveryServiceController.js
+++ 
b/traffic_ops/experimental/ui/app/src/common/modules/form/deliveryService/FormDeliveryServiceController.js
@@ -1,7 +1,7 @@
 var FormDeliveryServiceController = function(deliveryService, $scope, 
formUtils, locationUtils, cdnService, profileService, typeService) {
 
     var getTypes = function() {
-        typeService.getTypes()
+        typeService.getTypes('deliveryservice')
             .then(function(result) {
                 $scope.types = result;
             });

http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/395d9efb/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js
----------------------------------------------------------------------
diff --git 
a/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js
 
b/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js
index fa7c3f0..c0ae6d0 100644
--- 
a/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js
+++ 
b/traffic_ops/experimental/ui/app/src/common/modules/form/server/FormServerController.js
@@ -15,7 +15,7 @@ var FormServerController = function(server, $scope, 
formUtils, stringUtils, loca
     };
 
     var getTypes = function() {
-        typeService.getTypes()
+        typeService.getTypes('server')
             .then(function(result) {
                 $scope.types = result;
             });

Reply via email to