Search ext: improve debug output
authorColeman Watts <coleman@civicrm.org>
Thu, 10 Sep 2020 15:39:25 +0000 (11:39 -0400)
committerColeman Watts <coleman@civicrm.org>
Mon, 14 Sep 2020 19:08:36 +0000 (15:08 -0400)
ext/search/ang/search/crmSearch.component.js

index 66a14f0f2c101c8e770519a7d3fbdba0b48a0dfb..039e74d99a769b51a54173cea1600d02c70d5aca 100644 (file)
         })
           .finally(function() {
             if (ctrl.debug) {
-              ctrl.debug.params = JSON.stringify(ctrl.params, null, 2);
+              ctrl.debug.params = JSON.stringify(_.extend({version: 4}, ctrl.params), null, 2);
+              if (ctrl.debug.timeIndex) {
+                ctrl.debug.timeIndex = Number.parseFloat(ctrl.debug.timeIndex).toPrecision(2);
+              }
             }
           });
       }