refactor: proxy and cache WIP

This commit is contained in:
Alexander Zobnin
2018-03-17 22:10:59 +03:00
parent 24e10e885d
commit d47f729e1c
20 changed files with 445 additions and 613 deletions

View File

@@ -164,7 +164,7 @@ function convertGrafanaTSResponse(time_series, items, addHostName) {
var host = _.find(hosts, {'hostid': item.hostid});
alias = host.name + ": " + alias;
}
// zabbixCachingProxy deduplicates requests and returns one time series for equal queries.
// CachingProxy deduplicates requests and returns one time series for equal queries.
// Clone is needed to prevent changing of series object shared between all targets.
let datapoints = _.cloneDeep(series.points);
return {

View File

@@ -1,6 +1,6 @@
import _ from 'lodash';
import * as utils from '../../../utils';
import { ZabbixAPICoreService } from './zabbixAPICore';
import { ZabbixAPICore } from './zabbixAPICore';
/**
* Zabbix API Wrapper.
@@ -25,7 +25,7 @@ export class ZabbixAPIConnector {
this.loginErrorCount = 0;
this.maxLoginAttempts = 3;
this.zabbixAPICore = new ZabbixAPICoreService(backendSrv);
this.zabbixAPICore = new ZabbixAPICore(backendSrv);
this.getTrend = this.getTrend_ZBXNEXT1193;
//getTrend = getTrend_30;

View File

@@ -2,7 +2,7 @@
* General Zabbix API methods
*/
export class ZabbixAPICoreService {
export class ZabbixAPICore {
/** @ngInject */
constructor(backendSrv) {