mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 05:38:12 +00:00
[Docs] ElasticSearch is not Couch
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Couch Persistence",
|
"name": "ElasticSearch Persistence",
|
||||||
"description": "Adapter to read and write objects using a CouchDB instance.",
|
"description": "Adapter to read and write objects using an ElasticSearch instance.",
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"components": [
|
"components": [
|
||||||
{
|
{
|
||||||
|
@ -46,15 +46,15 @@ define(
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicator for the current CouchDB connection. Polls CouchDB
|
* Indicator for the current ElasticSearch connection. Polls
|
||||||
* at a regular interval (defined by bundle constants) to ensure
|
* ElasticSearch at a regular interval (defined by bundle constants)
|
||||||
* that the database is available.
|
* to ensure that the database is available.
|
||||||
* @constructor
|
* @constructor
|
||||||
* @memberof platform/persistence/elastic
|
* @memberof platform/persistence/elastic
|
||||||
* @implements {Indicator}
|
* @implements {Indicator}
|
||||||
* @param $http Angular's $http service
|
* @param $http Angular's $http service
|
||||||
* @param $interval Angular's $interval service
|
* @param $interval Angular's $interval service
|
||||||
* @param {string} path the URL to poll to check for couch availability
|
* @param {string} path the URL to poll for elasticsearch availability
|
||||||
* @param {number} interval the interval, in milliseconds, to poll at
|
* @param {number} interval the interval, in milliseconds, to poll at
|
||||||
*/
|
*/
|
||||||
function ElasticIndicator($http, $interval, path, interval) {
|
function ElasticIndicator($http, $interval, path, interval) {
|
||||||
@ -63,7 +63,7 @@ define(
|
|||||||
|
|
||||||
this.state = PENDING;
|
this.state = PENDING;
|
||||||
|
|
||||||
// Callback if the HTTP request to Couch fails
|
// Callback if the HTTP request to ElasticSearch fails
|
||||||
function handleError() {
|
function handleError() {
|
||||||
self.state = DISCONNECTED;
|
self.state = DISCONNECTED;
|
||||||
}
|
}
|
||||||
@ -73,7 +73,7 @@ define(
|
|||||||
self.state = CONNECTED;
|
self.state = CONNECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to connect to CouchDB, and update the indicator.
|
// Try to connect to ElasticSearch, and update the indicator.
|
||||||
function updateIndicator() {
|
function updateIndicator() {
|
||||||
$http.get(path).then(handleResponse, handleError);
|
$http.get(path).then(handleResponse, handleError);
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ define(
|
|||||||
return this.$q.reject(error);
|
return this.$q.reject(error);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Get a domain object model out of CouchDB's response
|
// Get a domain object model out of ElasticSearch's response
|
||||||
function getModel(response) {
|
function getModel(response) {
|
||||||
if (response && response[SRC]) {
|
if (response && response[SRC]) {
|
||||||
this.revs[response[ID]] = response[REV];
|
this.revs[response[ID]] = response[REV];
|
||||||
|
Reference in New Issue
Block a user