فهرست منبع

HUE-8078 [search] List proper aggregate function for the counter widget

Discovered there is more clean-up to do for other widgets, but doing firstcounter widget.
Romain Rigaux 7 سال پیش
والد
کامیت
94193c7
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      desktop/libs/dashboard/src/dashboard/static/dashboard/js/search.ko.js

+ 2 - 2
desktop/libs/dashboard/src/dashboard/static/dashboard/js/search.ko.js

@@ -843,7 +843,7 @@ var Collection = function (vm, collection) {
 
     if (facet.properties.facets) { // Sub facet
       $.each(facet.properties.facets(), function (index, nestedFacet) {
-        self._addObservablesToNestedFacet(self, nestedFacet, vm);
+        self._addObservablesToNestedFacet(facet, nestedFacet, vm);
       });
     }
   }
@@ -865,7 +865,7 @@ var Collection = function (vm, collection) {
       });
 
       nestedFacet.aggregate.metrics = ko.computed(function() {
-        var _field = self.getTemplateField(nestedFacet.field(), facet.template.fieldsAttributes());
+        var _field = self.getTemplateField(nestedFacet.field(), vm.collection.template.fieldsAttributes());
         return self._get_field_operations(_field, facet);
       });
     }