Skip to content

Commit 3c94370

Browse files
authored
feat: add deployment configuration singleton, tag, documentation (#541)
* feat: add configuration property deployment * feat: add deployment configuration singleton documentation
1 parent 02ddc7d commit 3c94370

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

application/app/views/layouts/application.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<title><%= content_for(:title) || "OnDemand Loop" %></title>
55
<meta name="viewport" content="width=device-width,initial-scale=1">
66
<meta name="apple-mobile-web-app-capable" content="yes">
7+
<meta name="deployment" content="<%= Configuration.deployment %>">
78
<%= csrf_meta_tags %>
89
<%= csp_meta_tag %>
910

application/config/configuration_singleton.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def property_configs
3434
::ConfigurationProperty.property(:dataverse_hub_url, default: 'https://hub.dataverse.org/api/installations'),
3535
::ConfigurationProperty.property(:zenodo_default_url, default: 'https://zenodo.org'),
3636
::ConfigurationProperty.property(:logging_root),
37+
::ConfigurationProperty.file_content(:deployment, default: File.join(app_root, 'DEPLOYMENT').to_s),
3738
].freeze
3839
end
3940

docs/guide/content/admin/configuration.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ The following properties control various aspects of OnDemand Loop's behavior. Ea
7878
- [zenodo_default_url](#zenodo_default_url)
7979
- [logging_root](#logging_root)
8080
- [navigation](#navigation)
81+
- [deployment](#deployment)
8182

8283
---
8384

@@ -252,6 +253,7 @@ URL to the external documentation site. This is used for help links in the inter
252253
Proxy server settings for outbound HTTP requests made by internal clients (such as the `Common::HttpClient` class). This is used to route API requests through a proxy, which may be required in secure or enterprise network environments.
253254

254255
The value should be a hash with the following optional keys:
256+
255257
- `:host`: proxy server hostname or IP (e.g., `'proxy.example.com'`)
256258
- `:port`: port number used by the proxy (e.g., `8080`)
257259
- `:user`: (optional) username for proxy authentication
@@ -342,6 +344,15 @@ For detailed configuration options and examples, see the [Navigation Customizati
342344

343345
---
344346

347+
<a id="deployment"></a>
348+
**`deployment`**
349+
Specifies the path to a file containing the OnDemand Loop deployment version string. This string is referenced in the Loop meta tag in the header of all Loop pages.
350+
351+
- **Default**: `/var/www/ood/apps/sys/loop/DEPLOYMENT`
352+
- **Environment Variable**: _Not supported_
353+
354+
---
355+
345356
### Other Environment Variables
346357

347358
These additional environment variables control application behavior and are typically set at the system level.
@@ -452,4 +463,4 @@ OOD_LOOP_GUIDE_URL=https://example.com/loop
452463
OOD_LOOP_DATAVERSE_HUB_URL=https://hub.dataverse.org/api/installations
453464
OOD_LOOP_ZENODO_DEFAULT_URL=https://zenodo.org
454465
OOD_LOOP_LOGGING_ROOT=/var/log/loop
455-
```
466+
```

0 commit comments

Comments
 (0)