Experimental unit tests for the Telemetry Table component (#2533)
* Initial commit of telemetry table spec * Added example directory to linter paths. Fixed outstanding linting issues
This commit is contained in:
@@ -21,25 +21,26 @@
|
||||
*****************************************************************************/
|
||||
|
||||
define([
|
||||
"./src/PersistenceAggregator",
|
||||
'legacyRegistry'
|
||||
"./src/PersistenceAggregator"
|
||||
], function (
|
||||
PersistenceAggregator,
|
||||
legacyRegistry
|
||||
PersistenceAggregator
|
||||
) {
|
||||
|
||||
legacyRegistry.register("platform/persistence/aggregator", {
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"provides": "persistenceService",
|
||||
"type": "aggregator",
|
||||
"depends": [
|
||||
"$q"
|
||||
],
|
||||
"implementation": PersistenceAggregator
|
||||
}
|
||||
]
|
||||
return {
|
||||
name:"platform/persistence/aggregator",
|
||||
definition: {
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"provides": "persistenceService",
|
||||
"type": "aggregator",
|
||||
"depends": [
|
||||
"$q"
|
||||
],
|
||||
"implementation": PersistenceAggregator
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
@@ -22,56 +22,57 @@
|
||||
|
||||
define([
|
||||
"./src/CouchPersistenceProvider",
|
||||
"./src/CouchIndicator",
|
||||
'legacyRegistry'
|
||||
"./src/CouchIndicator"
|
||||
], function (
|
||||
CouchPersistenceProvider,
|
||||
CouchIndicator,
|
||||
legacyRegistry
|
||||
CouchIndicator
|
||||
) {
|
||||
|
||||
legacyRegistry.register("platform/persistence/couch", {
|
||||
"name": "Couch Persistence",
|
||||
"description": "Adapter to read and write objects using a CouchDB instance.",
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"provides": "persistenceService",
|
||||
"type": "provider",
|
||||
"implementation": CouchPersistenceProvider,
|
||||
"depends": [
|
||||
"$http",
|
||||
"$q",
|
||||
"PERSISTENCE_SPACE",
|
||||
"COUCHDB_PATH"
|
||||
]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"key": "PERSISTENCE_SPACE",
|
||||
"value": "mct"
|
||||
},
|
||||
{
|
||||
"key": "COUCHDB_PATH",
|
||||
"value": "/couch/openmct"
|
||||
},
|
||||
{
|
||||
"key": "COUCHDB_INDICATOR_INTERVAL",
|
||||
"value": 15000
|
||||
}
|
||||
],
|
||||
"indicators": [
|
||||
{
|
||||
"implementation": CouchIndicator,
|
||||
"depends": [
|
||||
"$http",
|
||||
"$interval",
|
||||
"COUCHDB_PATH",
|
||||
"COUCHDB_INDICATOR_INTERVAL"
|
||||
]
|
||||
}
|
||||
]
|
||||
return {
|
||||
name:"platform/persistence/couch",
|
||||
definition: {
|
||||
"name": "Couch Persistence",
|
||||
"description": "Adapter to read and write objects using a CouchDB instance.",
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"provides": "persistenceService",
|
||||
"type": "provider",
|
||||
"implementation": CouchPersistenceProvider,
|
||||
"depends": [
|
||||
"$http",
|
||||
"$q",
|
||||
"PERSISTENCE_SPACE",
|
||||
"COUCHDB_PATH"
|
||||
]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"key": "PERSISTENCE_SPACE",
|
||||
"value": "mct"
|
||||
},
|
||||
{
|
||||
"key": "COUCHDB_PATH",
|
||||
"value": "/couch/openmct"
|
||||
},
|
||||
{
|
||||
"key": "COUCHDB_INDICATOR_INTERVAL",
|
||||
"value": 15000
|
||||
}
|
||||
],
|
||||
"indicators": [
|
||||
{
|
||||
"implementation": CouchIndicator,
|
||||
"depends": [
|
||||
"$http",
|
||||
"$interval",
|
||||
"COUCHDB_PATH",
|
||||
"COUCHDB_INDICATOR_INTERVAL"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
@@ -23,74 +23,75 @@
|
||||
define([
|
||||
"./src/ElasticPersistenceProvider",
|
||||
"./src/ElasticSearchProvider",
|
||||
"./src/ElasticIndicator",
|
||||
'legacyRegistry'
|
||||
"./src/ElasticIndicator"
|
||||
], function (
|
||||
ElasticPersistenceProvider,
|
||||
ElasticSearchProvider,
|
||||
ElasticIndicator,
|
||||
legacyRegistry
|
||||
ElasticIndicator
|
||||
) {
|
||||
|
||||
legacyRegistry.register("platform/persistence/elastic", {
|
||||
"name": "ElasticSearch Persistence",
|
||||
"description": "Adapter to read and write objects using an ElasticSearch instance.",
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"provides": "persistenceService",
|
||||
"type": "provider",
|
||||
"implementation": ElasticPersistenceProvider,
|
||||
"depends": [
|
||||
"$http",
|
||||
"$q",
|
||||
"PERSISTENCE_SPACE",
|
||||
"ELASTIC_ROOT",
|
||||
"ELASTIC_PATH"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "searchService",
|
||||
"type": "provider",
|
||||
"implementation": ElasticSearchProvider,
|
||||
"depends": [
|
||||
"$http",
|
||||
"ELASTIC_ROOT"
|
||||
]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"key": "PERSISTENCE_SPACE",
|
||||
"value": "mct"
|
||||
},
|
||||
{
|
||||
"key": "ELASTIC_ROOT",
|
||||
"value": "http://localhost:9200",
|
||||
"priority": "fallback"
|
||||
},
|
||||
{
|
||||
"key": "ELASTIC_PATH",
|
||||
"value": "mct/domain_object",
|
||||
"priority": "fallback"
|
||||
},
|
||||
{
|
||||
"key": "ELASTIC_INDICATOR_INTERVAL",
|
||||
"value": 15000,
|
||||
"priority": "fallback"
|
||||
}
|
||||
],
|
||||
"indicators": [
|
||||
{
|
||||
"implementation": ElasticIndicator,
|
||||
"depends": [
|
||||
"$http",
|
||||
"$interval",
|
||||
"ELASTIC_ROOT",
|
||||
"ELASTIC_INDICATOR_INTERVAL"
|
||||
]
|
||||
}
|
||||
]
|
||||
return {
|
||||
name:"platform/persistence/elastic",
|
||||
definition: {
|
||||
"name": "ElasticSearch Persistence",
|
||||
"description": "Adapter to read and write objects using an ElasticSearch instance.",
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"provides": "persistenceService",
|
||||
"type": "provider",
|
||||
"implementation": ElasticPersistenceProvider,
|
||||
"depends": [
|
||||
"$http",
|
||||
"$q",
|
||||
"PERSISTENCE_SPACE",
|
||||
"ELASTIC_ROOT",
|
||||
"ELASTIC_PATH"
|
||||
]
|
||||
},
|
||||
{
|
||||
"provides": "searchService",
|
||||
"type": "provider",
|
||||
"implementation": ElasticSearchProvider,
|
||||
"depends": [
|
||||
"$http",
|
||||
"ELASTIC_ROOT"
|
||||
]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"key": "PERSISTENCE_SPACE",
|
||||
"value": "mct"
|
||||
},
|
||||
{
|
||||
"key": "ELASTIC_ROOT",
|
||||
"value": "http://localhost:9200",
|
||||
"priority": "fallback"
|
||||
},
|
||||
{
|
||||
"key": "ELASTIC_PATH",
|
||||
"value": "mct/domain_object",
|
||||
"priority": "fallback"
|
||||
},
|
||||
{
|
||||
"key": "ELASTIC_INDICATOR_INTERVAL",
|
||||
"value": 15000,
|
||||
"priority": "fallback"
|
||||
}
|
||||
],
|
||||
"indicators": [
|
||||
{
|
||||
"implementation": ElasticIndicator,
|
||||
"depends": [
|
||||
"$http",
|
||||
"$interval",
|
||||
"ELASTIC_ROOT",
|
||||
"ELASTIC_INDICATOR_INTERVAL"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
@@ -22,39 +22,40 @@
|
||||
|
||||
define([
|
||||
"./src/LocalStoragePersistenceProvider",
|
||||
"./src/LocalStorageIndicator",
|
||||
'legacyRegistry'
|
||||
"./src/LocalStorageIndicator"
|
||||
], function (
|
||||
LocalStoragePersistenceProvider,
|
||||
LocalStorageIndicator,
|
||||
legacyRegistry
|
||||
LocalStorageIndicator
|
||||
) {
|
||||
|
||||
legacyRegistry.register("platform/persistence/local", {
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"provides": "persistenceService",
|
||||
"type": "provider",
|
||||
"implementation": LocalStoragePersistenceProvider,
|
||||
"depends": [
|
||||
"$window",
|
||||
"$q",
|
||||
"PERSISTENCE_SPACE"
|
||||
]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"key": "PERSISTENCE_SPACE",
|
||||
"value": "mct"
|
||||
}
|
||||
],
|
||||
"indicators": [
|
||||
{
|
||||
"implementation": LocalStorageIndicator
|
||||
}
|
||||
]
|
||||
return {
|
||||
name:"platform/persistence/local",
|
||||
definition: {
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"provides": "persistenceService",
|
||||
"type": "provider",
|
||||
"implementation": LocalStoragePersistenceProvider,
|
||||
"depends": [
|
||||
"$window",
|
||||
"$q",
|
||||
"PERSISTENCE_SPACE"
|
||||
]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"key": "PERSISTENCE_SPACE",
|
||||
"value": "mct"
|
||||
}
|
||||
],
|
||||
"indicators": [
|
||||
{
|
||||
"implementation": LocalStorageIndicator
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
@@ -24,58 +24,59 @@ define([
|
||||
"./src/QueuingPersistenceCapabilityDecorator",
|
||||
"./src/PersistenceQueue",
|
||||
"./src/PersistenceFailureController",
|
||||
"./res/templates/persistence-failure-dialog.html",
|
||||
'legacyRegistry'
|
||||
"./res/templates/persistence-failure-dialog.html"
|
||||
], function (
|
||||
QueuingPersistenceCapabilityDecorator,
|
||||
PersistenceQueue,
|
||||
PersistenceFailureController,
|
||||
persistenceFailureDialogTemplate,
|
||||
legacyRegistry
|
||||
persistenceFailureDialogTemplate
|
||||
) {
|
||||
|
||||
legacyRegistry.register("platform/persistence/queue", {
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"type": "decorator",
|
||||
"provides": "capabilityService",
|
||||
"implementation": QueuingPersistenceCapabilityDecorator,
|
||||
"depends": [
|
||||
"persistenceQueue"
|
||||
]
|
||||
}
|
||||
],
|
||||
"services": [
|
||||
{
|
||||
"key": "persistenceQueue",
|
||||
"implementation": PersistenceQueue,
|
||||
"depends": [
|
||||
"$q",
|
||||
"$timeout",
|
||||
"dialogService",
|
||||
"PERSISTENCE_QUEUE_DELAY"
|
||||
]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"key": "PERSISTENCE_QUEUE_DELAY",
|
||||
"value": 5
|
||||
}
|
||||
],
|
||||
"templates": [
|
||||
{
|
||||
"key": "persistence-failure-dialog",
|
||||
"template": persistenceFailureDialogTemplate
|
||||
}
|
||||
],
|
||||
"controllers": [
|
||||
{
|
||||
"key": "PersistenceFailureController",
|
||||
"implementation": PersistenceFailureController
|
||||
}
|
||||
]
|
||||
return {
|
||||
name:"platform/persistence/queue",
|
||||
definition: {
|
||||
"extensions": {
|
||||
"components": [
|
||||
{
|
||||
"type": "decorator",
|
||||
"provides": "capabilityService",
|
||||
"implementation": QueuingPersistenceCapabilityDecorator,
|
||||
"depends": [
|
||||
"persistenceQueue"
|
||||
]
|
||||
}
|
||||
],
|
||||
"services": [
|
||||
{
|
||||
"key": "persistenceQueue",
|
||||
"implementation": PersistenceQueue,
|
||||
"depends": [
|
||||
"$q",
|
||||
"$timeout",
|
||||
"dialogService",
|
||||
"PERSISTENCE_QUEUE_DELAY"
|
||||
]
|
||||
}
|
||||
],
|
||||
"constants": [
|
||||
{
|
||||
"key": "PERSISTENCE_QUEUE_DELAY",
|
||||
"value": 5
|
||||
}
|
||||
],
|
||||
"templates": [
|
||||
{
|
||||
"key": "persistence-failure-dialog",
|
||||
"template": persistenceFailureDialogTemplate
|
||||
}
|
||||
],
|
||||
"controllers": [
|
||||
{
|
||||
"key": "PersistenceFailureController",
|
||||
"implementation": PersistenceFailureController
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user