From 02a21b2e42ec4ee38b6790844d2c5114774d9f80 Mon Sep 17 00:00:00 2001 From: syed-salman-technoforte Date: Thu, 19 May 2022 16:19:06 +0530 Subject: [PATCH 01/24] [ MOSIP-20021 ] updated release_changes.yml to update README.md badges --- .github/workflows/release_changes.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release_changes.yml b/.github/workflows/release_changes.yml index cc9c2956..f84128f9 100644 --- a/.github/workflows/release_changes.yml +++ b/.github/workflows/release_changes.yml @@ -27,6 +27,11 @@ jobs: echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV echo "GPG_TTY=$(tty)" >> $GITHUB_ENV + - name: update Branch name in badges + run: | + sed -i 's/branch=.*)]/branch=${{ env.BRANCH_NAME }}\)]/g' README.md + sed -i 's/branch=.*\&/branch=${{ env.BRANCH_NAME }}\&/g' README.md + - name: Mannualy changing the pom versions run: find . -type f -name "*pom.xml" -print0 | xargs -0 sed -i "s/${{ github.event.inputs.snapshotTags }}/${{ github.event.inputs.releaseTags }}/g" From 8d3272160295378b37b625fa7408a49bcf228067 Mon Sep 17 00:00:00 2001 From: Balaji <74903654+balaji-alluru@users.noreply.github.com> Date: Thu, 2 Jun 2022 15:53:35 +0530 Subject: [PATCH 02/24] MOSIP-21585 : Updated URL for document-catergory-type-mapping --- .../app/core/services/document-category-mapping.service.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/admin-ui/src/app/core/services/document-category-mapping.service.ts b/admin-ui/src/app/core/services/document-category-mapping.service.ts index 84f63ffe..31b03989 100644 --- a/admin-ui/src/app/core/services/document-category-mapping.service.ts +++ b/admin-ui/src/app/core/services/document-category-mapping.service.ts @@ -2,6 +2,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable, BehaviorSubject } from 'rxjs'; import { map } from 'rxjs/operators'; +import * as appConstants from '../../app.constants'; import { AppConfigService } from 'src/app/app-config.service'; import { URL } from 'src/app/app.constants'; @@ -30,7 +31,7 @@ export class DocumentCategoryMappingService { } getMappedDoc(code: string, lang: string): Observable { - return this.http.get(this.BASE_URL + 'masterdata/validdocuments/' + code +'/'+ lang).pipe(map(response => { + return this.http.get(this.BASE_URL + appConstants.MASTERDATA_BASE_URL +'validdocuments/' + code +'/'+ lang).pipe(map(response => { return response; })); } @@ -44,7 +45,7 @@ export class DocumentCategoryMappingService { updateMappedDoc(doccategorycode: string, doctypecode: string): Observable { return this.http.put( - this.BASE_URL + 'masterdata/validdocuments/map/' + doccategorycode + '/' + doctypecode, + this.BASE_URL + appConstants.MASTERDATA_BASE_URL +'validdocuments/map/' + doccategorycode + '/' + doctypecode, "" ); @@ -52,7 +53,7 @@ export class DocumentCategoryMappingService { updateUnMappeddoc(doccategorycode: string, doctypecode: string): Observable { return this.http.put( - this.BASE_URL + 'masterdata/validdocuments/unmap/' + doccategorycode + '/' + doctypecode, + this.BASE_URL + appConstants.MASTERDATA_BASE_URL +'validdocuments/unmap/' + doccategorycode + '/' + doctypecode, "" ); } From 3ec22bdd3a60fdd90d1be93a0614cc2d3c60b6a4 Mon Sep 17 00:00:00 2001 From: Balaji <74903654+balaji-alluru@users.noreply.github.com> Date: Tue, 7 Jun 2022 10:42:13 +0530 Subject: [PATCH 03/24] MOSIP-21007: Updated Logout Service --- .../src/app/core/services/logout.service.ts | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/admin-ui/src/app/core/services/logout.service.ts b/admin-ui/src/app/core/services/logout.service.ts index 7473677c..4c9bd943 100644 --- a/admin-ui/src/app/core/services/logout.service.ts +++ b/admin-ui/src/app/core/services/logout.service.ts @@ -22,24 +22,7 @@ export class LogoutService { ) {} logout() { - let adminUrl = this.appService.getConfig().adminUrl; - this.http - .delete(`${this.appService.getConfig().baseUrl}${this.appService.getConfig().logout}`, { - observe: 'response' - }) - .subscribe( - (res: HttpResponse>) => { - if (res.body.response.status === 'Success') { - this.redirectService.redirect( - window.location.origin + adminUrl - ); - } else { - window.alert(res.body.response.message); - } - }, - (error: HttpErrorResponse) => { - window.alert(error.message); - } - ); + //TODO: NEED TO CHECK THE IMPLEMENTATION LATER + window.location.href = `${this.appService.getConfig().baseUrl}${this.appService.getConfig().logout}?redirecturi=`+btoa(window.location.href); } } From 63a82e5f00dfc2bd9a9301c7ac92d8afad309706 Mon Sep 17 00:00:00 2001 From: Balaji <74903654+balaji-alluru@users.noreply.github.com> Date: Tue, 14 Jun 2022 12:04:29 +0530 Subject: [PATCH 04/24] MOSIP-21836 : Updated data-storage service file --- admin-ui/src/app/core/services/data-storage.service.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/admin-ui/src/app/core/services/data-storage.service.ts b/admin-ui/src/app/core/services/data-storage.service.ts index 1c929316..a911a960 100644 --- a/admin-ui/src/app/core/services/data-storage.service.ts +++ b/admin-ui/src/app/core/services/data-storage.service.ts @@ -12,6 +12,8 @@ export class DataStorageService { private BASE_URL = this.appService.getConfig().baseUrl; + langIndependentTables : string[] = ['devicetypes','machinetypes','devicespecifications','machinespecifications','devices','machines']; + getI18NLanguageFiles(langCode:string){ return this.http.get(`./assets/i18n/${langCode}.json`); } @@ -261,6 +263,9 @@ export class DataStorageService { }else{ data.request["pageFetch"] = JSON.parse(this.appService.getConfig().filterValueMaxCount)["default"]; } + if(this.langIndependentTables.includes(type)){ + data.request["languageCode"] = 'all'; + } return this.http.post( this.BASE_URL + appConstants.MASTERDATA_BASE_URL + type + '/filtervalues', data From facd2076a185f6d95ceb1c247e0cadf91f15db12 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Mon, 18 Jul 2022 10:38:40 +0530 Subject: [PATCH 05/24] [MOSIP-20028] added action for tagging --- .github/workflows/tag.yaml | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/tag.yaml diff --git a/.github/workflows/tag.yaml b/.github/workflows/tag.yaml new file mode 100644 index 00000000..e9bba0e6 --- /dev/null +++ b/.github/workflows/tag.yaml @@ -0,0 +1,43 @@ +name: Tagging of repos + +env: + tag: v1.2.3 + +on: + workflow_dispatch: + inputs: + tag: + description: 'Tag to be published' + required: true + default: 'v1.2.3' + type: string + body: + description: 'Release body message' + required: true + default: 'Changes in this Release' + type: string + pre-release: + description: 'Pre-release? True/False' + required: true + default: False + type: string + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token + with: + tag_name: ${{ github.event.inputs.tag }} + release_name: ${{ github.event.inputs.tag }} + body: | + ${{ github.event.inputs.body }} + draft: false + prerelease: ${{fromJSON(github.event.inputs.pre-release)}} From ca914e3f7873e435b9b63db140e160103efb6136 Mon Sep 17 00:00:00 2001 From: ckm007 Date: Thu, 29 Sep 2022 10:41:09 +0000 Subject: [PATCH 06/24] Updated Pom versions for release changes --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c8930a51..32e071d5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Admin Portal -[![Maven Package upon a push](https://github.com/mosip/keymanager/actions/workflows/push_trigger.yml/badge.svg?branch=release-1.2.0)](https://github.com/mosip/admin-ui/actions/workflows/push_trigger.yml) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?branch=release-1.2.0&project=mosip_admin-ui&metric=alert_status)](https://sonarcloud.io/dashboard?branch=release-1.2.0&id=mosip_admin-ui) +[![Maven Package upon a push](https://github.com/mosip/keymanager/actions/workflows/push_trigger.yml/badge.svg?branch=release-1.2.0.1)](https://github.com/mosip/admin-ui/actions/workflows/push_trigger.yml) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?branch=release-1.2.0.1&id=mosip_admin-ui) ## Overview See [overview and portal user guide](https://docs.mosip.io/1.2.0/modules/administration/admin-portal-user-guide). From fda38df31534d684755d121bd6d883b4579906ca Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Fri, 30 Sep 2022 08:24:17 +0530 Subject: [PATCH 07/24] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 32e071d5..44b2d9fc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Admin Portal [![Maven Package upon a push](https://github.com/mosip/keymanager/actions/workflows/push_trigger.yml/badge.svg?branch=release-1.2.0.1)](https://github.com/mosip/admin-ui/actions/workflows/push_trigger.yml) -[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?branch=release-1.2.0.1&id=mosip_admin-ui) +[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?branch=release-1.2.0.1&project=mosip_admin-ui&metric=alert_status)](https://sonarcloud.io/dashboard?branch=release-1.2.0.1&id=mosip_admin-ui) ## Overview See [overview and portal user guide](https://docs.mosip.io/1.2.0/modules/administration/admin-portal-user-guide). From e23d3be731e8ba5f108824978e93998a4898eca3 Mon Sep 17 00:00:00 2001 From: Keshav Mishra Date: Wed, 21 Jun 2023 19:36:55 +0530 Subject: [PATCH 08/24] Update README.md (#184) Signed-off-by: Keshav Mishra --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 44b2d9fc..8f0a337f 100644 --- a/README.md +++ b/README.md @@ -33,4 +33,3 @@ To get more help on the Angular CLI use `ng help` or go check out the [Angular C ## License This project is licensed under the terms of [Mozilla Public License 2.0](../LICENSE). - From aa7dc776bc2d6e34396f2e938a9c97b27193ce23 Mon Sep 17 00:00:00 2001 From: Rakshithb1 <79500257+Rakshithb1@users.noreply.github.com> Date: Mon, 17 Jul 2023 18:00:52 +0530 Subject: [PATCH 09/24] [MOSIP-28488] Update README.md (#205) Signed-off-by: Rakshithb1 <79500257+Rakshithb1@users.noreply.github.com> --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8f0a337f..78362833 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github. Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). -## Further help +## Further help To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). From fdba0cd3561b03c9b9f3de100fce929fc80da913 Mon Sep 17 00:00:00 2001 From: syed salman <72004356+syedsalman3753@users.noreply.github.com> Date: Fri, 22 Sep 2023 08:32:01 +0530 Subject: [PATCH 10/24] [MOSIP-29162] Updated workflows as per reusable workflow format (#220) * [MOSIP-29162] Updated workflows as per reusable workflow format [MOSIP-25631] * Update push-trigger.yml --------- Co-authored-by: syed-salman-technoforte Co-authored-by: Keshav Mishra --- .github/workflows/build.yml | 109 ------- .github/workflows/push-trigger.yml | 59 ++++ .github/workflows/push_trigger.yml | 125 -------- .github/workflows/release-changes.yml | 26 ++ .github/workflows/release_changes.yml | 61 ---- .github/workflows/release_trigger.yml | 407 -------------------------- .github/workflows/tag.yaml | 43 --- .github/workflows/tag.yml | 33 +++ 8 files changed, 118 insertions(+), 745 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/push-trigger.yml delete mode 100644 .github/workflows/push_trigger.yml create mode 100644 .github/workflows/release-changes.yml delete mode 100644 .github/workflows/release_changes.yml delete mode 100644 .github/workflows/release_trigger.yml delete mode 100644 .github/workflows/tag.yaml create mode 100644 .github/workflows/tag.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 5e2f3397..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,109 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Build npm - -# Controls when the action will run. Triggers the workflow on push or pull request -# events but only for the master branch -on: - push: - branches: [ master, 1.0.* ] - pull_request: - branches: [ master, 1.0.* ] - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build-admin-ui: - runs-on: ubuntu-latest - env: - NAMESPACE: ${{ secrets. dev_namespace_docker_hub }} - SERVICE_NAME: admin-ui - SERVICE_LOCATION: admin-ui - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - - - name: npm install - run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts - - - name: npm build - run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist - - - name: setup environment - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - VERSION=$BRANCH_NAME - echo "push version $VERSION" - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - - -# This workflow contains a single job called "build" - build-pre-registration-ui: - runs-on: ubuntu-latest - env: - NAMESPACE: ${{ secrets. dev_namespace_docker_hub }} - SERVICE_NAME: pre-registration-ui - SERVICE_LOCATION: pre-registration-ui - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - - - name: npm install - run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts - - - name: npm build - run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist - - - name: setup environment - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - VERSION=$BRANCH_NAME - echo "push version $VERSION" - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - diff --git a/.github/workflows/push-trigger.yml b/.github/workflows/push-trigger.yml new file mode 100644 index 00000000..4fb8d75b --- /dev/null +++ b/.github/workflows/push-trigger.yml @@ -0,0 +1,59 @@ +name: admin-ui build upon a push + +on: + release: + types: [published] + pull_request: + types: [opened] + push: + branches: + - MOSIP* + - 1.* + - '!release-branch' + - develop + - master + +jobs: + build-admin-ui: + uses: mosip/kattu/.github/workflows/npm-build.yml@master + with: + SERVICE_LOCATION: ./admin-ui + BUILD_ARTIFACT: admin-ui + secrets: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + + build-docker-admin-ui: + needs: build-admin-ui + strategy: + matrix: + include: + - SERVICE_LOCATION: './admin-ui' + SERVICE_NAME: 'admin-ui' + NPM_BUILD: true + BUILD_ARTIFACT: 'admin-ui' + fail-fast: false + name: ${{ matrix.SERVICE_NAME }} + uses: mosip/kattu/.github/workflows/docker-build.yml@master + with: + SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }} + SERVICE_NAME: ${{ matrix.SERVICE_NAME }} + NPM_BUILD: ${{ matrix.NPM_BUILD }} + BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }} + secrets: + DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }} + ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }} + RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + + sonar-analysis: + needs: build-admin-ui + if: "${{ github.event_name != 'pull_request' }}" + uses: mosip/kattu/.github/workflows/npm-sonar-analysis.yml@master + with: + SERVICE_LOCATION: admin-ui + SONAR_URL: 'https://sonarcloud.io' + PROJECT_KEY: 'mosip_${{ github.event.repository.name }}' + secrets: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + ORG_KEY: ${{ secrets.ORG_KEY }} + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} diff --git a/.github/workflows/push_trigger.yml b/.github/workflows/push_trigger.yml deleted file mode 100644 index e98e748f..00000000 --- a/.github/workflows/push_trigger.yml +++ /dev/null @@ -1,125 +0,0 @@ - -name: Maven Package upon a push - -on: - push: - branches: - - '!release-branch' - - release-1* - - master - - 1.0.* - - develop - - 1.1.* - - MOSIP-11719 - - 1.2.* - -jobs: - build-admin-ui: - runs-on: ubuntu-latest - env: - NAMESPACE: ${{ secrets. dev_namespace_docker_hub }} - SERVICE_NAME: admin-ui - SERVICE_LOCATION: admin-ui - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - - - name: npm install - run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts - - - name: npm build - run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist - - - name: Setup branch and env - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - - - name: setup environment - run: | - # Strip git ref prefix from version - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - if [[ $BRANCH_NAME == master ]]; then - VERSION=latest - else - VERSION=$BRANCH_NAME - fi - echo "push version $VERSION" - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - - - sonar-analysis: - runs-on: ubuntu-latest - env: - NAMESPACE: ${{ secrets. dev_namespace_docker_hub }} - SERVICE_NAME: admin-ui - SERVICE_LOCATION: admin-ui - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: '14' - - - name: npm install - run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts - - - name: npm build - run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist - - - name: Setup branch and env - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - - - name: setup environment - run: | - # Strip git ref prefix from version - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - - - name: run sonar analysis - run: | - cd "./${{env.SERVICE_LOCATION}}" - echo "sonar.host.url=https://sonarcloud.io/ - sonar.login=${{ secrets.SONAR_TOKEN }} - sonar.projectKey=mosip_admin-ui - sonar.organization=${{ secrets.ORG_KEY }} - sonar.sourceEncoding=UTF-8 - sonar.sources=src - sonar.exclusions=**/node_modules/** - sonar.tests=src - sonar.test.inclusions=**/*.spec.ts - sonar.typescript.lcov.reportPaths=coverage/lcov.info" >> sonar-project.properties - npm install sonar-scanner && npm run sonar - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.github/workflows/release-changes.yml b/.github/workflows/release-changes.yml new file mode 100644 index 00000000..440e2e24 --- /dev/null +++ b/.github/workflows/release-changes.yml @@ -0,0 +1,26 @@ +name: Release/pre-release Preparation. + +on: + workflow_dispatch: + inputs: + MESSAGE: + description: 'Triggered for release or pe-release' + required: false + default: 'Release Preparation' + RELEASE_TAG: + description: 'tag to update' + required: true + SNAPSHOT_TAG: + description: 'tag to be replaced' + required: true + BASE: + description: 'base branch for PR' + required: true +jobs: + maven-release-preparation: + uses: mosip/kattu/.github/workflows/release-changes.yml@master + with: + MESSAGE: ${{ inputs.MESSAGE }} + RELEASE_TAG: ${{ inputs.RELEASE_TAG }} + SNAPSHOT_TAG: ${{ inputs.SNAPSHOT_TAG }} + BASE: ${{ inputs.BASE }} diff --git a/.github/workflows/release_changes.yml b/.github/workflows/release_changes.yml deleted file mode 100644 index f84128f9..00000000 --- a/.github/workflows/release_changes.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Release/pre-release Preparation. - -on: - workflow_dispatch: - inputs: - message: - description: 'Triggered for release or pe-release' - required: false - default: 'Release Preparation' - releaseTags: - description: 'tag to update' - required: true - snapshotTags: - description: 'tag to be replaced' - required: true - base: - description: 'base branch for PR' - required: true -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Setup branch and env - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - - - name: update Branch name in badges - run: | - sed -i 's/branch=.*)]/branch=${{ env.BRANCH_NAME }}\)]/g' README.md - sed -i 's/branch=.*\&/branch=${{ env.BRANCH_NAME }}\&/g' README.md - - - name: Mannualy changing the pom versions - run: find . -type f -name "*pom.xml" -print0 | xargs -0 sed -i "s/${{ github.event.inputs.snapshotTags }}/${{ github.event.inputs.releaseTags }}/g" - - - name: Updating the Release URL in POM - run: | - cd .github/workflows - sed -i 's/OSSRH_SNAPSHOT_URL/RELEASE_URL/g' push_trigger.yml - - - name: Updating libs-snapshot-local to libs-release local for artifactory URL's. - run: find . -type f -name "*Dockerfile" -print0 | xargs -0 sed -i "s/libs-snapshot-local/libs-release-local/g" - - - name: removing -DskipTests - run: find . -type f -name "*push_trigger.yml" -print0 | xargs -0 sed -i "s/"-DskipTests"//g" - -# - name: removing --Dgpg.skip -# run: find . -type f -name "*push_trigger.yml" -print0 | xargs -0 sed -i "s/"-Dgpg.skip"//g" - - - name: Create Pull Request - uses: peter-evans/create-pull-request@v3 - with: - token: ${{ secrets.ACTION_PAT }} - commit-message: Updated Pom versions for release changes - title: Release changes - body: Automated PR for ${{ github.event.inputs.releaseTags }} release. - branch: release-branch - delete-branch: true - base: ${{ github.event.inputs.base }} diff --git a/.github/workflows/release_trigger.yml b/.github/workflows/release_trigger.yml deleted file mode 100644 index 9b2e24a0..00000000 --- a/.github/workflows/release_trigger.yml +++ /dev/null @@ -1,407 +0,0 @@ -name: Release maven packages and docker upon a release - -on: - release: - types: [published] - -jobs: - build-kernel-ref-idobjectvalidator: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 1.8 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - echo "::set-env name=GPG_TTY::$(tty)" - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml - - - - name: Build with Maven - run: | - cd kernel - mvn -B package -s $GITHUB_WORKSPACE/settings.xml --file pom.xml - - - name: Ready the springboot artifacts - run: find -name '*.jar' -executable -type f -exec zip release.zip {} + - - - name: Upload the springboot jars - uses: actions/upload-artifact@v1 - with: - name: release - path: ./release.zip - - publish_to_nexus: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 1.8 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - echo "::set-env name=GPG_TTY::$(tty)" - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - name: Install xmllint - run: | - sudo apt-get update - sudo apt-get install libxml2-utils - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml - - - name: Build with Maven - run: | - cd kernel - mvn -B package -s $GITHUB_WORKSPACE/settings.xml --file pom.xml - - - name: Publish the maven package - run: | - chmod +x ./deploy.sh - ./deploy.sh kernel $GITHUB_WORKSPACE/settings.xml .* - env: - GPG_TTY: $(tty) - - name: Analyze with SonarCloud - run: | - cd kernel - mvn -B verify sonar:sonar -Dsonar.projectKey=${{ secrets.PROJECT_KEY }} -Dsonar.organization=${{ secrets.ORG_KEY }} -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_TOKEN }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - # This workflow contains a single job called "build" - - docker-registration-processor-external-integration-service: - - runs-on: ubuntu-latest - env: - NAMESPACE: mosipdev - SERVICE_NAME: registration-processor-external-integration-service - SERVICE_LOCATION: registration-processor/registration-processor-external-integration-service - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 11 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - name: Setup branch and env - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo "GPG_TTY=$(tty)" >> $GITHUB_ENV - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml - - - - name: Build with Maven - run: | - cd registration-processor/registration-processor-external-integration-service - mvn -B package -s $GITHUB_WORKSPACE/settings.xml --file pom.xml - - - name: Ready the springboot artifacts - run: find -name '*.jar' -executable -type f -exec zip release.zip {} + - - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - - echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - name: Install xmllint - run: | - sudo apt-get update - sudo apt-get install libxml2-utils - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.RELEASE_USER}} ${{secrets.RELEASE_TOKEN}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml - - -# - name: Analyze with SonarCloud -# run: | -# cd pre-registration-booking-service -# mvn -B verify sonar:sonar -Dsonar.projectKey=${{ secrets.PROJECT_KEY }} -Dsonar.organization=${{ secrets.ORG_KEY }} -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=${{ secrets.SONAR_TOKEN }} -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - VERSION=$BRANCH_NAME - echo "push version $VERSION" - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - - build-admin-ui: - runs-on: ubuntu-latest - env: - NAMESPACE: ${{ secrets. dev_namespace_docker_hub }} - SERVICE_NAME: admin-ui - SERVICE_LOCATION: admin-ui - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - - - name: npm install - run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts - - - name: npm build - run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist - - - name: setup environment - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - VERSION=$BRANCH_NAME - echo "push version $VERSION" - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - -# This workflow contains a single job called "build" - build-pre-registration-ui: - - runs-on: ubuntu-latest - env: - NAMESPACE: ${{ secrets. dev_namespace_docker_hub }} - SERVICE_NAME: pre-registration-ui - SERVICE_LOCATION: pre-registration-ui - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - - - name: npm install - run: cd ${{ env.SERVICE_LOCATION }} && npm install --ignore-scripts - - - name: npm build - run: cd ${{ env.SERVICE_LOCATION }} && npm run-script build -- --prod --base-href . --output-path=dist - - - name: setup environment - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - - - name: Build image - run: | - cd "./${{env.SERVICE_LOCATION}}" - docker build . --file Dockerfile --tag ${{ env.SERVICE_NAME }} - - - name: Log into registry - run: echo "${{ secrets.release_docker_hub }}" | docker login -u ${{ secrets.actor_docker_hub }} --password-stdin - - - name: Push image - run: | - IMAGE_ID=$NAMESPACE/$SERVICE_NAME - - # Change all uppercase to lowercase - IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]') - VERSION=$BRANCH_NAME - echo "push version $VERSION" - echo IMAGE_ID=$IMAGE_ID - echo VERSION=$VERSION - docker tag $SERVICE_NAME $IMAGE_ID:$VERSION - docker push $IMAGE_ID:$VERSION - - build-demosdk: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 1.8 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - echo "::set-env name=GPG_TTY::$(tty)" - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml - - - - name: Build with Maven - run: | - cd demosdk - mvn -B package -s $GITHUB_WORKSPACE/settings.xml --file pom.xml - - - name: Ready the springboot artifacts - run: find -name '*.jar' -executable -type f -exec zip release.zip {} + - - - name: Upload the springboot jars - uses: actions/upload-artifact@v1 - with: - name: release - path: ./release.zip - - build-authentication-ref-impl: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - ref: ${{ github.ref }} - java-version: 1.8 - server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Setup branch and GPG public key - run: | - # Strip git ref prefix from version - echo "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - echo "::set-env name=GPG_TTY::$(tty)" - echo ${{ env.GPG_TTY }} - sudo apt-get --yes install gnupg2 - gpg2 --import ./.github/keys/mosipgpgkey_pub.gpg - gpg2 --quiet --batch --passphrase=${{secrets.gpg_secret}} --allow-secret-key-import --import ./.github/keys/mosipgpgkey_sec.gpg - - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-${{ env.BRANCH_NAME }} - - - name: Setup the settings file for ossrh server - run: echo " ossrh ${{secrets.ossrh_user}} ${{secrets.ossrh_secret}} ossrh true gpg2 ${{secrets.gpg_secret}} allow-snapshots true snapshots-repo https://oss.sonatype.org/content/repositories/snapshots false true releases-repo https://oss.sonatype.org/service/local/staging/deploy/maven2 true false sonar . https://sonarcloud.io false " > $GITHUB_WORKSPACE/settings.xml - - - - name: Build with Maven - run: | - cd authentication - mvn -B package -s $GITHUB_WORKSPACE/settings.xml --file pom.xml - - - name: Ready the springboot artifacts - run: find -name '*.jar' -executable -type f -exec zip release.zip {} + - - - name: Upload the springboot jars - uses: actions/upload-artifact@v1 - with: - name: release - path: ./release.zip - diff --git a/.github/workflows/tag.yaml b/.github/workflows/tag.yaml deleted file mode 100644 index e9bba0e6..00000000 --- a/.github/workflows/tag.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: Tagging of repos - -env: - tag: v1.2.3 - -on: - workflow_dispatch: - inputs: - tag: - description: 'Tag to be published' - required: true - default: 'v1.2.3' - type: string - body: - description: 'Release body message' - required: true - default: 'Changes in this Release' - type: string - pre-release: - description: 'Pre-release? True/False' - required: true - default: False - type: string - -jobs: - build: - name: Create Release - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token - with: - tag_name: ${{ github.event.inputs.tag }} - release_name: ${{ github.event.inputs.tag }} - body: | - ${{ github.event.inputs.body }} - draft: false - prerelease: ${{fromJSON(github.event.inputs.pre-release)}} diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 00000000..73c55b03 --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,33 @@ +name: Tagging of repos + +on: + workflow_dispatch: + inputs: + TAG: + description: 'Tag to be published' + required: true + type: string + BODY: + description: 'Release body message' + required: true + default: 'Changes in this Release' + type: string + PRE_RELEASE: + description: 'Pre-release? True/False' + required: true + default: False + type: string + DRAFT: + description: 'Draft? True/False' + required: false + default: False + type: string + +jobs: + tag-branch: + uses: mosip/kattu/.github/workflows/tag.yml@master + with: + TAG: ${{ inputs.TAG }} + BODY: ${{ inputs.BODY }} + PRE_RELEASE: ${{ inputs.PRE_RELEASE }} + DRAFT: ${{ inputs.DRAFT }} \ No newline at end of file From 295142248dc5881ee0b3fec7e0611af0108bdc5b Mon Sep 17 00:00:00 2001 From: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Date: Mon, 27 Nov 2023 12:33:21 +0530 Subject: [PATCH 11/24] MOSIP-23752 : Added required field for location details Signed-off-by: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../features/resources/center/create/create.component.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/admin-ui/src/app/features/resources/center/create/create.component.html b/admin-ui/src/app/features/resources/center/create/create.component.html index 87b5bfe7..86cec76a 100644 --- a/admin-ui/src/app/features/resources/center/create/create.component.html +++ b/admin-ui/src/app/features/resources/center/create/create.component.html @@ -211,7 +211,9 @@

{{ "center.location-details" | translate }}

{{ fieldName }} + " + required + > {{ data.name }} @@ -522,4 +524,4 @@

{{ "center.operational-details" | translate }}

- \ No newline at end of file + From 96747aab925cc16436838df4715f35722a9690f9 Mon Sep 17 00:00:00 2001 From: Gokulraj C <110164849+GOKULRAJ136@users.noreply.github.com> Date: Mon, 27 Nov 2023 12:35:08 +0530 Subject: [PATCH 12/24] Update create.component.html removed line spaces Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> From dc5d6517b1a009ff12afcdef098ca988cd2a83d0 Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Wed, 29 Nov 2023 10:57:16 +0530 Subject: [PATCH 13/24] MOSIP-30449 : Added Required Fields & Changed the Upload File Format Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../create/create.component.css | 205 ++++++++++++++---- .../create/create.component.html | 68 +++++- 2 files changed, 215 insertions(+), 58 deletions(-) diff --git a/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.css b/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.css index 131222e1..dc182a28 100644 --- a/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.css +++ b/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.css @@ -1,51 +1,160 @@ /* No CSS *//*# sourceMappingURL=create.component.css.map */ .browseInput { - background: rgba(253, 81, 140, 1); - border: 1px solid rgba(253, 81, 140, 1); - color: white; - padding: 8px; - border-radius: 2px; - box-shadow: 0px 3px 1px -2px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 1px 5px 0px rgb(0 0 0 / 12%); - margin-left: 6px; -} - -.browseInput[disabled] { - border: 1px solid rgba(253, 81, 140, 0.35); - color: rgba(253, 81, 140, 0.35); -} - -.custom-file-input{ - display: inline-block; - overflow: hidden; - position: relative; - padding:10px; -} -.custom-file-input input[type="file"]{ - width: 100%; - height: 100%; - opacity: 0; - filter: alpha(opacity=0); - zoom: 1; /* Fix for IE7 */ - position: absolute; - top: 0; - left: 0; - z-index: 999; -} -.custom-file-input input[type="text"]{ - border-bottom: 1px solid rgba(0, 0, 0, 0.42) ! important; - border: 0px; - height: 32px; - margin-left: 1px; - width: 22.5rem; -} -.custom-file-input input[type="text"].addredborder{ - border-bottom: 1px solid #f44336 ! important; - border: 0px; - height: 32px; - margin-left: 1px; - width: 22.5rem; -} -.mat-form-field{ - padding:10px; -} \ No newline at end of file + background: rgba(253, 81, 140, 1); + border: 1px solid rgba(253, 81, 140, 1); + color: white; + padding: 8px; + border-radius: 2px; + box-shadow: 0px 3px 1px -2px rgb(0 0 0 / 20%), 0px 2px 2px 0px rgb(0 0 0 / 14%), 0px 1px 5px 0px rgb(0 0 0 / 12%); + margin-left: 6px; + } + + .browseInput[disabled] { + border: 1px solid rgba(253, 81, 140, 0.35); + color: rgba(253, 81, 140, 0.35); + } + + .custom-file-input{ + display: inline-block; + overflow: hidden; + position: relative; + padding:10px; + } + .custom-file-input input[type="file"]{ + width: 100%; + height: 100%; + opacity: 0; + filter: alpha(opacity=0); + zoom: 1; /* Fix for IE7 */ + position: absolute; + top: 0; + left: 0; + z-index: 999; + } + .custom-file-input input[type="text"]{ + border-bottom: 1px solid rgba(0, 0, 0, 0.42) ! important; + border: 0px; + height: 32px; + margin-left: 1px; + width: 22.5rem; + } + .custom-file-input input[type="text"].addredborder{ + border-bottom: 1px solid #f44336 ! important; + border: 0px; + height: 32px; + margin-left: 1px; + width: 22.5rem; + } + .mat-form-field{ + padding:10px; + } + .custom-file-input span{ + display:inline; + position:absolute; + padding-top: 9px; + } + + .fileuploadcontainer { + height: 105px; + padding: 2rem; + border: dashed 1px #FF4081; + background-color: #f1b5c9; + position: relative; + display: flex; + border-radius: 5px; + justify-content: center; + align-items: center; + overflow: hidden; + margin-left: 8px; + margin-top: 10px; + width:25%; + } + .fileuploadcontainer input { + opacity: 0; + position: absolute; + z-index: 2; + width: 100%; + height: 100%; + top: 0; + left: 0; + } + .fileuploadcontainer label { + color: #FF4081; + width: 148px; + height: 44px; + border-radius: 5px; + background: #FFFFFF; + padding: 10px; + border: 1px solid #CCCCCC; + /*display: flex;*/ + font-size: 12px; + font-weight: 200; + } + .fileuploadcontainer h3 { + font-size: 16px; + color: #FF4081; + padding-left: 3px; + padding-top: 7px; + font-weight: 600; + } + + .fileover { + animation: shake 1s; + animation-iteration-count: infinite; + } + .files-list { + margin-top: 1.5rem; + } + .files-list .single-file { + display: flex; + padding: 0.5rem; + justify-content: space-between; + align-items: center; + border: dashed 1px #FF4081; + margin-bottom: 1rem; + display: flex; + flex-grow: 1; + margin-left: 8px; + width:25%; + } + .files-list .single-file .preview { + display: flex; + margin-left: 0.5rem; + cursor: pointer; + align-self: flex-end; + } + .files-list .single-file .delete { + display: flex; + margin-left: 0.5rem; + cursor: pointer; + align-self: flex-end; + } + .files-list .single-file .name { + font-size: 14px; + font-weight: 500; + color: #353f4a; + margin: 0; + } + .files-list .single-file .size { + font-size: 12px; + font-weight: 500; + color: #a4a4a4; + margin: 0; + margin-bottom: 0.25rem; + } + .files-list .single-file .info { + width: 100%; + } + + .preview-heading{ + color: #505050; + font-weight: 600; + } + + .labelfileupload { + font-size: 12px; + font-weight: 500; + margin-left: 8px; + color: rgba(0, 0, 0, 0.54); + } \ No newline at end of file diff --git a/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.html b/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.html index fad55451..79da511f 100644 --- a/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.html +++ b/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.html @@ -19,7 +19,7 @@

{{labelanddatas.title |translate}}

{{labelanddatas.operation | translate }} {{labelanddatas.title |translate}} - {{'genericerror.fieldValidation' | translate}} + {{"genericerror.fieldValidation" | translate}}
- + {{labelanddatas.tableName | translate }} - + {{labelanddatas.title |translate}} {{'genericerror.fieldValidation' | translate}} - + +
-
+ + +
+ + +
+
+
+
+ + + + + + + + + + + +
+
+

{{uploadForm.controls.fileName.value}}

+
+
+
From 9fd5a3c40c145775290294a0c48cf6caf0d58247 Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Wed, 13 Dec 2023 11:59:08 +0530 Subject: [PATCH 14/24] Resolve Reliability Bugs on Admin-UI Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../create/create.component.html | 2 +- .../document-category-mapping.component.ts | 32 ++++++++------- .../list-view/list-view.component.ts | 4 +- .../single-view/single-view.component.ts | 6 +-- .../packet-status.component.html | 17 ++++++-- .../packet-status.component.scss | 5 +++ .../resources/center/edit/edit.component.ts | 4 +- .../devices/create/create.component.ts | 9 +++-- .../machines/create/create.component.ts | 8 ++-- .../users/create/create.component.scss | 2 +- .../users/create/create.component.ts | 9 +++-- .../app/shared/dialog/dialog.component.html | 3 ++ .../app/shared/dialog/dialog.component.scss | 5 +++ .../src/app/shared/dialog/dialog.component.ts | 14 ++----- .../src/app/shared/table/table.component.html | 4 ++ .../src/app/shared/table/table.component.scss | 5 +++ .../src/app/shared/table/table.component.ts | 40 +++++++------------ .../app/shared/toolbar/toolbar.component.html | 2 +- 18 files changed, 95 insertions(+), 76 deletions(-) diff --git a/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.html b/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.html index fad55451..cd9f7345 100644 --- a/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.html +++ b/admin-ui/src/app/features/bulkupload/masterdataupload/create/create.component.html @@ -49,7 +49,7 @@

{{labelanddatas.title |translate}}

{{'genericerror.fieldValidation' | translate}} - + Download Excel
diff --git a/admin-ui/src/app/features/masterdata/document-category-mapping/document-category-mapping.component.ts b/admin-ui/src/app/features/masterdata/document-category-mapping/document-category-mapping.component.ts index 96e5cf15..fbfdced5 100644 --- a/admin-ui/src/app/features/masterdata/document-category-mapping/document-category-mapping.component.ts +++ b/admin-ui/src/app/features/masterdata/document-category-mapping/document-category-mapping.component.ts @@ -56,15 +56,16 @@ export class DocumentCategoryMappingComponent implements OnInit { }); this.docCategoryMapping.setMappedDoc(this.allDocCategoryList[0]); this.docCategoryMapping.currentMappedDocList.subscribe(response => { - this.docCategoryMapping.getMappedDoc(response.code, response.langCode).subscribe(async mappedDoc => { - if (mappedDoc && mappedDoc.response) { - await this.getUnMappedDoc(); - this.subtractingMappedDocFromUnMappedDoc(mappedDoc.response, this.unMappedDoc); - this.showSpinner = false; - } else { - this.mappedDocList = []; - this.unMappedDoc = []; - } + this.docCategoryMapping.getMappedDoc(response.code, response.langCode).subscribe(mappedDoc => { + if (mappedDoc && mappedDoc.response) { + this.getUnMappedDoc().then(() => { + this.subtractingMappedDocFromUnMappedDoc(mappedDoc.response, this.unMappedDoc); + this.showSpinner = false; + }); + } else { + this.mappedDocList = []; + this.unMappedDoc = []; + } }); }); } @@ -125,18 +126,19 @@ export class DocumentCategoryMappingComponent implements OnInit { this.selectedItem = item['code']; this.docCategoryMapping.setMappedDoc(item); this.docCategoryMapping.currentMappedDocList.subscribe(response => { - this.docCategoryMapping.getMappedDoc(response.code, response.langCode).subscribe(async data => { + this.docCategoryMapping.getMappedDoc(response.code, response.langCode).subscribe(data => { if (data && data.response && data.response.documents) { - await this.getUnMappedDoc(); - this.subtractingMappedDocFromUnMappedDoc(data.response.documents, this.unMappedDoc); - this.showSpinner = false; + this.getUnMappedDoc().then(() => { + this.subtractingMappedDocFromUnMappedDoc(data.response.documents, this.unMappedDoc); + this.showSpinner = false; + }); } }); }); } onClose(mappedItem: object, index: number) { - this.docCategoryMapping.updateUnMappeddoc(this.selectedItem, mappedItem['code']).subscribe(async data => { + this.docCategoryMapping.updateUnMappeddoc(this.selectedItem, mappedItem['code']).subscribe(data => { //console.log('Data', data); }); if (mappedItem && (index >= 0)) { @@ -150,7 +152,7 @@ export class DocumentCategoryMappingComponent implements OnInit { } onAdd(unMappedItem: object, index: number) { - this.docCategoryMapping.updateMappedDoc(this.selectedItem, unMappedItem['code']).subscribe(async data => { + this.docCategoryMapping.updateMappedDoc(this.selectedItem, unMappedItem['code']).subscribe(data => { //console.log('Data', data); }); if (unMappedItem && (index >= 0) ) { diff --git a/admin-ui/src/app/features/masterdata/list-view/list-view.component.ts b/admin-ui/src/app/features/masterdata/list-view/list-view.component.ts index f265f786..ad493b14 100644 --- a/admin-ui/src/app/features/masterdata/list-view/list-view.component.ts +++ b/admin-ui/src/app/features/masterdata/list-view/list-view.component.ts @@ -81,8 +81,8 @@ export class ListViewComponent implements OnDestroy { } } - loadBlacklistedWords() { - return new Promise(async (resolve, reject) => { + loadBlacklistedWords(): void { + new Promise(async (resolve, reject) => { const data = []; await this.getMasterDataTypeValues('all').then(response => { if (response['data']) { diff --git a/admin-ui/src/app/features/masterdata/single-view/single-view.component.ts b/admin-ui/src/app/features/masterdata/single-view/single-view.component.ts index c2391fb3..a5ec0a93 100644 --- a/admin-ui/src/app/features/masterdata/single-view/single-view.component.ts +++ b/admin-ui/src/app/features/masterdata/single-view/single-view.component.ts @@ -213,11 +213,11 @@ export class SingleViewComponent implements OnDestroy { disableClose: true }) .afterClosed() - .subscribe(() => + .subscribe(() => { this.router.navigateByUrl( `admin/masterdata/${this.masterdataType}/view` - ) - ); + ); + }); } changePage(location: string) { diff --git a/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.html b/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.html index f764fcd6..669230a0 100644 --- a/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.html +++ b/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.html @@ -14,19 +14,24 @@
+ - + + - + +
Packet Status Information
{{'packet-status.id' | translate}}{{data[0].registrationId}}{{'packet-status.id' | translate}}{{data[0].registrationId}}
{{'packet-status.status' | translate}}{{statusCheck}}{{'packet-status.status' | translate}}{{statusCheck}}
+ - - + + @@ -50,6 +55,10 @@

{{item.transactionTypeCode.replace("

Timeline
{{'packet-status.viewMore' | translate}}{{'packet-status.viewLess' | translate}} + {{'packet-status.viewMore' | translate}}{{'packet-status.viewLess' | translate}} keyboard_arrow_down keyboard_arrow_up
+ + + + diff --git a/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.scss b/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.scss index 316c109c..361bfa6e 100644 --- a/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.scss +++ b/admin-ui/src/app/features/packet-status/packet-status/packet-status.component.scss @@ -174,4 +174,9 @@ h3 { font-size: 10.5px; +} + +caption { + font-size: 1.2em; + font-weight: bold; } \ No newline at end of file diff --git a/admin-ui/src/app/features/resources/center/edit/edit.component.ts b/admin-ui/src/app/features/resources/center/edit/edit.component.ts index 509d41d3..1fae495c 100644 --- a/admin-ui/src/app/features/resources/center/edit/edit.component.ts +++ b/admin-ui/src/app/features/resources/center/edit/edit.component.ts @@ -462,9 +462,9 @@ export class EditComponent { disableClose: true }) .afterClosed() - .subscribe(() => + .subscribe(() => { this.router.navigateByUrl(`admin/resources/centers/view`) - ); + }); } handleChangeSecondaryLang = (fieldName: string) => { diff --git a/admin-ui/src/app/features/resources/devices/create/create.component.ts b/admin-ui/src/app/features/resources/devices/create/create.component.ts index 4fc09dfe..f798a0ac 100644 --- a/admin-ui/src/app/features/resources/devices/create/create.component.ts +++ b/admin-ui/src/app/features/resources/devices/create/create.component.ts @@ -330,7 +330,10 @@ export class CreateComponent{ case: 'MESSAGE' }, disableClose: true - }).afterClosed().subscribe(() => this.router.navigateByUrl('admin/resources/devices/view')); + }).afterClosed() + .subscribe(() => { + this.router.navigateByUrl('admin/resources/devices/view') + }); } setHeaderData() { @@ -581,8 +584,8 @@ export class CreateComponent{ disableClose: true }) .afterClosed() - .subscribe(() => + .subscribe(() => { this.router.navigateByUrl(`admin/resources/devices/view`) - ); + }); } } diff --git a/admin-ui/src/app/features/resources/machines/create/create.component.ts b/admin-ui/src/app/features/resources/machines/create/create.component.ts index eb29901c..a13ca63b 100644 --- a/admin-ui/src/app/features/resources/machines/create/create.component.ts +++ b/admin-ui/src/app/features/resources/machines/create/create.component.ts @@ -332,9 +332,9 @@ export class CreateComponent { disableClose: true, }) .afterClosed() - .subscribe(() => + .subscribe(() => { this.router.navigateByUrl('admin/resources/machine/view') - ); + }); } setPrimaryData() { @@ -596,8 +596,8 @@ export class CreateComponent { disableClose: true, }) .afterClosed() - .subscribe(() => + .subscribe(() => { this.router.navigateByUrl(`admin/resources/machines/view`) - ); + }); } } diff --git a/admin-ui/src/app/features/resources/users/create/create.component.scss b/admin-ui/src/app/features/resources/users/create/create.component.scss index e8fb49a2..e6ad12a8 100644 --- a/admin-ui/src/app/features/resources/users/create/create.component.scss +++ b/admin-ui/src/app/features/resources/users/create/create.component.scss @@ -1,5 +1,5 @@ p { - font-family: Lato; + font-family: "Lato", sans-serif; } .example-form-field { diff --git a/admin-ui/src/app/features/resources/users/create/create.component.ts b/admin-ui/src/app/features/resources/users/create/create.component.ts index aeb9fbc9..0f58716b 100644 --- a/admin-ui/src/app/features/resources/users/create/create.component.ts +++ b/admin-ui/src/app/features/resources/users/create/create.component.ts @@ -193,7 +193,10 @@ export class CreateComponent{ case: 'MESSAGE' }, disableClose: true - }).afterClosed().subscribe(() => this.router.navigateByUrl('admin/resources/devices/view')); + }).afterClosed() + .subscribe(() => { + this.router.navigateByUrl('admin/resources/devices/view') + }); } ngOnDestroy() { @@ -333,9 +336,7 @@ export class CreateComponent{ if (response.response.data) { this.data = response.response.data; if(url === "zoneuser"){ - this.primaryData = {userId:this.data[0].userId, zone:this.data[0].zoneCode, regCenterId:this.data[0].regCenterId, name: this.data[0].userName} - }else{ - this.primaryData = {userId:this.data[0].userId, zone:this.data[0].zoneCode, regCenterId:this.data[0].regCenterId, name: this.data[0].userName} + this.primaryData = {userId:this.data[0].userId, zone:this.data[0].zoneCode, regCenterId:this.data[0].regCenterId, name: this.data[0].userName}; } this.initializeheader(); } else { diff --git a/admin-ui/src/app/shared/dialog/dialog.component.html b/admin-ui/src/app/shared/dialog/dialog.component.html index e0473b63..4468206d 100644 --- a/admin-ui/src/app/shared/dialog/dialog.component.html +++ b/admin-ui/src/app/shared/dialog/dialog.component.html @@ -5,6 +5,7 @@

{{ input.title[primaryLangCode] }}

Error Information
Error Message
{{errorMessage}}
+
Missing Data Table