diff --git a/sirepo/package_data/static/html/simulations.html b/sirepo/package_data/static/html/simulations.html index 7380565d05..43102babe2 100644 --- a/sirepo/package_data/static/html/simulations.html +++ b/sirepo/package_data/static/html/simulations.html @@ -57,7 +57,7 @@
{{ item.name | simulationName | limitTo: 60 }}
@@ -2612,7 +2613,7 @@ SIREPO.app.directive('appHeaderRight', function(appDataService, authState, appSt controller: function($scope, stringsService) { $scope.authState = authState; $scope.slackUri = $scope.authState.slackUri; - $scope.showLink = SIREPO.APP_SCHEMA.feature_config.show_video_links; + $scope.SIREPO = SIREPO; $scope.modeIsDefault = function () { return appDataService.isApplicationMode('default'); }; @@ -3726,6 +3727,9 @@ SIREPO.app.directive('simConversionModal', function(appState, requestSender) { `, controller: function($scope) { + if (SIREPO.APP_SCHEMA.constants.canCreateNewSimulation) { + throw new Error(`SIREPO.APP_SCHEMA.constants.canCreateNewSimulation=${SIREPO.APP_SCHEMA.constants.canCreateNewSimulation} but adding simConversionModal`); + } $scope.newSimURL = false; $scope.title = $scope.convMethod == 'create_shadow_simulation' ? 'Shadow' : 'SRW'; diff --git a/sirepo/package_data/static/js/sirepo.js b/sirepo/package_data/static/js/sirepo.js index d4b9edeb80..f02914ccf6 100644 --- a/sirepo/package_data/static/js/sirepo.js +++ b/sirepo/package_data/static/js/sirepo.js @@ -924,7 +924,7 @@ SIREPO.app.factory('appDataService', function() { return self.applicationMode; }; self.canCopy = function() { - return true; + return SIREPO.APP_SCHEMA.constants.canCreateNewSimulation; }; return self; }); @@ -4799,6 +4799,10 @@ SIREPO.app.controller('SimulationsController', function (appState, browserStorag }); } + self.canCreateNewSimulation = () => { + return SIREPO.APP_SCHEMA.constants.canCreateNewSimulation; + }; + self.canDelete = function(item) { if (item.isFolder) { return item.children.length === 0; diff --git a/sirepo/package_data/static/json/raydata-schema.json b/sirepo/package_data/static/json/raydata-schema.json index 5a6dfa2d6d..2bec3a1efb 100644 --- a/sirepo/package_data/static/json/raydata-schema.json +++ b/sirepo/package_data/static/json/raydata-schema.json @@ -5,6 +5,7 @@ } }, "constants": { + "canCreateNewSimulation": false, "canDownloadInputFile": false, "canExportArchive": false, "canShowDocumentationUrl": false, @@ -82,8 +83,8 @@ }, "strings": { "completionState": "", - "simulationDataType": "notebook", - "simulationDataTypePlural": "notebooks", + "simulationDataType": "analysis", + "simulationDataTypePlural": "analyses", "typeOfSimulation": "poll" }, "view": { diff --git a/sirepo/package_data/static/json/schema-common.json b/sirepo/package_data/static/json/schema-common.json index bb669aa186..730f04903f 100644 --- a/sirepo/package_data/static/json/schema-common.json +++ b/sirepo/package_data/static/json/schema-common.json @@ -200,6 +200,7 @@ } }, "constants": { + "canCreateNewSimulation": true, "canDownloadInputFile": true, "canExportArchive": true, "canShowDocumentationUrl": true,