From 08df7cbfcf7016510be01b2d0e767b21e5455c4a Mon Sep 17 00:00:00 2001 From: ste Date: Mon, 8 Jun 2020 19:55:23 +0100 Subject: [PATCH 1/2] GPII-4500: Fixed the "preference" metric. --- gpii/node_modules/eventLog/src/metrics.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gpii/node_modules/eventLog/src/metrics.js b/gpii/node_modules/eventLog/src/metrics.js index e2dc8e1ab..86ca81011 100644 --- a/gpii/node_modules/eventLog/src/metrics.js +++ b/gpii/node_modules/eventLog/src/metrics.js @@ -110,7 +110,7 @@ fluid.defaults("gpii.metrics.lifecycle", { } }, listeners: { - "{lifecycleManager}.events.onCreate": { + "onCreate": { namespace: "trackPrefsSetChange", listener: "gpii.metrics.trackPrefsSetChange", args: ["{that}", "{lifecycleManager}"] @@ -222,7 +222,7 @@ gpii.metrics.preferenceChanged = function (that, current, previous) { fluid.each(changedPreferences, function (value, name) { that.logMetric("preference", { name: name, - newValue: value.toString() + setTo: fluid.isPrimitive(value) ? value.toString() : value }); }); } From 2f6d444c60a2fb2d796b9d50fa0a05e8c35fcff6 Mon Sep 17 00:00:00 2001 From: ste Date: Tue, 9 Jun 2020 11:15:29 +0100 Subject: [PATCH 2/2] GPII-4500: Updates tests for code changes. --- .../eventLog/test/metricsTests.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gpii/node_modules/eventLog/test/metricsTests.js b/gpii/node_modules/eventLog/test/metricsTests.js index b118d94dd..7cea8abf1 100644 --- a/gpii/node_modules/eventLog/test/metricsTests.js +++ b/gpii/node_modules/eventLog/test/metricsTests.js @@ -69,7 +69,7 @@ gpii.tests.metrics.preferenceChangedTestData = fluid.freezeRecursive({ }, expect: { name: "pref1", - newValue: "changed value1" + setTo: "changed value1" } }, "changed 2/2": { @@ -83,10 +83,10 @@ gpii.tests.metrics.preferenceChangedTestData = fluid.freezeRecursive({ }, expect: [{ name: "pref1", - newValue: "changed value1" + setTo: "changed value1" }, { name: "pref2", - newValue: "changed value2" + setTo: "changed value2" }] }, "changed 2/3": { @@ -102,10 +102,10 @@ gpii.tests.metrics.preferenceChangedTestData = fluid.freezeRecursive({ }, expect: [{ name: "pref1", - newValue: "changed value1" + setTo: "changed value1" }, { name: "pref2", - newValue: "changed value2" + setTo: "changed value2" }] }, "add 1+1": { @@ -118,7 +118,7 @@ gpii.tests.metrics.preferenceChangedTestData = fluid.freezeRecursive({ }, expect: [{ name: "pref2", - newValue: "new value2" + setTo: "new value2" }] }, "add+change": { @@ -131,10 +131,10 @@ gpii.tests.metrics.preferenceChangedTestData = fluid.freezeRecursive({ }, expect: [{ name: "pref1", - newValue: "changed value1" + setTo: "changed value1" }, { name: "pref2", - newValue: "new value2" + setTo: "new value2" }] }, "remove 1-1": { @@ -168,10 +168,10 @@ gpii.tests.metrics.preferenceChangedTestData = fluid.freezeRecursive({ }, expect: [{ name: "pref2", - newValue: "changed value2" + setTo: "changed value2" }, { name: "pref4", - newValue: "new value4" + setTo: "new value4" }] } });