diff --git a/sirepo/package_data/static/html/simulations.html b/sirepo/package_data/static/html/simulations.html
index 051c6361fe..6cd4c955d6 100644
--- a/sirepo/package_data/static/html/simulations.html
+++ b/sirepo/package_data/static/html/simulations.html
@@ -59,8 +59,8 @@
Open as a New Copy
Rename
Move
- Export as Zip
- {{ simulations.stringsService.formatKey('simulationSource') }}
+ Export as Zip
+ {{ simulations.stringsService.formatKey('simulationSource') }}
Delete
diff --git a/sirepo/package_data/static/js/radia.js b/sirepo/package_data/static/js/radia.js
index 290dd02fb3..f30009eac1 100644
--- a/sirepo/package_data/static/js/radia.js
+++ b/sirepo/package_data/static/js/radia.js
@@ -972,7 +972,7 @@ SIREPO.app.directive('appHeader', function(activeSection, appState, panelState,
- Export Radia Dump
+ Export Radia Dump
@@ -982,17 +982,18 @@ SIREPO.app.directive('appHeader', function(activeSection, appState, panelState,
`,
controller: function($scope) {
- $scope.exportDmp = function() {
- requestSender.newWindow('exportArchive', {
- '': appState.models.simulation.simulationId,
- '': SIREPO.APP_SCHEMA.simulationType,
- '': $scope.nav.simulationName() + '.dat',
- });
- };
- $scope.showImportModal = function() {
+
+ $scope.exportDmpUrl = () => appState.isLoaded() ?
+ panelState.exportArchiveUrl($scope.simulationId(), `${$scope.nav.simulationName()}.dat`) :
+ null;
+
+ $scope.isImported = () => (appState.models.simulation || {}).dmpImportFile;
+
+ $scope.showImportModal = () => {
$('#simulation-import').modal('show');
};
- $scope.isImported = () => (appState.models.simulation || {}).dmpImportFile;
+
+ $scope.simulationId = () => appState.isLoaded() ? appState.models.simulation.simulationId : null;
}
};
});
diff --git a/sirepo/package_data/static/js/sirepo-components.js b/sirepo/package_data/static/js/sirepo-components.js
index 908fe78799..d3aa6024b1 100644
--- a/sirepo/package_data/static/js/sirepo-components.js
+++ b/sirepo/package_data/static/js/sirepo-components.js
@@ -549,14 +549,15 @@ SIREPO.app.directive('exportPythonLink', function(appState, panelState) {
reportTitle: '@',
},
template: `
- Export Python Code
+ Export Python Code
`,
controller: function($scope) {
- $scope.exportPython = function() {
- panelState.pythonSource(
+ $scope.exportPythonUrl = () => {
+ return panelState.pythonSourceUrl(
appState.models.simulation.simulationId,
panelState.findParentAttribute($scope, 'modelKey'),
- $scope.reportTitle);
+ $scope.reportTitle
+ );
};
},
};
@@ -2713,16 +2714,16 @@ SIREPO.app.directive('settingsMenu', function(appDataService, appState, fileMana