From 8cfcd2cd150a0dfcdf52886ad62c7ee7e7c9fdf1 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Mon, 15 Dec 2014 10:37:16 -0800 Subject: [PATCH] [Indicators] Begin adding Couch indicator Begin adding indicator to display connection status for CouchDB. WTD-608. --- platform/persistence/bundle.json | 15 +++++++++++++ platform/persistence/src/CouchIndicator.js | 25 ++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 platform/persistence/src/CouchIndicator.js diff --git a/platform/persistence/bundle.json b/platform/persistence/bundle.json index 64d60f2504..011c46b666 100644 --- a/platform/persistence/bundle.json +++ b/platform/persistence/bundle.json @@ -18,6 +18,21 @@ { "key": "COUCHDB_PATH", "value": "/couch/openmct" + }, + { + "key": "COUCHDB_INDICATOR_INTERVAL", + "value": 15000 + } + ], + "indicators": [ + { + "implementation": "CouchIndicator.js", + "depends": [ + "$http", + "$interval", + "COUCHDB_PATH", + "COUCHDB_INDICATOR_INTERVAL" + ] } ] } diff --git a/platform/persistence/src/CouchIndicator.js b/platform/persistence/src/CouchIndicator.js new file mode 100644 index 0000000000..88e05df480 --- /dev/null +++ b/platform/persistence/src/CouchIndicator.js @@ -0,0 +1,25 @@ +/*global define*/ + +define( + [], + function () { + "use strict"; + + function CouchIndicator($http, $interval, PATH, INTERVAL) { + function updateIndicator() { + + } + + $interval(updateIndicator, INTERVAL); + + return { + getGlyph: function () { + return "D"; + } + } + + } + + return CouchIndicator; + } +); \ No newline at end of file