Bram's Dev Blog

home

100 Days of Code Day 88 - Persisting state of activated languages

22 Nov 2018

Persistent state of the activated languages in DSpace 7

Picking up on the work to allow an administrator to de-activate an activated language, I’m investigating if it’s possible to make changes at runtime to environment.default.js. This is currently where the list of active languages is configured, for initialization at runtime.

Everything I read makes it clear that the env variables are set at build time and that all of these are not supposed to change at runtime.

Thinking again about my requirements, they boil down to:

When considering all of these requirements, I can’t help to think that the only solution is somehow to persist this configuration in the REST backend of DSpace, even though that back end is pretty much agnostic about the UI being used.

The Angular UI, or any UI for that matter, should be able to push a set of config keys and values for persistent storage to the REST back end, leaving the REST back end at the same time agnostic of what they represent.

Secrets in environment files

Accidentally, I fell on two articles saying something totally different on whether you should put secrets or not in these environment files:

Day 89 Plan

Explore if there’s any opportunity to extend documentation or tests in other parts of the DSpace Angular code.

Future days - DSpace 7 Angular

Future days - Analyzer.atmire.com work

Future Days - Productivity

Future days - Jekyll http://bram-atmire.github.io/ site

Future Days - Atmire.com work

Investigate and work on search engine optimization (SEO) for the main atmire.com website.

Future Days - Learning just for learning

Sustainability challenge - Finish before Christmas

If I continue like October, I could hit day 68 by end of October and day 98 by end of November.