summaryrefslogtreecommitdiffstats
path: root/src/utils/GlobalConstants.js
diff options
context:
space:
mode:
authorwr148d <wr148d@att.com>2021-01-15 15:32:00 -0500
committerwr148d <wr148d@att.com>2021-02-11 09:47:17 -0500
commit5ee7367a101143715c2869d72ea4a6fbf55f5af6 (patch)
tree84bf43601c0cce4fb37b5b3b494e113c96d5591e /src/utils/GlobalConstants.js
parentddc05d4ea0254b427fea6ec80e2b03950eeca4ce (diff)
Updated Sparky to add ECOMP functionality Browse, Specialized Search, BYOQ, and the Builder FE Updates
Issue-ID: AAI-3250 Change-Id: I576e37f77f7e9b40d72e4a5e7de645e9f62bc7d2 Signed-off-by: wr148d <wr148d@att.com>
Diffstat (limited to 'src/utils/GlobalConstants.js')
-rw-r--r--src/utils/GlobalConstants.js20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/utils/GlobalConstants.js b/src/utils/GlobalConstants.js
index 56de6eb..e3ce2a9 100644
--- a/src/utils/GlobalConstants.js
+++ b/src/utils/GlobalConstants.js
@@ -40,4 +40,22 @@ export const STATUS_CODE_5XX_SERVER_ERROR = 500;
export const filterBarActionTypes = keyMirror(FilterBarConstants.FILTER_BAR_ACTION_TYPES);
-export const UNIFIED_FILTERS_URL = BASE_URL + '/rest/search/unifiedFilterRequest'; \ No newline at end of file
+export const UNIFIED_FILTERS_URL = BASE_URL + '/rest/search/unifiedFilterRequest';
+
+var url = window.location.href;
+var environment = '';
+var APP_TITLE_REGX = '\/services\/(\\w+)';
+var APP_TITLE_REGX_LOCAL = '\/(\\w+)/#';
+if(url.includes('localhost')){
+ var regTitle = new RegExp(APP_TITLE_REGX_LOCAL);
+ environment = url.match(regTitle)[1].toUpperCase() + '_LOCALHOST_';
+}else if (url.includes('ecompc_')){
+ environment = url.split('/')[3] + '_';
+}else{
+ var regTitle = new RegExp(APP_TITLE_REGX);
+ environment = url.match(regTitle)[1].toUpperCase() + '_NON_WEBJUNCTION_';
+}
+
+export const ENVIRONMENT = environment;
+
+