Commit 8bcaecf4 authored by Kostis Trantzas's avatar Kostis Trantzas
Browse files

code housekeeping & toast dialog correction when the execution of primitive is canceled.

parent 610b670c
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ export class ExecuteManoServicePrimitiveComponent implements OnInit {
    this.serviceService.patchService({service: serviceUpdate, id: this.data.serviceToBeUpdated.id}).subscribe(
      data => { },
      error => { console.error(error); this.dialogRef.close(error)},
      () => { this.dialogRef.close('updated') }
      () => { this.dialogRef.close("updated") }
    )
  }
}
+5 −3
Original line number Diff line number Diff line
@@ -100,7 +100,6 @@ export class PreviewServiceComponent implements OnInit {
    this.serviceService.retrieveService({id: this.serviceID}).subscribe(
      data => {
        this.service = data
        // this.service = dummyService
      },
      error => {
        console.error(error)
@@ -303,10 +302,13 @@ export class PreviewServiceComponent implements OnInit {
        if (result instanceof HttpErrorResponse) {
          this.toast.error("An error occurred while attempting to queue the service primitive for execution")
        } else {
          // check if something is returned from the dialog (updated service object) or the dialog is cancelled
          if (result) {
            this.toast.success("The service primitive was successfully queued for execution. Please check NSLCM for updates.")
            this.retrieveService()
          }
        }
      }
    )
  }