mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Add required field to kube config picker (#15795)
This commit is contained in:
@@ -18,7 +18,7 @@ const newFileUri = vscode.Uri.file(path.join('path', 'to', 'new', '.kube', 'conf
|
|||||||
describe('filePicker', function (): void {
|
describe('filePicker', function (): void {
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
const { modelBuilderMock } = createModelViewMock();
|
const { modelBuilderMock } = createModelViewMock();
|
||||||
filePicker = new FilePicker(modelBuilderMock.object, initialPath, (_disposable) => { }, '', '');
|
filePicker = new FilePicker(modelBuilderMock.object, initialPath, (_disposable) => { }, '', '', true);
|
||||||
});
|
});
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ export class FilePicker {
|
|||||||
initialPath: string,
|
initialPath: string,
|
||||||
onNewDisposableCreated: (disposable: vscode.Disposable) => void,
|
onNewDisposableCreated: (disposable: vscode.Disposable) => void,
|
||||||
ariaLabel: string,
|
ariaLabel: string,
|
||||||
validationErrorMessage: string
|
validationErrorMessage: string,
|
||||||
|
required: boolean
|
||||||
) {
|
) {
|
||||||
const buttonWidth = 80;
|
const buttonWidth = 80;
|
||||||
this.filePathInputBox = modelBuilder.inputBox()
|
this.filePathInputBox = modelBuilder.inputBox()
|
||||||
@@ -29,6 +30,7 @@ export class FilePicker {
|
|||||||
value: initialPath,
|
value: initialPath,
|
||||||
ariaLabel: ariaLabel,
|
ariaLabel: ariaLabel,
|
||||||
validationErrorMessage: validationErrorMessage,
|
validationErrorMessage: validationErrorMessage,
|
||||||
|
required: required,
|
||||||
width: 350
|
width: 350
|
||||||
}).withValidation(async () => {
|
}).withValidation(async () => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -98,7 +98,8 @@ abstract class ControllerDialogBase extends InitializingComponent {
|
|||||||
controllerInfo?.kubeConfigFilePath || getDefaultKubeConfigPath(),
|
controllerInfo?.kubeConfigFilePath || getDefaultKubeConfigPath(),
|
||||||
(disposable) => this._toDispose.push(disposable),
|
(disposable) => this._toDispose.push(disposable),
|
||||||
loc.controllerKubeConfig,
|
loc.controllerKubeConfig,
|
||||||
loc.invalidConfigPath
|
loc.invalidConfigPath,
|
||||||
|
true
|
||||||
);
|
);
|
||||||
this.modelBuilder.inputBox()
|
this.modelBuilder.inputBox()
|
||||||
.withProps({
|
.withProps({
|
||||||
|
|||||||
Reference in New Issue
Block a user