maintain scheme in insights (#10904)

* maintain scheme in insights

* fix compiles

* fix tests

* handle undefined

* fix windows tests

* fix imports

* handle remote resources
This commit is contained in:
Anthony Dresser
2020-06-15 14:23:31 -07:00
committed by GitHub
parent 127617402f
commit 16c27baf10
4 changed files with 32 additions and 18 deletions

View File

@@ -313,9 +313,9 @@ export class InsightsWidget extends DashboardWidget implements IDashboardWidget,
if (types.isStringArray(this.insightConfig.query)) {
this.insightConfig.query = this.insightConfig.query.join(' ');
} else if (this.insightConfig.queryFile) {
const filePath = await this.instantiationService.invokeFunction(resolveQueryFilePath, this.insightConfig.queryFile);
const fileUri: URI = await this.instantiationService.invokeFunction(resolveQueryFilePath, this.insightConfig.queryFile);
this.insightConfig.query = (await this.fileService.readFile(URI.file(filePath))).value.toString();
this.insightConfig.query = (await this.fileService.readFile(fileUri)).value.toString();
}
}
}