mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 01:25:36 -05:00
Sql Proj: Adding a new sqlproj template for SQL dbs (#18636)
This commit is contained in:
@@ -7,7 +7,7 @@ import * as vscode from 'vscode';
|
||||
import * as constants from '../common/constants';
|
||||
import * as utils from '../common/utils';
|
||||
import * as uiUtils from './utils';
|
||||
import { AppSettingType, IDeployAppIntegrationProfile, IDeployProfile, ILocalDbSetting } from '../models/deploy/deployProfile';
|
||||
import { AppSettingType, DockerImageInfo, IDeployAppIntegrationProfile, IDeployProfile, ILocalDbSetting } from '../models/deploy/deployProfile';
|
||||
import { Project } from '../models/project';
|
||||
import { getPublishDatabaseSettings } from './publishDatabaseQuickpick';
|
||||
import * as path from 'path';
|
||||
@@ -70,10 +70,8 @@ export async function launchDeployAppIntegrationQuickpick(project: Project): Pro
|
||||
};
|
||||
}
|
||||
|
||||
async function launchEulaQuickPick(baseImage: string): Promise<boolean> {
|
||||
async function launchEulaQuickPick(imageInfo: DockerImageInfo | undefined): Promise<boolean> {
|
||||
let eulaAccepted: boolean = false;
|
||||
const baseImages = uiUtils.getDockerBaseImages();
|
||||
const imageInfo = baseImages.find(x => x.name === baseImage);
|
||||
const agreementInfo = imageInfo?.agreementInfo;
|
||||
if (agreementInfo) {
|
||||
const openEulaButton: vscode.QuickInputButton = {
|
||||
@@ -165,9 +163,9 @@ export async function launchPublishToDockerContainerQuickpick(project: Project):
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const baseImages = uiUtils.getDockerBaseImages();
|
||||
const baseImages = uiUtils.getDockerBaseImages(project.getProjectTargetVersion());
|
||||
const baseImage = await vscode.window.showQuickPick(
|
||||
baseImages.map(x => x.name),
|
||||
baseImages.map(x => x.displayName),
|
||||
{ title: constants.selectBaseImage(name), ignoreFocusOut: true });
|
||||
|
||||
// Return when user hits escape
|
||||
@@ -175,20 +173,19 @@ export async function launchPublishToDockerContainerQuickpick(project: Project):
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const eulaAccepted = await launchEulaQuickPick(baseImage);
|
||||
const imageInfo = baseImages.find(x => x.displayName === baseImage);
|
||||
const eulaAccepted = await launchEulaQuickPick(imageInfo);
|
||||
if (!eulaAccepted) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const imageInfo = baseImages.find(x => x.name === baseImage);
|
||||
|
||||
localDbSetting = {
|
||||
serverName: constants.defaultLocalServerName,
|
||||
userName: constants.defaultLocalServerAdminName,
|
||||
dbName: project.projectFileName,
|
||||
password: password,
|
||||
port: +portNumber,
|
||||
dockerBaseImage: baseImage,
|
||||
dockerBaseImage: imageInfo?.name || '',
|
||||
dockerBaseImageEula: imageInfo?.agreementInfo?.link?.url || ''
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user