Renamend ZabbixCache service to ZabbixCachingProxy.
This commit is contained in:
@@ -19,7 +19,7 @@ function (angular, _, dateMath, utils, metricFunctions) {
|
||||
|
||||
/** @ngInject */
|
||||
function ZabbixAPIDatasource(instanceSettings, $q, templateSrv, alertSrv, zabbixHelperSrv,
|
||||
ZabbixAPI, ZabbixCache, QueryProcessor, DataProcessingService) {
|
||||
ZabbixAPI, ZabbixCachingProxy, QueryProcessor, DataProcessingService) {
|
||||
|
||||
// General data source settings
|
||||
this.name = instanceSettings.name;
|
||||
@@ -39,7 +39,7 @@ function (angular, _, dateMath, utils, metricFunctions) {
|
||||
this.zabbixAPI = new ZabbixAPI(this.url, this.username, this.password, this.basicAuth, this.withCredentials);
|
||||
|
||||
// Initialize cache service
|
||||
this.zabbixCache = new ZabbixCache(this.zabbixAPI);
|
||||
this.zabbixCache = new ZabbixCachingProxy(this.zabbixAPI);
|
||||
|
||||
// Initialize query builder
|
||||
this.queryProcessor = new QueryProcessor(this.zabbixCache);
|
||||
|
||||
@@ -10,9 +10,9 @@ function (angular, _, utils) {
|
||||
|
||||
// Use factory() instead service() for multiple datasources support.
|
||||
// Each datasource instance must initialize its own cache.
|
||||
module.factory('ZabbixCache', function($q) {
|
||||
module.factory('ZabbixCachingProxy', function($q) {
|
||||
|
||||
function ZabbixCache(zabbixAPI, ttl) {
|
||||
function ZabbixCachingProxy(zabbixAPI, ttl) {
|
||||
this.zabbixAPI = zabbixAPI;
|
||||
this.ttl = ttl;
|
||||
|
||||
@@ -26,7 +26,7 @@ function (angular, _, utils) {
|
||||
this._initialized = undefined;
|
||||
}
|
||||
|
||||
var p = ZabbixCache.prototype;
|
||||
var p = ZabbixCachingProxy.prototype;
|
||||
|
||||
p.refresh = function () {
|
||||
var self = this;
|
||||
@@ -126,7 +126,7 @@ function (angular, _, utils) {
|
||||
});
|
||||
}
|
||||
|
||||
return ZabbixCache;
|
||||
return ZabbixCachingProxy;
|
||||
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user