datasource-proxy: token exchange
This commit is contained in:
@@ -8,12 +8,20 @@ System.register([], function (_export) {
|
||||
function Datasource(instanceSettings, backendSrv) {
|
||||
this.url = instanceSettings.url;
|
||||
|
||||
// this.testDatasource = function() {
|
||||
// return backendSrv.datasourceRequest({
|
||||
// method: 'GET',
|
||||
// url: this.url + '/api/v4/search'
|
||||
// });
|
||||
// }
|
||||
//
|
||||
this.testDatasource = function() {
|
||||
return backendSrv.datasourceRequest({
|
||||
method: 'GET',
|
||||
url: this.url + '/api/v4/search'
|
||||
url: this.url + '/tokenTest'
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function ConfigCtrl() {
|
||||
@@ -22,12 +30,16 @@ System.register([], function (_export) {
|
||||
|
||||
ConfigCtrl.template = `
|
||||
<div class="gf-form">
|
||||
<label class="gf-form-label width-13">Email </label>
|
||||
<input type="text" class="gf-form-input max-width-18" ng-model='ctrl.current.jsonData.email'></input>
|
||||
<label class="gf-form-label width-13">TenantId </label>
|
||||
<input type="text" class="gf-form-input max-width-18" ng-model='ctrl.current.jsonData.tenantId'></input>
|
||||
</div>
|
||||
<div class="gf-form">
|
||||
<label class="gf-form-label width-13">Access key ID </label>
|
||||
<input type="text" class="gf-form-input max-width-18" ng-model='ctrl.current.secureJsonData.token'></input>
|
||||
<label class="gf-form-label width-13">ClientId </label>
|
||||
<input type="text" class="gf-form-input max-width-18" ng-model='ctrl.current.jsonData.clientId'></input>
|
||||
</div>
|
||||
<div class="gf-form">
|
||||
<label class="gf-form-label width-13">Client secret</label>
|
||||
<input type="text" class="gf-form-input max-width-18" ng-model='ctrl.current.secureJsonData.clientSecret'></input>
|
||||
</div>
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user