2013-12-24
0.9
Paulo Ramos
8.0+
All
All
Components, Widgets, Libraries, Plug-ins
[Overview]
Use the provided widgets / API to make your non-production environments (e.g. Dev, QA...) look or behave differently from production. Small proof-of-concept on how to tap into the platforms data model to get the running mode and server name.
[Detail]
On small software factories, sometimes the same team has access to both production and non-production environments. On this scenario, you'll want to make sure nobody clicks that critical-erase-stuff-without-undo button in production by mistake (thinking it was QA).
With this, you can make your non-production environment look different (let's say, by adding a big top banner saying (Testing Environment), or behave differently (for example, disabling / enabling certain features depending if you're in a production server or not).
[How to use]
Add the provided web blocks (EnvironmentSticker_Circle or EnvironmentSticker_Name) to your layout screens. They'll be shown in non-prod servers, but hidden in production.
Or, just reference these public actions and build your own logic / UI changes around them: Environment_DevelopmentMode (boolean - true for non-prod, false for production environments).
Environment_Name (text - returns the configured environment name).
[Note] This component's behavior is based on Service Center's configuration: Administration > Environment Configuration: Running Mode
Environment Name