Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

651 better handling of errors when persistance fails to purge #652

Merged
merged 1 commit into from
Feb 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions modules/CmpdRegBulkLoader/src/client/CmpdRegBulkLoader.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ class window.AssignSdfPropertiesController extends Backbone.View
@$('.bv_registering').hide()
@$('.bv_saveErrorModal').modal('show')
@$('.bv_saveErrorTitle').html "Error: Template Not Saved"
@$('.bv_errorMessage').html "An error occurred while trying to save the template. The compounds have not been registered yet. Please try again or contact an administrator."
@$('.bv_errorMessage').html "An error occurred while trying to save the template. The compounds have not been registered yet.<br>Please try again or contact an administrator."

addProjectToMappingsPayLoad: ->
if @project?
Expand Down Expand Up @@ -735,7 +735,7 @@ class window.AssignSdfPropertiesController extends Backbone.View
@$('.bv_registering').hide()
@$('.bv_saveErrorModal').modal('show')
@$('.bv_saveErrorTitle').html "Error: Compounds Not Registered"
@$('.bv_errorMessage').html "An error occurred while trying to register the compounds. Please try again or contact an administrator."
@$('.bv_errorMessage').html "An error occurred while trying to register the compounds.<br>Please try again or contact an administrator."

class window.BulkRegCmpdsController extends Backbone.View
template: _.template($("#BulkRegCmpdsView").html())
Expand Down Expand Up @@ -902,7 +902,7 @@ class window.PurgeFilesController extends Backbone.View

handleGetFilesError: ->
$('.bv_fileTableController').addClass "well"
$('.bv_fileTableController').html "An error occurred when getting files to purge. Please try refreshing the page or contact an administrator."
$('.bv_fileTableController').html "An error occurred when getting files to purge.<br>Please try refreshing the page or contact an administrator."
$('.bv_purgeFileBtn').hide()

selectedFileUpdated: (file) =>
Expand Down Expand Up @@ -946,7 +946,7 @@ class window.PurgeFilesController extends Backbone.View
@$('.bv_dependencyCheckModal').modal "hide"
@$('.bv_dependenciesCheckErrorModal').modal 'show'
# backdrop: 'static'
@$('.bv_dependenciesCheckError').html "There has been an error checking the dependencies. Please try again or contact an administrator."
@$('.bv_dependenciesCheckError').html "There has been an error checking the dependencies.<br>Please try again or contact an administrator."

handleCancelBtnClicked: ->
@$('.bv_showDependenciesModal').modal "hide"
Expand Down Expand Up @@ -981,13 +981,16 @@ class window.PurgeFilesController extends Backbone.View
downloadUrl = window.conf.datafiles.downloadurl.prefix + "cmpdreg_bulkload/" + response.fileName
@$('.bv_purgedFileName').attr "href", downloadUrl
@$('.bv_purgedFileName').html response.fileName
@$('.bv_purgeSummaryWrapper .bv_downloadPurgedFile').show()
@$('.bv_purgeSummaryWrapper').show()
@fileInfoToPurge = null
@fileNameToPurge = null
@getFiles()

handlePurgeError: ->
@$('.bv_purgeSummary').html "An error occurred purging the file: "+ @fileNameToPurge + " .Please try again or contact an administrator."
@$('.bv_showDependenciesModal').modal "hide"
@$('.bv_purgeSummaryWrapper .bv_downloadPurgedFile').hide()
@$('.bv_purgeSummary').html "An error occurred purging the file: "+ @fileNameToPurge + ".<br>Please try again or contact an administrator."
@$('.bv_purgeSummaryWrapper').show()
@fileInfoToPurge = null
@fileNameToPurge = null
Expand Down