Trim spaces from arc connect controller dialog (#15321)

This commit is contained in:
Charles Gagnon
2021-05-04 08:38:06 -07:00
committed by GitHub
parent 0e7bd8a939
commit 726ad26a75

View File

@@ -193,7 +193,7 @@ abstract class ControllerDialogBase extends InitializingComponent {
return {
id: this.id,
endpoint: url || undefined,
namespace: this.namespaceInputBox.value!,
namespace: this.namespaceInputBox.value!.trim(),
kubeConfigFilePath: this.kubeConfigInputBox.value!,
kubeClusterContext: this.clusterContextRadioGroup.value!,
name: this.nameInputBox.value ?? '',
@@ -237,7 +237,7 @@ export class ConnectToControllerDialog extends ControllerDialogBase {
if (!this.namespaceInputBox.value || !this.usernameInputBox.value || !this.passwordInputBox.value) {
return false;
}
let url = this.urlInputBox.value || '';
let url = this.urlInputBox.value?.trim() || '';
if (url) {
// Only support https connections
if (url.toLowerCase().startsWith('http://')) {