mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
ML - Bug fixing (#11920)
* Fixed a bug with validating inputs when generating predict script * Fixed the bug with verifying R packages * Fixed the tests * Added warning for when output column data type doesn't match with model output data type * Fix the issue with selecting db
This commit is contained in:
@@ -165,11 +165,13 @@ export class InstalledPackagesTab {
|
||||
*/
|
||||
public static async getLocationComponent(view: azdata.ModelView, dialog: ManagePackagesDialog): Promise<azdata.Component> {
|
||||
const locations = await dialog.model.getLocations();
|
||||
let location: string;
|
||||
let component: azdata.Component;
|
||||
if (locations && locations.length === 1) {
|
||||
component = view.modelBuilder.text().withProperties({
|
||||
value: locations[0].displayName
|
||||
}).component();
|
||||
location = locations[0].name;
|
||||
} else if (locations && locations.length > 1) {
|
||||
let dropdownValues = locations.map(x => {
|
||||
return {
|
||||
@@ -179,6 +181,7 @@ export class InstalledPackagesTab {
|
||||
});
|
||||
const currentLocation = await dialog.model.getCurrentLocation();
|
||||
const selectedLocation = dropdownValues.find(x => x.name === currentLocation);
|
||||
location = currentLocation || locations[0].name;
|
||||
let locationDropDown = view.modelBuilder.dropDown().withProperties({
|
||||
values: dropdownValues,
|
||||
value: selectedLocation || dropdownValues[0]
|
||||
@@ -198,8 +201,8 @@ export class InstalledPackagesTab {
|
||||
component = view.modelBuilder.text().withProperties({
|
||||
}).component();
|
||||
}
|
||||
if (locations && locations.length > 0) {
|
||||
dialog.changeLocation(locations[0].name);
|
||||
if (location) {
|
||||
dialog.changeLocation(location);
|
||||
}
|
||||
return component;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user