DevOps Configuration

Overview

This page provides details about the Workbench UI configuration required to enable it in any environment.

DevOps Configuration

In the DevOps repository of your organization, locate the following "deploy-as-code/helm/environments/unified-dev.yaml". Inside the environment YAML file used to deploy the Core platform, please add the following block of code:


workbench-ui:
  custom-js-injection: |
    sub_filter.conf: "
      sub_filter  '<head>' '<head>
      <script src={{INSERT_YOUR_AWS_BUCKET_NAME}}/globalConfigs.js type=text/javascript></script>';"

A dev environment sample file is linked here. Note that you will have to modify this for your deployment.

Global Configuration

This section contains a config that applies globally to all UI modules. These need to be configured before configuring the service-specific UI.

Steps to create a globalconfig.js file:

  1. Create a config file (globalconfigs.js) with the below-mentioned configurations (refer code below).

  2. Configure all the images/logos required in the S3 and add links as footerBWLogoURL, footerLogoURL.

  3. Mention the state tenant ID as stateTenantId.

  4. If any user roles have to be made invalid add as invalidEmployeeRoles.

  5. Then push this global config file into your S3 bucket as globalconfigs.js.

  6. Mention the globalConfigs file URL in your Environment config .

var globalConfigs = (function () {
  var stateTenantId = 'pg' // statetenantId
   var gmaps_api_key = '<<INSERT_GMAP_GENERATED_TOKEN>>';
   var contextPath = 'workbench-ui'; 
   var configModuleName = 'commonMuktaUiConfig'; 
   var centralInstanceEnabled = false;
   var footerBWLogoURL = '{{INSERT_YOUR_AWS_BUCKET_NAME}}/digit-footer-bw.png';
   var footerLogoURL = '{{INSERT_YOUR_AWS_BUCKET_NAME}}/digit-footer.png';
   var digitHomeURL = 'https://www.digit.org/';
   var xstateWebchatServices = 'wss://dev.digit.org/xstate-webchat/';
   var assetS3Bucket = '{{INSERT_YOUR_AWS_BUCKET_NAME}}';
   var invalidEmployeeRoles = ["CBO_ADMIN","STADMIN","ORG_ADMIN","ORG_STAFF","SYSTEM"] 

 
   var getConfig = function (key) {
     if (key === 'STATE_LEVEL_TENANT_ID') {
       return stateTenantId;
     }
     else if (key === 'GMAPS_API_KEY') {
       return gmaps_api_key;
     }
     else if (key === 'ENABLE_SINGLEINSTANCE') {
       return centralInstanceEnabled;
     } else if (key === 'DIGIT_FOOTER_BW') {
       return footerBWLogoURL;
     } else if (key === 'DIGIT_FOOTER') {
       return footerLogoURL;
     } else if (key === 'DIGIT_HOME_URL') {
       return digitHomeURL;
     } else if (key === 'xstate-webchat-services') {
       return xstateWebchatServices;
     } else if (key === 'S3BUCKET') {
       return assetS3Bucket;
     } else if (key === 'CONTEXT_PATH'){
	return contextPath;
     } else if (key === 'UICONFIG_MODULENAME'){
	return configModuleName;
     } else if (key === 'INVALIDROLES'){
	return invalidEmployeeRoles;
     }
   };
 
 
   return {
     getConfig
   };
 }());

Localisation Configuration

All strings localised per module are provided in this sheet linked here. To translate the UI into other languages, please follow this sheet and provide appropriate translations in your language.

Figma screens for the UI are here. Refer to them to understand the Workbench UI.

Last updated