diff options
author | Gunnar Mills <gmills@us.ibm.com> | 2019-01-23 16:02:03 -0600 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2019-01-28 04:54:08 +0000 |
commit | 7e48d0818a57f1e9024b21b4be589aad2d06ebca (patch) | |
tree | ad36dcdee0209133abd19837213701b2cb50f58c /app/server-health/controllers/log-controller.js | |
parent | a83cd057aa89297a306695d420233c24294277ab (diff) | |
download | phosphor-webui-7e48d0818a57f1e9024b21b4be589aad2d06ebca.tar.gz phosphor-webui-7e48d0818a57f1e9024b21b4be589aad2d06ebca.zip |
Fix error log resolve
logging/entry/<entryId>/attr/Resolved is a boolean as such
send true when resolving.
Before the function was always returning successful, fixed this
and log to the console when it fails.
Tested: Resolved multiple error logs and see the fail in the
console on a fail.
Change-Id: I60496f30f9241ffb6b6b73cf87b7481bea10b24f
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'app/server-health/controllers/log-controller.js')
-rw-r--r-- | app/server-health/controllers/log-controller.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/app/server-health/controllers/log-controller.js b/app/server-health/controllers/log-controller.js index a604126..ae873fb 100644 --- a/app/server-health/controllers/log-controller.js +++ b/app/server-health/controllers/log-controller.js @@ -173,11 +173,16 @@ window.angular && (function(angular) { if (!events.length) return; - APIUtils.resolveLogs(events).then(function() { - events.forEach(function(item) { - item.Resolved = 1; - }); - }); + APIUtils.resolveLogs(events).then( + function(data) { + events.forEach(function(item) { + item.Resolved = 1; + }); + }, + function(error) { + // TODO: Show error to user + console.log(JSON.stringify(error)); + }); }; $scope.$watch('logs', function() { |