mysql-connector: fix tests

This commit is contained in:
Alexander Zobnin
2017-07-23 11:38:30 +03:00
parent 9334b27eea
commit ba6a04a120
7 changed files with 16 additions and 10 deletions

View File

@@ -196,13 +196,12 @@ System.register(['lodash', 'app/core/utils/datemath', './utils', './migrations',
_export('ZabbixAPIDatasource', ZabbixAPIDatasource = function () {
/** @ngInject */
function ZabbixAPIDatasource(instanceSettings, templateSrv, alertSrv, dashboardSrv, datasourceSrv, zabbixAlertingSrv, Zabbix) {
function ZabbixAPIDatasource(instanceSettings, templateSrv, alertSrv, dashboardSrv, zabbixAlertingSrv, Zabbix) {
_classCallCheck(this, ZabbixAPIDatasource);
this.templateSrv = templateSrv;
this.alertSrv = alertSrv;
this.dashboardSrv = dashboardSrv;
this.datasourceSrv = datasourceSrv;
this.zabbixAlertingSrv = zabbixAlertingSrv;
// Use custom format for template variables

File diff suppressed because one or more lines are too long

View File

@@ -15,7 +15,10 @@ describe('ZabbixDatasource', () => {
password: 'zabbix',
trends: true,
trendsFrom: '14d',
trendsRange: '7d'
trendsRange: '7d',
dbConnection: {
enabled: false
}
}
};
ctx.templateSrv = {};

View File

@@ -56,13 +56,12 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
var ZabbixAPIDatasource = function () {
/** @ngInject */
function ZabbixAPIDatasource(instanceSettings, templateSrv, alertSrv, dashboardSrv, datasourceSrv, zabbixAlertingSrv, Zabbix) {
function ZabbixAPIDatasource(instanceSettings, templateSrv, alertSrv, dashboardSrv, zabbixAlertingSrv, Zabbix) {
_classCallCheck(this, ZabbixAPIDatasource);
this.templateSrv = templateSrv;
this.alertSrv = alertSrv;
this.dashboardSrv = dashboardSrv;
this.datasourceSrv = datasourceSrv;
this.zabbixAlertingSrv = zabbixAlertingSrv;
// Use custom format for template variables

View File

@@ -29,7 +29,10 @@ describe('ZabbixDatasource', function () {
password: 'zabbix',
trends: true,
trendsFrom: '14d',
trendsRange: '7d'
trendsRange: '7d',
dbConnection: {
enabled: false
}
}
};
ctx.templateSrv = {};

View File

@@ -13,11 +13,10 @@ import {ZabbixAPIError} from './zabbixAPICore.service.js';
class ZabbixAPIDatasource {
/** @ngInject */
constructor(instanceSettings, templateSrv, alertSrv, dashboardSrv, datasourceSrv, zabbixAlertingSrv, Zabbix) {
constructor(instanceSettings, templateSrv, alertSrv, dashboardSrv, zabbixAlertingSrv, Zabbix) {
this.templateSrv = templateSrv;
this.alertSrv = alertSrv;
this.dashboardSrv = dashboardSrv;
this.datasourceSrv = datasourceSrv;
this.zabbixAlertingSrv = zabbixAlertingSrv;
// Use custom format for template variables

View File

@@ -15,7 +15,10 @@ describe('ZabbixDatasource', () => {
password: 'zabbix',
trends: true,
trendsFrom: '14d',
trendsRange: '7d'
trendsRange: '7d',
dbConnection: {
enabled: false
}
}
};
ctx.templateSrv = {};