refactor: proxy and cache WIP
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* General Zabbix API methods
|
||||
*/
|
||||
|
||||
export class ZabbixAPICoreService {
|
||||
export class ZabbixAPICore {
|
||||
|
||||
/** @ngInject */
|
||||
constructor(backendSrv) {
|
||||
|
||||
Reference in New Issue
Block a user