@@ -171,7 +171,7 @@ public ResponseEntity<?> install(@PathVariable int projectId,
171171 final EnvironmentConfig cachedConfig = envConfig ;
172172
173173 // install the hub
174- boolean installed = dataHubService .install (envConfig .getMlSettings (), new HubDeployStatusListener () {
174+ dataHubService .install (envConfig .getMlSettings (), new HubDeployStatusListener () {
175175 @ Override
176176 public void onStatusChange (int percentComplete , String message ) {
177177 template .convertAndSend ("/topic/install-status" , new StatusMessage (percentComplete , message ));
@@ -181,6 +181,9 @@ public void onStatusChange(int percentComplete, String message) {
181181 public void onError () {}
182182 });
183183
184+ envConfig .checkIfInstalled ();
185+ boolean installed = envConfig .getInstallInfo ().isInstalled ();
186+
184187 envConfig .setInitialized (installed );
185188 if (installed ) {
186189 if (environment .equals ("local" )) {
@@ -192,13 +195,13 @@ public void onError() {}
192195 startProjectWatcher ();
193196 }
194197
195- return new ResponseEntity <>(HttpStatus .NO_CONTENT );
198+ return new ResponseEntity <>(envConfig . toJson (), HttpStatus .OK );
196199 }
197200
198201 @ RequestMapping (value = "/{projectId}/{environment}/uninstall" , method = RequestMethod .DELETE )
199202 @ ResponseBody
200203 public ResponseEntity <?> unInstall (@ PathVariable int projectId ,
201- @ PathVariable String environment ) {
204+ @ PathVariable String environment ) throws JsonProcessingException {
202205
203206 requireAuth ();
204207
@@ -215,7 +218,10 @@ public void onStatusChange(int percentComplete, String message) {
215218 @ Override
216219 public void onError () {}
217220 });
218- return new ResponseEntity <>(HttpStatus .OK );
221+ envConfig .checkIfInstalled ();
222+ boolean installed = envConfig .getInstallInfo ().isInstalled ();
223+
224+ return new ResponseEntity <>(envConfig .toJson (), HttpStatus .OK );
219225 }
220226
221227 @ RequestMapping (value = "/{projectId}/{environment}/last-deployed" , method = RequestMethod .GET )
0 commit comments