ocket8888 commented on a change in pull request #4423: Deprecate
cachegroup/:id/unassigned_parameters
URL: https://github.com/apache/trafficcontrol/pull/4423#discussion_r391321323
##########
File path:
traffic_portal/app/src/common/modules/table/cacheGroupParameters/TableCacheGroupParamsUnassignedController.js
##########
@@ -17,13 +17,15 @@
* under the License.
*/
-var TableCacheGroupParamsUnassignedController = function(cg, parameters,
$scope, $uibModalInstance) {
+var TableCacheGroupParamsUnassignedController = function(cg, allParams,
assignedParams, $scope, $uibModalInstance) {
var selectedParams = [];
$scope.cg = cg;
- $scope.unassignedParams = parameters;
+ $scope.unassignedParams = _.filter(allParams, function(param) {
Review comment:
Because it saves me work :P
Everything we're using `_` for can be done natively in Javascript in every
browser with above a 0.5% market share - except Internet Explorer and Opera
Mini, both of which we don't support.
So I have a PR open to remove our dependency on it: #4410 .
[It's also ever so slightly faster because it is built
in](https://jsperf.com/array-prototype-filter-vs-filter).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services