Unreleased checks from Cobalt JavaScript
in TR Internal
How can I check for the current session being in Unreleased mode in JavaScript?
Tagged:
0
Best Answer
-
IAC's should be used now in preference over the Release/UnReleased Feature Exposure check. If it is a simple change that you are just hoping to hide for an interation while some other code gets put into place or which you want to check in but not "release", then you can use the IAC capability without actually having the IAC defined formally by CM/AMS. Simply "code" to the IAC (create a name that will be used in the conditional like you normally would) and then use the manual step to add that IAC to your session when you want to test that code. Then, when you just want to release the code, you can simply remove the IAC conditional in your code, just like you would remove the "Release/Unreleased" conditional. That being said, I am not aware of how we are exposing IAC's to Javascript at this point. At least I am not aware of a mechanism (one thought might be to add an endpoint to WebSite that JS can call to get the list of IAC's that the user is eligible for in their session.2
Answers
-
if (Cobalt.User.GetFeatureExposure() === Cobalt.FeatureExposure.Unreleased) { // Blah }1
-
Note that IACs should now be used and not Unreleased.0
-
As covered in this question:
http://techoverflow.int.thomsonreuters.com/questions/1980/how-does-one-add-an-infrastructure-access-control-iac0 -
Ron: Is that true in all scenarios? If so, is there a plan to retire the FeatureExposure flags? It seems to me like if, for example, if I'm working on some small feature/change that just needs to be held off for 1 iteration, then using the FeatureExposure would be much easier than the creating new IACs.0
-
As MT's answer states: that is correct, we should not be using the FeatureExposure flag anymore. I do believe we have a website story to remove it from Website. We have not worked on coordinating this with the other modules. We'll look into getting that on all the radar for all modules.0
-
Here's an example of how IACs can be checked in JavaScript: if (Cobalt.Master.Instance().IsInfrastructureAccessControlOn('iac-oldhighlightingoff')) {0
-
For additional reference, here is Mark's original description on theHub:
https://thehub.thomsonreuters.com/docs/DOC-4961480 -
Note that `Cobalt.Master.Instance()` is generated on the page by Website MasterPages, thus certain pages/products that don't utilize the core MasterPages (e.g. NewsRoom) will not have access to the IACs unless they follow the same pattern to push those from the server-side of Website. I'd love to see this moved into a core part of Static Content in the future so that the functions are always there, and just have the actual IAC data it consumes pushed from Website -- MasterPages or otherwise.0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛