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