mirror of
https://github.com/nasa/openmct.git
synced 2025-06-22 00:57:11 +00:00
@ -92,6 +92,7 @@ define([
|
|||||||
"category": "contextual",
|
"category": "contextual",
|
||||||
"implementation": ExportTimelineAsCSVAction,
|
"implementation": ExportTimelineAsCSVAction,
|
||||||
"depends": [
|
"depends": [
|
||||||
|
"$log",
|
||||||
"exportService",
|
"exportService",
|
||||||
"notificationService",
|
"notificationService",
|
||||||
"resources[]"
|
"resources[]"
|
||||||
|
@ -34,11 +34,13 @@ define(["./ExportTimelineAsCSVTask"], function (ExportTimelineAsCSVTask) {
|
|||||||
* @memberof {platform/features/timeline}
|
* @memberof {platform/features/timeline}
|
||||||
*/
|
*/
|
||||||
function ExportTimelineAsCSVAction(
|
function ExportTimelineAsCSVAction(
|
||||||
|
$log,
|
||||||
exportService,
|
exportService,
|
||||||
notificationService,
|
notificationService,
|
||||||
resources,
|
resources,
|
||||||
context
|
context
|
||||||
) {
|
) {
|
||||||
|
this.$log = $log;
|
||||||
this.task = new ExportTimelineAsCSVTask(
|
this.task = new ExportTimelineAsCSVTask(
|
||||||
exportService,
|
exportService,
|
||||||
resources,
|
resources,
|
||||||
@ -52,13 +54,15 @@ define(["./ExportTimelineAsCSVTask"], function (ExportTimelineAsCSVTask) {
|
|||||||
notification = notificationService.notify({
|
notification = notificationService.notify({
|
||||||
title: "Exporting CSV",
|
title: "Exporting CSV",
|
||||||
unknownProgress: true
|
unknownProgress: true
|
||||||
});
|
}),
|
||||||
|
$log = this.$log;
|
||||||
|
|
||||||
return this.task.run()
|
return this.task.run()
|
||||||
.then(function () {
|
.then(function () {
|
||||||
notification.dismiss();
|
notification.dismiss();
|
||||||
})
|
})
|
||||||
.catch(function () {
|
.catch(function (err) {
|
||||||
|
$log.warn(err);
|
||||||
notification.dismiss();
|
notification.dismiss();
|
||||||
notificationService.error("Error exporting CSV");
|
notificationService.error("Error exporting CSV");
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user