Skip to content
This repository was archived by the owner on Dec 11, 2022. It is now read-only.

Commit a06f2f6

Browse files
apply instance settings properties to datasource instance (#383)
1 parent 8327eba commit a06f2f6

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

src/datasource.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,24 +162,31 @@ export class BigQueryDatasource {
162162
}
163163
public authenticationType: string;
164164
public projectName: string;
165-
private readonly id: any;
165+
public readonly name: string;
166+
public readonly id: number;
167+
public readonly type: string;
168+
public readonly uid: string;
169+
private readonly url: string;
170+
private readonly baseUrl: string;
166171
private jsonData: any;
167172
private responseParser: ResponseParser;
168173
private queryModel: BigQueryQuery;
169-
private readonly baseUrl: string;
170-
private readonly url: string;
171174
private runInProject: string;
172175
private processingLocation: string;
173176
private queryPriority: string;
174177

175178
/** @ngInject */
176179
constructor(instanceSettings, private backendSrv, private $q, private templateSrv) {
180+
this.name = instanceSettings.name;
177181
this.id = instanceSettings.id;
182+
this.type = instanceSettings.type;
183+
this.uid = instanceSettings.uid;
184+
this.url = instanceSettings.url;
178185
this.jsonData = instanceSettings.jsonData;
186+
this.baseUrl = `/bigquery/`;
187+
179188
this.responseParser = new ResponseParser(this.$q);
180189
this.queryModel = new BigQueryQuery({});
181-
this.baseUrl = `/bigquery/`;
182-
this.url = instanceSettings.url;
183190
this.authenticationType = instanceSettings.jsonData.authenticationType || 'jwt';
184191
(async () => {
185192
this.projectName = instanceSettings.jsonData.defaultProject || (await this.getDefaultProject());

0 commit comments

Comments
 (0)