Fixed #52 - Added Basic Auth support.

This commit is contained in:
Alexander Zobnin
2015-07-12 11:32:51 +03:00
parent d716c266ba
commit d20bd8e821
2 changed files with 24 additions and 5 deletions

View File

@@ -23,6 +23,8 @@ function (angular, _, kbn) {
function ZabbixAPIDatasource(datasource) {
this.name = datasource.name;
this.url = datasource.url;
this.basicAuth = datasource.basicAuth;
this.withCredentials = datasource.withCredentials;
// TODO: fix passing username and password from config.html
this.username = datasource.meta.username;
@@ -36,7 +38,7 @@ function (angular, _, kbn) {
this.limitmetrics = datasource.meta.limitmetrics || 100;
// Initialize Zabbix API
this.zabbixAPI = new ZabbixAPI(this.url, this.username, this.password);
this.zabbixAPI = new ZabbixAPI(this.url, this.username, this.password, this.basicAuth, this.withCredentials);
}
/**