Fix app name in Report Issue dialog (#1292)

This commit is contained in:
Karl Burtram
2018-04-29 13:19:09 -07:00
committed by GitHub
parent eece0677a7
commit db5156e4cd
3 changed files with 10 additions and 7 deletions

View File

@@ -462,11 +462,12 @@ export class IssueReporter extends Disposable {
response.json().then(result => { response.json().then(result => {
this.clearSearchResults(); this.clearSearchResults();
if (result && result.candidates) { // {{SQL CARBON EDIT}}
this.displaySearchResults(result.candidates); // if (result && result.candidates) {
} else { // this.displaySearchResults(result.candidates);
throw new Error('Unexpected response, no candidates property'); // } else {
} // throw new Error('Unexpected response, no candidates property');
// }
}).catch((error) => { }).catch((error) => {
this.logSearchError(error); this.logSearchError(error);
}); });

View File

@@ -59,13 +59,14 @@ export class IssueReporterModel {
assign(this._data, newData); assign(this._data, newData);
} }
// {{SQL CARBON EDIT}}
serialize(): string { serialize(): string {
return ` return `
Issue Type: <b>${this.getIssueTypeTitle()}</b> Issue Type: <b>${this.getIssueTypeTitle()}</b>
${this._data.issueDescription} ${this._data.issueDescription}
VS Code version: ${this._data.versionInfo && this._data.versionInfo.vscodeVersion} SQL Operations Studio version: ${this._data.versionInfo && this._data.versionInfo.vscodeVersion}
OS version: ${this._data.versionInfo && this._data.versionInfo.os} OS version: ${this._data.versionInfo && this._data.versionInfo.os}
${this.getInfos()} ${this.getInfos()}

View File

@@ -23,6 +23,7 @@ suite('IssueReporter', () => {
}); });
}); });
// {{SQL CARBON EDIT}}
test('serializes model skeleton when no data is provided', () => { test('serializes model skeleton when no data is provided', () => {
const issueReporterModel = new IssueReporterModel(); const issueReporterModel = new IssueReporterModel();
assert.equal(issueReporterModel.serialize(), assert.equal(issueReporterModel.serialize(),
@@ -31,7 +32,7 @@ Issue Type: <b>Feature Request</b>
undefined undefined
VS Code version: undefined SQL Operations Studio version: undefined
OS version: undefined OS version: undefined