mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Refactoring pull request for basic auth improvement
This commit is contained in:
@@ -14,17 +14,9 @@ function (angular, _, $, config, kbn, moment) {
|
||||
module.factory('GraphiteDatasource', function(dashboard, $q, filterSrv, $http) {
|
||||
|
||||
function GraphiteDatasource(datasource) {
|
||||
var passwordEnd = datasource.url.indexOf('@');
|
||||
if(passwordEnd > 0) {
|
||||
var userStart = datasource.url.indexOf('//') + 2;
|
||||
var urlHead = datasource.url.substring(0,userStart);
|
||||
this.url = urlHead + datasource.url.substring(passwordEnd);
|
||||
}
|
||||
else {
|
||||
this.url = datasource.url;
|
||||
}
|
||||
this.type = 'graphite';
|
||||
this.basicAuth = datasource.basicAuth;
|
||||
this.url = datasource.url;
|
||||
}
|
||||
|
||||
GraphiteDatasource.prototype.query = function(options) {
|
||||
|
||||
Reference in New Issue
Block a user