datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/data-fetching.service.ts
Methods |
constructor(alertService: AlertService, measurementService: MeasurementService, sanitizer: DomSanitizer, translateService: TranslateService, utilsService: UtilsService)
|
||||||||||||||||||
Parameters :
|
Async fetchAndPrepareDataToExport | |||||||||
fetchAndPrepareDataToExport(exportConfig: ExportConfig, isMeasurement: boolean)
|
|||||||||
Parameters :
Returns :
Promise<DataToExport[]>
|
Async fetchAndProcessMeasurementFile | |||||||||
fetchAndProcessMeasurementFile(details: DatapointDetails, measurementFileConfig: MeasurementFileConfig)
|
|||||||||
Parameters :
Returns :
Promise<DataToExportWithBackendCreatedFile | undefined>
|
Async fetchMeasurementDataFilesAndPairWithSourceDetails | |||||||||
fetchMeasurementDataFilesAndPairWithSourceDetails(acceptFileType: string, exportConfig: ExportConfig)
|
|||||||||
Parameters :
Returns :
Promise<DataToExportWithBackendCreatedFile[]>
|
Async getDatapointsExceedingLimit | ||||||||
getDatapointsExceedingLimit(exportConfig: ExportConfig)
|
||||||||
Checks if any of measurements requests may exceeded the limit, after which the export data is processed by the backend and the generated CSV/Excel file is sent by email. The threshold is set to 50_000 records in application's core properties (export.data.synchronous.limit).
Parameters :
Returns :
Promise<DatapointsExceedingLimit[]>
A promise that returns an array of objects representing datapoints files that will be sent by email. |
getLimitExceededMessage | ||||||||||||||||||||||||
getLimitExceededMessage(hasNoExportableData: boolean, emailDeliverableCount?: number, browserDownloadableCount?: number, nonRetrievableCount?: number, totalDatapointsSelectedForExportCount?: number)
|
||||||||||||||||||||||||
Retrieves the message to be displayed when the limit of datapoints is exceeded during file export.
Parameters :
Returns :
string
The message that can be injected. |
Async getSourcesWithPermissionsToRead | ||||||
getSourcesWithPermissionsToRead(datapointDetails: DatapointDetails[])
|
||||||
Parameters :
Returns :
Promise<string[]>
|
Async mergeMeasurementsWithItsSourceDetails | |||||||||
mergeMeasurementsWithItsSourceDetails(details: DatapointDetails, measurementFile: IFetchResponse)
|
|||||||||
Parameters :
Returns :
Promise<DataToExportWithBackendCreatedFile>
|
showSendViaEmailInfoAlert | ||||||||||||
showSendViaEmailInfoAlert(fileType: string, datapointsExceedingLimit: DatapointsExceedingLimit[])
|
||||||||||||
Displays an information alert about sending data via email. Only measurements API can send files via email.
Parameters :
Returns :
void
|