         isApiScanEnabled: isApiScanEnabled
       @get("ajax").post apiScanOptions, data: data
       .then (data)->
+        @send "closeModal"
         that.send "dynamicScan"
         that.get("notify").success "Starting the scan"
       .catch (error) ->

    closeModal: ->
      @set "showAPIScanModal", false

    runAPIScan: ->
      @set "isApiScanEnabled", true
      isApiScanEnabled = @get "isApiScanEnabled"
      project_id = @get "file.project.id"
      apiScanOptions = [ENV.host,ENV.namespace, ENV.endpoints.apiScanOptions, project_id].join '/'
      data =
        isApiScanEnabled: isApiScanEnabled
      @get("ajax").post apiScanOptions, data: data
      .then (data)->
        that.send "closeModal"
        that.send "dynamicScan"
        that.get("notify").success "Successfully added the url filter & Starting the scan"
      .catch (error) ->
        for error in error.errors
          that.get("notify").error error.detail?.message


`export default VncViewerComponent`

    doNotRunAPIScan: ->
      @set "isApiScanEnabled", false
      @send "isApiScanEnabled"

    runAPIScan: ->
      @set "isApiScanEnabled", true
      @send "isApiScanEnabled"

    isApiScanEnabled: ->
      isApiScanEnabled = @get "isApiScanEnabled"
