mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -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 {
|
||||
beforeEach(async () => {
|
||||
const { modelBuilderMock } = createModelViewMock();
|
||||
filePicker = new FilePicker(modelBuilderMock.object, initialPath, (_disposable) => { }, '', '');
|
||||
filePicker = new FilePicker(modelBuilderMock.object, initialPath, (_disposable) => { }, '', '', true);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
@@ -21,7 +21,8 @@ export class FilePicker {
|
||||
initialPath: string,
|
||||
onNewDisposableCreated: (disposable: vscode.Disposable) => void,
|
||||
ariaLabel: string,
|
||||
validationErrorMessage: string
|
||||
validationErrorMessage: string,
|
||||
required: boolean
|
||||
) {
|
||||
const buttonWidth = 80;
|
||||
this.filePathInputBox = modelBuilder.inputBox()
|
||||
@@ -29,6 +30,7 @@ export class FilePicker {
|
||||
value: initialPath,
|
||||
ariaLabel: ariaLabel,
|
||||
validationErrorMessage: validationErrorMessage,
|
||||
required: required,
|
||||
width: 350
|
||||
}).withValidation(async () => {
|
||||
try {
|
||||
|
||||
@@ -98,7 +98,8 @@ abstract class ControllerDialogBase extends InitializingComponent {
|
||||
controllerInfo?.kubeConfigFilePath || getDefaultKubeConfigPath(),
|
||||
(disposable) => this._toDispose.push(disposable),
|
||||
loc.controllerKubeConfig,
|
||||
loc.invalidConfigPath
|
||||
loc.invalidConfigPath,
|
||||
true
|
||||
);
|
||||
this.modelBuilder.inputBox()
|
||||
.withProps({
|
||||
|
||||
Reference in New Issue
Block a user