Renamend ZabbixCache service to ZabbixCachingProxy.

This commit is contained in:
Alexander Zobnin
2016-01-31 11:02:14 +03:00
parent 4231d3769a
commit 006d74d3c5
2 changed files with 6 additions and 6 deletions

View File

@@ -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);

View File

@@ -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;
});