fix linter errors
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
"unused": true,
|
||||
"maxdepth": 6,
|
||||
"maxlen": 140,
|
||||
"esnext": true,
|
||||
"esversion": 8,
|
||||
|
||||
"globals": {
|
||||
"System": true,
|
||||
|
||||
2
Makefile
2
Makefile
@@ -43,4 +43,4 @@ clean:
|
||||
.PHONY: lint
|
||||
lint:
|
||||
yarn lint
|
||||
golint -set_exit_status pkg/...
|
||||
golint -min_confidence=1.1 -set_exit_status pkg/...
|
||||
|
||||
@@ -113,7 +113,7 @@ func TestBuildResponse(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Connetion Status Response",
|
||||
name: "Connection Status Response",
|
||||
responseData: connectionTestResponse{
|
||||
ZabbixVersion: "2.4",
|
||||
DbConnectorStatus: &dbConnectionStatus{
|
||||
|
||||
@@ -11,11 +11,11 @@ import { Zabbix } from './zabbix/zabbix';
|
||||
import { ZabbixAPIError } from './zabbix/connectors/zabbix_api/zabbixAPICore';
|
||||
import {
|
||||
DataSourceApi,
|
||||
DataSourceInstanceSettings,
|
||||
// DataSourceInstanceSettings,
|
||||
} from '@grafana/ui';
|
||||
import { BackendSrv, DataSourceSrv } from '@grafana/runtime';
|
||||
import { ZabbixAlertingService } from './zabbixAlerting.service';
|
||||
import { ZabbixConnectionTestQuery, ZabbixConnectionInfo, TemplateSrv, TSDBResponse } from './types';
|
||||
// import { BackendSrv, DataSourceSrv } from '@grafana/runtime';
|
||||
// import { ZabbixAlertingService } from './zabbixAlerting.service';
|
||||
// import { ZabbixConnectionTestQuery, ZabbixConnectionInfo, TemplateSrv, TSDBResponse } from './types';
|
||||
|
||||
const DEFAULT_ZABBIX_VERSION = 3;
|
||||
|
||||
|
||||
@@ -535,13 +535,13 @@ function filterTriggersByAcknowledge(triggers, acknowledged) {
|
||||
}
|
||||
}
|
||||
|
||||
function isNotAuthorized(message) {
|
||||
return (
|
||||
message === "Session terminated, re-login, please." ||
|
||||
message === "Not authorised." ||
|
||||
message === "Not authorized."
|
||||
);
|
||||
}
|
||||
// function isNotAuthorized(message) {
|
||||
// return (
|
||||
// message === "Session terminated, re-login, please." ||
|
||||
// message === "Not authorised." ||
|
||||
// message === "Not authorized."
|
||||
// );
|
||||
// }
|
||||
|
||||
function getSLAInterval(intervalMs) {
|
||||
// Too many intervals may cause significant load on the database, so decrease number of resulting points
|
||||
|
||||
@@ -2,7 +2,7 @@ import _ from 'lodash';
|
||||
import * as utils from '../utils';
|
||||
import responseHandler from '../responseHandler';
|
||||
import { CachingProxy } from './proxy/cachingProxy';
|
||||
import { ZabbixNotImplemented } from './connectors/dbConnector';
|
||||
// import { ZabbixNotImplemented } from './connectors/dbConnector';
|
||||
import { DBConnector } from './connectors/dbConnector';
|
||||
import { ZabbixAPIConnector } from './connectors/zabbix_api/zabbixAPIConnector';
|
||||
import { SQLConnector } from './connectors/sql/sqlConnector';
|
||||
|
||||
Reference in New Issue
Block a user