From 695b8b736b712b29b07129c1e57e1fc72c4a348d Mon Sep 17 00:00:00 2001 From: Navya Date: Mon, 4 Mar 2024 16:57:35 +0530 Subject: [PATCH 1/2] dss working --- micro-ui/web/packages/dss/.babelrc | 5 - micro-ui/web/packages/dss/README.md | 204 ++++++++++++++++++ micro-ui/web/packages/dss/docker/Dockerfile | 30 --- micro-ui/web/packages/dss/docker/nginx.conf | 12 -- micro-ui/web/packages/dss/package.json | 21 +- micro-ui/web/packages/dss/public/index.html | 42 ++-- micro-ui/web/packages/dss/src/DSSWrapper.js | 20 ++ micro-ui/web/packages/dss/src/Module.js | 35 ++- .../web/packages/dss/src/SingleSpaEntry.js | 29 +++ micro-ui/web/packages/dss/src/pages/About.js | 4 +- .../web/packages/dss/src/pages/DrillDown.js | 4 +- .../web/packages/dss/src/pages/FAQs/FAQs.js | 2 +- micro-ui/web/packages/dss/src/pages/index.js | 2 +- micro-ui/web/packages/dss/webpack.common.js | 8 +- micro-ui/web/packages/dss/webpack.dev.js | 4 +- micro-ui/web/packages/dss/webpack.prod.js | 5 +- 16 files changed, 319 insertions(+), 108 deletions(-) delete mode 100644 micro-ui/web/packages/dss/.babelrc create mode 100644 micro-ui/web/packages/dss/README.md delete mode 100644 micro-ui/web/packages/dss/docker/Dockerfile delete mode 100644 micro-ui/web/packages/dss/docker/nginx.conf create mode 100644 micro-ui/web/packages/dss/src/DSSWrapper.js create mode 100644 micro-ui/web/packages/dss/src/SingleSpaEntry.js diff --git a/micro-ui/web/packages/dss/.babelrc b/micro-ui/web/packages/dss/.babelrc deleted file mode 100644 index 5f90443d15e..00000000000 --- a/micro-ui/web/packages/dss/.babelrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "presets": [ - "@babel/preset-env","@babel/preset-react" - ] - } \ No newline at end of file diff --git a/micro-ui/web/packages/dss/README.md b/micro-ui/web/packages/dss/README.md new file mode 100644 index 00000000000..4e652dce1ec --- /dev/null +++ b/micro-ui/web/packages/dss/README.md @@ -0,0 +1,204 @@ + + +# digit-ui-module-dss + +## Install + +```bash +npm install --save @egovernments/digit-ui-module-dss +``` + +## Limitation + +```bash +This Package is more specific to DIGIT-UI's can be used across mission's +``` + +## Usage + +After adding the dependency make sure you have this dependency in + +```bash +frontend/micro-ui/web/package.json +``` + +```json +"@egovernments/digit-ui-module-dss":"^1.5.0", +``` + +then navigate to App.js + +```bash + frontend/micro-ui/web/src/App.js +``` + + +```jsx +/** add this import **/ + +import { initDSSComponents } from "@egovernments/digit-ui-module-dss"; + +/** inside enabledModules add this new module key **/ + +const enabledModules = ["DSS"]; + +/** inside init Function call this function **/ + +const initDigitUI = () => { + initDSSComponents(); +}; +``` + +## Dynamic filter Usage +DSS UI + +Digit-UI has a DSS module that displays multiple types of charts, and tables based on the configuration. In DSS there are some filters that are fixed for all the pages, they should be based on the configuration. + +Example config + +MasterDashboardConfig.json + +```json + +{ + "name": "DSS_REPORT", + "filter": "FilterComponent", + "filterConfig": [ + { + "id": "DATE_RANGE", + "name": "ES_DSS_DATE_RANGE", + "type": "DateRange", + "props": { + "maxNumberOfDays": 90 + } + }, + { + "id": "LOCALITY", + "name": "ES_DSS_LOCALITY", + "type": "Dropdown", + "source": { + "type": "request", + "hostUrl": "https://works-dev.digit.org", + "requestMethod": "POST", + "requestUrl": "/egov-location/location/v11/boundarys/_search?hierarchyTypeCode=ADMIN&boundaryType=Locality&tenantId={$.tenantId}", + "requestBody": "{\"criteria\":{\"tenantId\" : \"{$.tenantId}\" }}", + "keyPath": "$.TenantBoundary[0].boundary.*.name", + "valuesPath": "$.TenantBoundary[0].boundary.*.code" + }, + "appliedFilterPath": "filters.locality", + "placeholder": "ES_DSS_ALL_LOCALITY_SELECTED" + }, +{ + "id": "DISTRICT", + "name": "ES_DSS_DDR", + "type": "MultiSelectDropdown", + "source": { + "type": "request", + "hostUrl": "https://works-dev.digit.org", + "requestMethod": "POST", + "requestUrl": "/egov-location/location/v11/boundarys/_search?hierarchyTypeCode=ADMIN&boundaryType=Locality&tenantId={$.tenantId}", + "requestBody": "{\"criteria\":{\"tenantId\" : \"{$.tenantId}\" }}", + "keyPath": "$.TenantBoundary[0].boundary.*.name", + "valuesPath": "$.TenantBoundary[0].boundary.*.code" + }, + "appliedFilterPath": "filters.locality", + "placeholder": "ES_DSS_ALL_LOCALITY_SELECTED" + }, + + { + "id": "PAYMENT_MODE", + "name": "ES_DSS_PAYMENT_MODE", + "type": "MultiSelectDropdown", + "source": { + "type": "list", + "list": [ + { + "key": "CASH", + "value": "CASH" + }, + { + "key": "CARD", + "value": "CARD" + } + { + "key": "CHEQUE", + "value": "CHEQUE" + } + ], + "keyPath": "$.*.key", + "valuesPath": "$.*.value", + "sortBy": "name" + }, + "appliedFilterPath": "filters.paymentMode", + "placeholder": "ES_DSS_ALL_PAYMENT_SELECTED" + } + ], + "visualizations": [] +} +``` + +```jsx +// add the following hooks to have a dynamic filter under dss ``Digit.Hooks.dss.useGetCustomFilterValues`` +const useGetCustomFilterValues = (filterConfigs, config={}) => { + return useQuery(`DSS_CUSTOM_FILTER_CONFIG_${JSON.stringify(filterConfigs)}`, () => DSSService.getFiltersConfigData(filterConfigs), config); +}; + + +const useGetCustomFilterRequestValues = (filterConfigs, config={}) => { + return useQuery(`DSS_CUSTOM_FILTER_REQUEST_VAL_${JSON.stringify(filterConfigs)}`, () => DSSService.getCustomFiltersDynamicValues(filterConfigs), config); +}; +``` + + +### Changelog + +```bash +1.8.0 workbench v1.0 release +1.8.0-beta.2 republished due to some version issues +1.8.0-beta.1 fixes +1.8.0-beta workbench base version beta release +1.7.0 urban 2.9 +1.6.0 urban 2.8 +1.5.48 DSS fix for MUKTA fontsize of the line chart and making multilink dropdown clone on outside click +1.5.44 UI/UX Audit Fixes :: Refer PFM-4442(https://digit-discuss.atlassian.net/browse/PFM-4442) +1.5.43 Alignment fixes +1.5.39 Bug fixes = tooltip text not showing fully + Share whatsapp and email was not working +1.5.38 updated the readme content +1.5.37 Pie chart denomination and Horizontal bar white spaces fixes +1.5.36 Bug Fix::Multiple tooltips showing in Tables +1.5.35 Added the dynamic filter component +1.5.34 Count config added for Metric chart +1.5.33 Horizontal Bar and Pie chart alignment fixes +1.5.32 Percentage symbol showing in Yaxis ticker and left alignment of label for FSM Capacity Utilization +1.5.31 Horizontal Bar chart alignment fixes +1.5.30 Added enhancement for pie chart using variant flag according to new requirements. Refer CustomPieChart component. +1.5.29 DSS UI alignment fixes for Horizontal Metric and bar chart +1.5.28 added the support for the dynamic icon in the metric chart by adding flag iconName +1.5.27 Alignment fixes for Horizontal Metric Charts +1.5.26 Added a new version of horizontalBar chart, In chartConfig it makes use of this boolean key = horizontalBarv2 +1.5.25 added the support for horizontal metric chart, In chartConfig it makes use of this boolean key = isHorizontalChart +1.5.24 added commonmaster module to support its localisation +1.5.23 updated the routes in the dss module to have dynamic base context path +1.5.22 updated the readme file +1.5.21 added the readme file +1.5.20 base version +``` + +### Contributors + +[jagankumar-egov] [nipunarora-eGov] [Tulika-eGov] [Ramkrishna-egov] [nabeelmd-eGov] + +## Documentation + +Documentation Site (https://core.digit.org/guides/developer-guide/ui-developer-guide/digit-ui) + +## Maintainer + +- [jagankumar-egov](https://www.github.com/jagankumar-egov) + + +### Published from DIGIT Frontend +DIGIT Frontend Repo (https://github.com/egovernments/Digit-Frontend/tree/master) + + +![Logo](https://s3.ap-south-1.amazonaws.com/works-dev-asset/mseva-white-logo.png) diff --git a/micro-ui/web/packages/dss/docker/Dockerfile b/micro-ui/web/packages/dss/docker/Dockerfile deleted file mode 100644 index 02eb8f89c01..00000000000 --- a/micro-ui/web/packages/dss/docker/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -# Use Node.js base image with version 16 -FROM node:16 AS build - -# Set working directory -WORKDIR /app - -# Copy package.json and yarn.lock (if exists) -COPY package.json ./ - -# clear cache -RUN yarn cache clean - -# Install dependencies -RUN yarn install - -# Copy the rest of the application -COPY . . - -# Build the React app with Webpack -RUN yarn build - -FROM nginx:mainline-alpine - -ENV WORK_DIR=/var/web/dss-ui - -RUN mkdir -p ${WORK_DIR} - - -COPY --from=build /app/dist ${WORK_DIR}/ -COPY --from=build /app/docker/nginx.conf /etc/nginx/conf.d/default.conf diff --git a/micro-ui/web/packages/dss/docker/nginx.conf b/micro-ui/web/packages/dss/docker/nginx.conf deleted file mode 100644 index 8a179fe0ebb..00000000000 --- a/micro-ui/web/packages/dss/docker/nginx.conf +++ /dev/null @@ -1,12 +0,0 @@ -server -{ - listen 80; - underscores_in_headers on; - - location /dss-ui - { - root /var/web; - index index.html index.htm; - try_files $uri $uri/ /core/index.html; - } -} \ No newline at end of file diff --git a/micro-ui/web/packages/dss/package.json b/micro-ui/web/packages/dss/package.json index d5737171527..ac36ec39464 100644 --- a/micro-ui/web/packages/dss/package.json +++ b/micro-ui/web/packages/dss/package.json @@ -1,45 +1,46 @@ { "name": "@digit-ui/digit-ui-module-dss-mfe", - "version": "1.0.6", - "description": "", - "main": "index.js", + "version": "1.8.0", + "main": "Module.js", "scripts": { "predeploy": "yarn build", - "deploy": "gh-pages -d dist", "start": "webpack serve --config webpack.dev.js", "build": "webpack --config webpack.prod.js" }, "homepage": "http://design-egov.github.io/auth", "keywords": [], "author": "", - "license": "MIT", + "license": "ISC", "devDependencies": { "@babel/core": "7.12.10", + "@babel/preset-env": "7.23.9", "@babel/preset-react": "7.12.10", "babel-loader": "8.2.2", - "gh-pages": "^5.0.0", - "html-webpack-plugin": "^5.5.0", "babel-plugin-react-html-attrs": "^3.0.5", - "@babel/preset-env":"7.23.9" + "file-loader": "^6.2.0", + "gh-pages": "^5.0.0", + "html-webpack-plugin": "^5.5.0" }, "dependencies": { "@digit-ui/digit-ui-libraries-mfe": "1.0.6", - "@digit-ui/digit-ui-module-core-base": "1.0.8", "@egovernments/digit-ui-react-components": "1.4.106", + "@egovernments/digit-ui-svg-components": "0.0.8", "jsonpath": "^1.1.1", "lodash": "4.17.21", "react": "17.0.1", - "react-date-range": "1.3.0", + "react-date-range": "1.4.0", "react-dom": "17.0.1", "react-hook-form": "6.15.8", "react-i18next": "11.16.2", "react-inlinesvg": "1.1.7", "react-query": "3.6.1", "react-router-dom": "5.2.0", + "react-select": "5.7.4", "react-simple-maps": "2.0.0", "react-time-picker": "4.2.1", "react-tooltip": "4.1.2", "recharts": "^2.0.9", + "single-spa-react": "^4.6.1", "webpack": "^5.68.0", "webpack-cli": "^4.9.2", "webpack-dev-server": "^4.8.1", diff --git a/micro-ui/web/packages/dss/public/index.html b/micro-ui/web/packages/dss/public/index.html index 596f04a5212..0a166f588ce 100644 --- a/micro-ui/web/packages/dss/public/index.html +++ b/micro-ui/web/packages/dss/public/index.html @@ -1,26 +1,30 @@ - - Dss Page - - - - - + DSS Module Page + + + + + + - - - -
- + + + + +
+ + + diff --git a/micro-ui/web/packages/dss/src/DSSWrapper.js b/micro-ui/web/packages/dss/src/DSSWrapper.js new file mode 100644 index 00000000000..37872b09cab --- /dev/null +++ b/micro-ui/web/packages/dss/src/DSSWrapper.js @@ -0,0 +1,20 @@ +import React from "react"; +import { QueryClientProvider } from "react-query"; +import { Switch, useLocation, BrowserRouter as Router } from "react-router-dom"; +import { initDSSComponents } from "./Module"; +import { DSSModule } from "./Module"; + +const App = ({ queryClient, title }) => { + initDSSComponents(); + //make way to do this job in container while registering remotes + + return ( + + + + + + ); +}; + +export default App; diff --git a/micro-ui/web/packages/dss/src/Module.js b/micro-ui/web/packages/dss/src/Module.js index 3b36bf1b48b..80c095b37ad 100644 --- a/micro-ui/web/packages/dss/src/Module.js +++ b/micro-ui/web/packages/dss/src/Module.js @@ -48,33 +48,34 @@ const DssBreadCrumb = ({ location }) => { } ]; - return ele.show)} />; +return ele.show)} />; }; const Routes = ({ path, stateCode }) => { const location = useLocation(); const isMobile = window.Digit.Utils.browser.isMobile(); return ( + +
- + - } /> - } /> - } /> - - - - - - - -
+ } /> + } /> + } /> + } /> + } /> + + + +
); }; export const DSSModule = ({ stateCode, userType, tenants }) => { // const { path, url } = useRouteMatch(); const { path, url } = useRouteMatch(); + const language = Digit.StoreData.getCurrentLanguage(); const tenantId = Digit.ULBService.getCurrentTenantId(); const moduleCode = ["DSS","common-masters",tenantId]; @@ -98,13 +99,11 @@ export const DSSModule = ({ stateCode, userType, tenants }) => { const componentsToRegister = { DSSModule, DSSCard, - NDSSCard +NDSSCard }; -const initDSSComponents = () => { +export const initDSSComponents = () => { Object.entries(componentsToRegister).forEach(([key, value]) => { Digit.ComponentRegistryService.setComponent(key, value); }); -}; - -export {initDSSComponents}; \ No newline at end of file +}; \ No newline at end of file diff --git a/micro-ui/web/packages/dss/src/SingleSpaEntry.js b/micro-ui/web/packages/dss/src/SingleSpaEntry.js new file mode 100644 index 00000000000..ea6505bb992 --- /dev/null +++ b/micro-ui/web/packages/dss/src/SingleSpaEntry.js @@ -0,0 +1,29 @@ +import React from "react"; +import ReactDOM from "react-dom"; +import singleSpaReact from "single-spa-react"; +import App from "./DSSWrapper"; +// import { initDSSComponents } from "./Module"; +// import { initLibraries } from "@digit-ui/digit-ui-libraries-mfe"; +// initLibraries(); +// initDSSComponents(); +const appLifeCycles = singleSpaReact({ + React, + ReactDOM, + rootComponent: App, + errorBoundary() { + // https://reactjs.org/docs/error-boundaries.html + return
This renders when a catastrophic error occurs
; + }, +}); + +export function bootstrap(props) { + return appLifeCycles.bootstrap(props); +} + +export function mount(props) { + return appLifeCycles.mount(props); +} + +export function unmount(props) { + return appLifeCycles.unmount(props); +} diff --git a/micro-ui/web/packages/dss/src/pages/About.js b/micro-ui/web/packages/dss/src/pages/About.js index e03357c2824..3412cdaa175 100644 --- a/micro-ui/web/packages/dss/src/pages/About.js +++ b/micro-ui/web/packages/dss/src/pages/About.js @@ -4,7 +4,7 @@ import { useTranslation } from "react-i18next"; const About = () => { const { t } = useTranslation(); const { isLoading, data } = Digit.Hooks.useGetDSSAboutJSON(Digit.ULBService.getStateId()); - const moduleAbout = data?.MdmsRes["dss-dashboard"]?.About[0]?.[`DSS`].About; + const moduleAbout = data?.MdmsRes["dss-dashboard"]?.About?.[0]?.[`DSS`].About; const definitionlist = (defineObj) => { let array = []; for (var i = 0; i < defineObj.length; i++) { @@ -18,7 +18,7 @@ const About = () => { return (
{t("DSS_ABOUT_DASHBOARD")}
- {moduleAbout.map((obj) => ( + {moduleAbout?.map((obj) => (
{t(obj?.titleHeader)}
{definitionlist(obj?.define)}
diff --git a/micro-ui/web/packages/dss/src/pages/DrillDown.js b/micro-ui/web/packages/dss/src/pages/DrillDown.js index 68d86229ec4..c162339ee5b 100644 --- a/micro-ui/web/packages/dss/src/pages/DrillDown.js +++ b/micro-ui/web/packages/dss/src/pages/DrillDown.js @@ -23,7 +23,7 @@ const getInitialRange = () => { }; const DrillDown = ({ stateCode }) => { - const [searchQuery, onSearch] = useState(""); + const [searchQuery, onSearch] = useState(""); const { ulb, chart, title, type = "table", fillColor = "", isNational = "NO" } = Digit.Hooks.useQueryParams(); const { t } = useTranslation(); const nationalDB = isNational == "YES" ? true : false; @@ -121,7 +121,7 @@ const DrillDown = ({ stateCode }) => { return ( -
{t(title)}
+
{t(title)}
{isNational ? ( ) : ( diff --git a/micro-ui/web/packages/dss/src/pages/FAQs/FAQs.js b/micro-ui/web/packages/dss/src/pages/FAQs/FAQs.js index fb91f6547bf..86c28f4662b 100644 --- a/micro-ui/web/packages/dss/src/pages/FAQs/FAQs.js +++ b/micro-ui/web/packages/dss/src/pages/FAQs/FAQs.js @@ -7,7 +7,7 @@ const FAQsSection = () => { const tenantId = user?.info?.tenantId || Digit.ULBService.getCurrentTenantId(); const { t } = useTranslation(); const { isLoading, data } = Digit.Hooks.useGetDSSFAQsJSON(Digit.ULBService.getStateId()); - const moduleFAQs = data?.MdmsRes["dss-dashboard"]?.FAQs[0]?.[`DSS`].FAQs; + const moduleFAQs = data?.MdmsRes["dss-dashboard"]?.FAQs?.[0]?.[`DSS`].FAQs; if(isLoading){ return diff --git a/micro-ui/web/packages/dss/src/pages/index.js b/micro-ui/web/packages/dss/src/pages/index.js index 16638a0cd10..0d3576178a4 100644 --- a/micro-ui/web/packages/dss/src/pages/index.js +++ b/micro-ui/web/packages/dss/src/pages/index.js @@ -303,7 +303,7 @@ import { closeFilters={() => setIsFilterModalOpen(false)} isNational={isNational} /> - ) : dashboardConfig[0]?.filter == 'CustomFilter' && dashboardConfig[0]?.filterConfig ? ( + ) : dashboardConfig?.[0]?.filter == 'CustomFilter' && dashboardConfig[0]?.filterConfig ? ( { }, plugins: [ new ModuleFederationPlugin({ - name: "dss", + name: "dss_ui", filename: "remoteEntry.js", exposes: { - "./DssModule": "./src/bootstrap", + "./DSSModule": "./src/SingleSpaEntry", }, shared: packageJson.dependencies, }), diff --git a/micro-ui/web/packages/dss/webpack.prod.js b/micro-ui/web/packages/dss/webpack.prod.js index fe79ea3bcd6..e5c5fa7d58c 100644 --- a/micro-ui/web/packages/dss/webpack.prod.js +++ b/micro-ui/web/packages/dss/webpack.prod.js @@ -12,12 +12,13 @@ module.exports = () => { }, plugins: [ new ModuleFederationPlugin({ - name: "dss", + name: "dss_ui", filename: "remoteEntry.js", exposes: { - "./DssModule": "./src/bootstrap", + "./DSSModule": "./src/SingleSpaEntry", }, // shared: packageJson.dependencies, + shared: packageJson.dependencies }), ], }; From 23a13e20ae3622cc8cf5a1bc9e19c8b400eb8bb2 Mon Sep 17 00:00:00 2001 From: Navya Date: Mon, 4 Mar 2024 16:59:57 +0530 Subject: [PATCH 2/2] changes --- micro-ui/web/lerna.json | 3 ++- micro-ui/web/package.json | 4 +++- micro-ui/web/packages/core/src/Module.js | 13 +++++++++---- micro-ui/web/packages/core/src/modules/Dss.js | 2 +- .../packages/core/src/modules/registerRemotes.js | 10 ++++++++++ micro-ui/web/packages/core/webpack.dev.js | 12 ++++++------ micro-ui/web/packages/core/webpack.prod.js | 2 +- 7 files changed, 32 insertions(+), 14 deletions(-) diff --git a/micro-ui/web/lerna.json b/micro-ui/web/lerna.json index 17c7a0f8604..16209cffcb9 100644 --- a/micro-ui/web/lerna.json +++ b/micro-ui/web/lerna.json @@ -6,7 +6,8 @@ "packages/common", "packages/workbench", "packages/ui-core", - "packages/app1" + "packages/app1", + "packages/dss" ], "command": { "run": { diff --git a/micro-ui/web/package.json b/micro-ui/web/package.json index a26212b0e20..a849cbf1795 100644 --- a/micro-ui/web/package.json +++ b/micro-ui/web/package.json @@ -20,7 +20,8 @@ "packages/workbench", "packages/common", "packages/ui-core", - "packages/app1" + "packages/app1", + "packages/dss" ], "scripts": { "build": "yarn lerna run build", @@ -29,6 +30,7 @@ "build:common": "cd packages/common && yarn build", "build:hrms": "cd packages/hrms && yarn build", "build:workbench": "cd packages/workbench && yarn build", + "start:dss": "cd packages/dss && yarn start", "build:dss": "cd packages/dss && yarn build", "start:core": "cd packages/core && yarn start", "start:common": "cd packages/common && yarn start", diff --git a/micro-ui/web/packages/core/src/Module.js b/micro-ui/web/packages/core/src/Module.js index bdc9ed45532..e214f6fd382 100644 --- a/micro-ui/web/packages/core/src/Module.js +++ b/micro-ui/web/packages/core/src/Module.js @@ -10,11 +10,10 @@ import { useState } from "react"; import ErrorBoundary from "./components/ErrorBoundaries"; import getStore from "./redux/store"; -import { ReactQueryDevtools } from 'react-query/devtools'; //here add react-query dev tools const DigitUIWrapper = ({ stateCode, enabledModules, moduleReducers,defaultLanding }) => { - const { isLoading, data: initData } = Digit.Hooks.useInitStore(stateCode, enabledModules); + const { isLoading, data: initData } = Digit.Hooks.useInitStore(stateCode, enabledModules); if (isLoading) { return ; } @@ -100,7 +99,13 @@ export const DigitUI = ({ stateCode, registry, enabledModules, moduleReducers ,d }, }} > - + {/* */} @@ -118,4 +123,4 @@ export const initCoreComponents = () => { Object.entries(componentsToRegister).forEach(([key, value]) => { Digit.ComponentRegistryService.setComponent(key, value); }); -}; \ No newline at end of file +}; diff --git a/micro-ui/web/packages/core/src/modules/Dss.js b/micro-ui/web/packages/core/src/modules/Dss.js index a443bf41a30..813043b908b 100644 --- a/micro-ui/web/packages/core/src/modules/Dss.js +++ b/micro-ui/web/packages/core/src/modules/Dss.js @@ -1,5 +1,5 @@ import React, { useEffect, useRef } from "react"; -import { mount } from "dss/DssModule"; +import { mount } from "dss/DSSModule"; import { History } from "history"; // interface AuthProps { diff --git a/micro-ui/web/packages/core/src/modules/registerRemotes.js b/micro-ui/web/packages/core/src/modules/registerRemotes.js index 5a3c83fbf29..9355b6f7455 100644 --- a/micro-ui/web/packages/core/src/modules/registerRemotes.js +++ b/micro-ui/web/packages/core/src/modules/registerRemotes.js @@ -26,6 +26,16 @@ export default (queryClient) => { }, }); + registerApplication({ + name: "Dss", + app: () => import("dss/DSSModule"), + activeWhen: "/workbench-ui/employee/dss", + customProps: { + title: "DSS is running on host", + queryClient, + }, + }); + // registerApplication({ // name: "app1", // app: () => import("app1/App"), diff --git a/micro-ui/web/packages/core/webpack.dev.js b/micro-ui/web/packages/core/webpack.dev.js index 604e8a3a332..6c62821475c 100644 --- a/micro-ui/web/packages/core/webpack.dev.js +++ b/micro-ui/web/packages/core/webpack.dev.js @@ -16,10 +16,10 @@ module.exports = () => { proxy: [ { context: () => true, - // target: 'https://unified-dev.digit.org', - target: 'https://unified-dev.digit.org', + // target: 'https://mukta-uat.digit.org', + target: "https://unified-dev.digit.org", secure: false, - changeOrigin:true, + changeOrigin: true, bypass: function (req, res, proxyOptions) { if (req.headers.accept.indexOf('html') !== -1) { console.log('Skipping proxy for browser request.'); @@ -34,7 +34,7 @@ module.exports = () => { historyApiFallback: { index: "/", }, - server:"https", //Enable HTTPS + server: "https", //Enable HTTPS }, plugins: [ new ModuleFederationPlugin({ @@ -46,9 +46,9 @@ module.exports = () => { // dashboard: "dashboard@http://localhost:8084/remoteEntry.js", // hrms: "hrms@https://localhost:8085/remoteEntry.js", workbench: "workbench@https://localhost:8086/remoteEntry.js", - common:"common@https://localhost:8090/remoteEntry.js" + common: "common@https://localhost:8090/remoteEntry.js", // app1: "app1@https://localhost:8001/remoteEntry.js", - // dss: "dss@https://localhost:8087/remoteEntry.js", + dss: "dss_ui@https://localhost:8087/remoteEntry.js", // measurement : "measurement@https://localhost:8088/remoteEntry.js" }, shared: packageJson.dependencies, diff --git a/micro-ui/web/packages/core/webpack.prod.js b/micro-ui/web/packages/core/webpack.prod.js index ae3ef4c63cb..7fe0d226110 100644 --- a/micro-ui/web/packages/core/webpack.prod.js +++ b/micro-ui/web/packages/core/webpack.prod.js @@ -22,7 +22,7 @@ module.exports = () => { // hrms: `hrms@${domain}/hrms/remoteEntry.js`, common: `common-ui@${domain}/common/remoteEntry.js`, workbench : `workbench_web@${domain}/workbench/remoteEntry.js`, - // dss : `dss@${domain}/dss/remoteEntry.js`, + dss : `dss_ui@${domain}/dss/remoteEntry.js`, // measurement : `measurement@${domain}/measurement/remoteEntry.js` }, // shared: packageJson.dependencies,