-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sequence search : button in output tab to add dataset
sequence-search.js : declare and comment viewDatasetFlag. blast-results.js : use upload-base and upload-table. add columnsKeyString, c_name, c_chr, c_pos. add services store, auth, classNames:blast-results. add viewDatasetFlag. add didReceiveAttrs() : initialise selectedParent, namespace. add validateData() app.scss : .blast-results : margin. sequence-search.hbs : pass to blast-results : datasets, refreshDatasets, viewDataset. blast-results.hbs : from data-csv : add message fields, and inputs : selectedDataset, selectedParent (currently read-only), namespace. add checkbox viewDatasetFlag, submit button. add upload-base.js, factored from data-base.js add upload-table.js, factored from data-csv.js
- Loading branch information
1 parent
66d59ba
commit 9640e0f
Showing
7 changed files
with
449 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
|
||
/** | ||
* factored from components/panel/upload/data-base.js | ||
* May evolve this to a decorator or a sub-component. | ||
* | ||
* usage : | ||
* | ||
// file: null, // not required | ||
isProcessing: false, | ||
successMessage: null, | ||
errorMessage: null, | ||
warningMessage: null, | ||
progressMsg: '', | ||
*/ | ||
|
||
export default { | ||
|
||
|
||
setProcessing() { | ||
this.updateProgress(0, 'up'); | ||
this.setProperties({ | ||
isProcessing: true, | ||
successMessage: null, | ||
errorMessage: null, | ||
warningMessage: null | ||
}); | ||
}, | ||
setSuccess(msg) { | ||
let response = msg ? msg : 'Uploaded successfully'; | ||
/** .file is undefined (null) when data is read from table instead of from file */ | ||
let file = this.get('file'); | ||
if (file) | ||
response += ` from file "${file.name}"`; | ||
this.setProperties({ | ||
isProcessing: false, | ||
successMessage: response, | ||
}); | ||
}, | ||
setError(msg) { | ||
this.setProperties({ | ||
isProcessing: false, | ||
errorMessage: msg, | ||
}); | ||
}, | ||
setWarning(msg) { | ||
this.setProperties({ | ||
isProcessing: false, | ||
successMessage: null, | ||
errorMessage: null, | ||
warningMessage: msg, | ||
}); | ||
}, | ||
clearMsgs() { | ||
this.setProperties({ | ||
successMessage: null, | ||
errorMessage: null, | ||
warningMessage: null, | ||
}); | ||
}, | ||
|
||
/** Callback used by data upload, to report progress percent updates */ | ||
updateProgress(percentComplete, direction) { | ||
if (direction === 'up') { | ||
if (percentComplete === 100) { | ||
this.set('progressMsg', 'Please wait. Updating database.'); | ||
} else { | ||
this.set('progressMsg', | ||
'Please wait. File upload in progress (' + | ||
percentComplete.toFixed(0) + '%)' ); | ||
} | ||
} else { | ||
this.set('progressMsg', | ||
'Please wait. Receiving result (' + percentComplete.toFixed(0) + '%)' ); | ||
} | ||
}, | ||
|
||
|
||
}; |
Oops, something went wrong.