@@ -184,29 +184,12 @@ func HandleStart() {
184
184
let appDelegate = NSApplication . shared. delegate as? AppDelegate
185
185
appDelegate? . initializeMenus ( status: " Starting " )
186
186
}
187
- var response : Data
188
187
do {
189
- response = try SendCommandToDaemon ( HTTPMethod . GET, " /api/start " )
190
188
displayNotification ( title: " Starting Cluster " , body: " Starting OpenShift Cluster, this could take a few minutes.. " )
189
+ _ = try SendCommandToDaemon ( HTTPMethod . GET, " /api/start " )
190
+ displayNotification ( title: " Successfully started cluster " , body: " OpenShift cluster is running " )
191
191
} catch let error {
192
- DispatchQueue . main. async {
193
- showAlertFailedAndCheckLogs ( message: " Failed to start OpenShift cluster " , informativeMsg: " \( error) " )
194
- let appDelegate = NSApplication . shared. delegate as? AppDelegate
195
- appDelegate? . pollStatus ( )
196
- }
197
- return
198
- }
199
- do {
200
- let startResult = try JSONDecoder ( ) . decode ( StartResult . self, from: response)
201
- if startResult. Status == " Running " {
202
- DispatchQueue . main. async {
203
- let appDelegate = NSApplication . shared. delegate as? AppDelegate
204
- appDelegate? . pollStatus ( )
205
- displayNotification ( title: " Successfully started Cluster " , body: " OpenShift Cluster is running " )
206
- }
207
- }
208
- } catch let jsonErr {
209
- displayNotification ( title: " Cannot parse daemon answer " , body: jsonErr. localizedDescription)
192
+ showAlertFailedAndCheckLogs ( message: " Failed to start OpenShift cluster " , informativeMsg: " \( error) " )
210
193
}
211
194
}
212
195
0 commit comments