@@ -21,7 +21,6 @@ public sealed class InstanceSelectionScreen(IConnectionConfigRepository _configR
2121 private const string EnterInstanceName = "Enter instance name:" ;
2222 private const string EnterConnStr = "Enter connection string:" ;
2323 private const string DefaultConnStr = "http://localhost:2379" ;
24- private const string UseSsl = "Use SSL?" ;
2524 private const string EnterUsername = "Enter username (optional, leave empty for none):" ;
2625 private const string EnterPassword = "Enter password:" ;
2726 private const string Connecting = "Connecting..." ;
@@ -58,11 +57,7 @@ await AnsiConsole.Status()
5857 . StartAsync ( Connecting , async ctx =>
5958 {
6059 await _etcdClient . ConnectAsync ( selected ) ;
61-
62- var healthy = await _etcdClient . PingAsync ( ) ;
63-
64- if ( ! healthy )
65- throw new Exception ( "Server did not respond." ) ;
60+ await _etcdClient . PingAsync ( ) ;
6661 } ) ;
6762
6863 AnsiConsole . MarkupLine ( ConnectedSuccess ) ;
@@ -71,9 +66,8 @@ await AnsiConsole.Status()
7166 }
7267 catch ( Exception ex )
7368 {
74- AnsiConsole . MarkupLine ( $ "[red]Failed to connect: { ex . Message } [/] ") ;
69+ AnsiConsole . MarkupLine ( $ "[red]Failed to connect:[/] { ex . Message } ") ;
7570 AnsiConsole . WriteLine ( ) ;
76-
7771 AnsiConsole . MarkupLine ( Prompt . PressAnyKeyMarkup ) ;
7872 Console . ReadKey ( true ) ;
7973 }
@@ -154,11 +148,6 @@ private void AddInstanceInteractive()
154148 return ;
155149 }
156150
157- var useSsl = Prompt . Confirm ( UseSsl ) ;
158-
159- if ( useSsl is null )
160- return ;
161-
162151 var username = Prompt . Ask ( EnterUsername ) ;
163152
164153 if ( username is null )
@@ -178,7 +167,6 @@ private void AddInstanceInteractive()
178167 {
179168 Name = name ,
180169 ConnectionString = connectionString ,
181- UseSsl = useSsl . Value ,
182170 Username = string . IsNullOrEmpty ( username ) ? null : username ,
183171 Password = string . IsNullOrEmpty ( password ) ? null : password
184172 } ;
0 commit comments