Close corpus analysis init modal only if meta data has been recieved.

This commit is contained in:
Stephan Porada 2020-09-24 10:13:15 +02:00
parent b5ec4906c5
commit b6986e2581
3 changed files with 21 additions and 1 deletions

View File

@ -4,9 +4,11 @@
*/
function saveMetaData() {
let [payload, client, results, rest] = arguments;
client.notifyView('meta-data-recieving');
results.metaData.init(payload)
console.info('Metada saved:', results);
client.isBusy = false;
client.notifyView('meta-data-recieved');
}
/**

View File

@ -35,8 +35,16 @@ function connectingCallback(resultsList, detail) {
resultsList.analysisInitModal.open();
}
// Callback that closes teh loading modal from above.
// Callback that closes the loading modal from above.
function connectedCallback(resultsList, detail) {
/**
* In the past this closed the init modal. But the init modal is now being
* closed when the meta data has also been recieved. See below.
*/
}
// Callback that closes the loading modal from above.
function metaDataRecievedCallback(resultsList, detail) {
resultsList.analysisInitModal.close();
}
@ -233,6 +241,7 @@ function resultsDataRecievedCallback(resultsList, detail) {
export {
connectingCallback,
connectedCallback,
metaDataRecievedCallback,
clientFailedCallback,
queryDataPreparingCallback,
queryDataRecievingCallback,

View File

@ -10,6 +10,7 @@
import {
connectingCallback,
connectedCallback,
metaDataRecievedCallback,
clientFailedCallback,
queryDataPreparingCallback,
queryDataRecievingCallback,
@ -38,6 +39,14 @@ function recieveClientNotification(eventType, resultsList) {
console.info('View recieved notification:', caseIdentifier);
connectedCallback(resultsList, event.detail);
break;
case 'meta-data-recieving':
console.info('View recieved notification:', caseIdentifier);
break;
case 'meta-data-recieved':
console.info('View recieved notification:', caseIdentifier);
// execute
metaDataRecievedCallback(resultsList, event.detail);
break;
case 'query-data-prepareing':
console.info('View recieved notification:', caseIdentifier);
// Hide all download buttons