From 782edfc3b7424d17036fe1d5e06beba9e9ad83f3 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Fri, 9 Jan 2015 16:16:58 -0800 Subject: [PATCH] [WARP Telemetry] Work around platform issues Work around issues in platform which manifest as bugs or latency issues when attempting to visualize telemetry from the WARP Server. Specifically: * Handle the possibility that there is no matching representation for an object from EditRepresenter. * Don't attempt to look up colon-separated domain object identifiers from persistence. This is a workaround to avoid latency issues from excessive persistence calls; filed WTD-659 to improve this solution. Changes made to support resolution of WTD-644. --- platform/commonUI/edit/src/EditRepresenter.js | 2 +- platform/core/src/models/PersistedModelProvider.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/commonUI/edit/src/EditRepresenter.js b/platform/commonUI/edit/src/EditRepresenter.js index 6cf40aadd2..bf3dfc721b 100644 --- a/platform/commonUI/edit/src/EditRepresenter.js +++ b/platform/commonUI/edit/src/EditRepresenter.js @@ -73,7 +73,7 @@ define( // Handle a specific representation of a specific domain object function represent(representation, representedObject) { // Track the key, to know which view configuration to save to. - key = representation.key; + key = (representation || {}).key; // Track the represented object domainObject = representedObject; diff --git a/platform/core/src/models/PersistedModelProvider.js b/platform/core/src/models/PersistedModelProvider.js index 8b49f6b538..88ec5afee7 100644 --- a/platform/core/src/models/PersistedModelProvider.js +++ b/platform/core/src/models/PersistedModelProvider.js @@ -21,7 +21,9 @@ define( */ function PersistedModelProvider(persistenceService, $q, SPACE) { function promiseModels(ids) { - return $q.all(ids.map(function (id) { + return $q.all(ids.filter(function (id) { + return id.indexOf(":") === -1; + }).map(function (id) { return persistenceService.readObject(SPACE, id); })).then(function (models) { var result = {};