Resolved #54 - Implemented testDatasource() method for test connection to zabbix server.
This commit is contained in:
@@ -41,6 +41,21 @@ function (angular, _, kbn) {
|
||||
this.zabbixAPI = new ZabbixAPI(this.url, this.username, this.password, this.basicAuth, this.withCredentials);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test connection to Zabbix API
|
||||
*
|
||||
* @return {object} Connection status and Zabbix API version
|
||||
*/
|
||||
ZabbixAPIDatasource.prototype.testDatasource = function() {
|
||||
return this.zabbixAPI.getZabbixAPIVersion().then(function (apiVersion) {
|
||||
return {
|
||||
status: "success",
|
||||
title: "Success",
|
||||
message: "Zabbix API version: " + apiVersion
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Calls for each panel in dashboard.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user