diff --git a/.github/workflows/mavenpublish.yml b/.github/workflows/mavenpublish.yml deleted file mode 100644 index 130dc767e92..00000000000 --- a/.github/workflows/mavenpublish.yml +++ /dev/null @@ -1,213 +0,0 @@ -# This workflow will build a package using Maven and then publish it nexus when a pull request is merged -# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path - -name: Maven Package upon a pull request - -on: - pull_request: - types: [closed] - -jobs: - build-kernel-ref-idobjectvalidator: - - runs-on: ubuntu-latest - - if: github.event.pull_request.merged == true - - 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 - if: github.event.pull_request.merged == true - - 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 SNAPSHOT - 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" - - 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 index 2c65e5a7177..5ee4b2e26a3 100644 --- a/.github/workflows/push_trigger.yml +++ b/.github/workflows/push_trigger.yml @@ -7,7 +7,7 @@ on: - master - 1.0.* - develop - - 1.1.2 + - 1.1.* jobs: build-kernel-ref-idobjectvalidator: @@ -23,12 +23,16 @@ jobs: 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 "::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 @@ -65,13 +69,16 @@ jobs: 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 "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} - echo "::set-env name=GPG_TTY::$(tty)" + 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 @@ -94,13 +101,16 @@ jobs: run: | cd kernel mvn -B package -s $GITHUB_WORKSPACE/settings.xml --file pom.xml - + - name: Publish the maven package run: | - cd kernel && mvn deploy -DskipTests -DaltDeploymentRepository=ossrh::default::${{ secrets.RELEASE_URL }} -s $GITHUB_WORKSPACE/settings.xml -f pom.xml + #cd kernel && mvn deploy -DskipTests -DaltDeploymentRepository=ossrh::default::${{ secrets.RELEASE_URL }} -s $GITHUB_WORKSPACE/settings.xml -f pom.xml + #cd .. + cd pre-registration-booking-service && mvn deploy -DskipTests -DaltDeploymentRepository=ossrh::default::${{ secrets.RELEASE_URL }} -s $GITHUB_WORKSPACE/settings.xml -f pom.xml env: GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} GPG_TTY: $(tty) + - name: Analyze with SonarCloud run: | cd kernel @@ -108,8 +118,111 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - # This workflow contains a single job called "build" + + build-pre-registration-booking-service: + + runs-on: ubuntu-latest + env: + NAMESPACE: ${{ secrets. dev_namespace_docker_hub }} + SERVICE_NAME: pre-registration-booking-service + SERVICE_LOCATION: pre-registration-booking-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.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: Build with Maven + run: | + cd pre-registration-booking-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: Publish the maven package + run: | + cd pre-registration-booking-service && mvn deploy -DskipTests -DaltDeploymentRepository=ossrh::default::${{ secrets.RELEASE_URL }} -s $GITHUB_WORKSPACE/settings.xml -f pom.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: @@ -129,11 +242,16 @@ jobs: - 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 "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} + echo "GPG_TTY=$(tty)" >> $GITHUB_ENV + echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - name: Build image run: | @@ -176,12 +294,15 @@ jobs: - 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 "::set-env name=BRANCH_NAME::$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" - echo ${{ env.BRANCH_NAME }} + echo "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV - name: Build image run: | @@ -203,3 +324,50 @@ jobs: echo VERSION=$VERSION docker tag $SERVICE_NAME $IMAGE_ID:$VERSION docker push $IMAGE_ID:$VERSION + + +# This workflow contains a single job called "build" + build-keycloak: + + runs-on: ubuntu-latest + env: + NAMESPACE: ${{ secrets. dev_namespace_docker_hub }} + SERVICE_NAME: mosip-keycloak + SERVICE_LOCATION: keycloak + + # 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: 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 "BRANCH_NAME=$(echo ${{ github.ref }} | sed -e 's,.*/\(.*\),\1,')" >> $GITHUB_ENV + + - 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/admin-ui/package-lock.json b/admin-ui/package-lock.json index 9a3415a7f79..e195e441de8 100644 --- a/admin-ui/package-lock.json +++ b/admin-ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "admin", - "version": "1.0.7", + "version": "1.1.4", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -12061,9 +12061,9 @@ } }, "url-parse": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.7.tgz", - "integrity": "sha512-d3uaVyzDB9tQoSXFvuSUNFibTd9zxd2bkVrDRvF5TmvWWQwqE4lgYJ5m+x1DbecWkw+LK4RNl2CU1hHuOKPVlg==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.3.tgz", + "integrity": "sha512-IIORyIQD9rvj0A4CLWsHkBBJuNqWpFQe224b6j9t/ABmquIS0qDU2pY6kl6AuOrL5OkCXHMCFNe1jBcuAggjvQ==", "dev": true, "requires": { "querystringify": "^2.1.1", diff --git a/admin-ui/package.json b/admin-ui/package.json index acd6732e0a0..357ebd4e5ed 100644 --- a/admin-ui/package.json +++ b/admin-ui/package.json @@ -1,6 +1,6 @@ { "name": "admin", - "version": "1.1.2", + "version": "1.1.4", "scripts": { "ng": "ng", "start": "ng serve", diff --git a/admin-ui/src/app/app-config.service.ts b/admin-ui/src/app/app-config.service.ts index 15062ce9be3..95725b846a8 100644 --- a/admin-ui/src/app/app-config.service.ts +++ b/admin-ui/src/app/app-config.service.ts @@ -12,6 +12,17 @@ export class AppConfigService { async loadAppConfig() { this.appConfig = await this.http.get('./assets/config.json').toPromise(); + if(this.appConfig.primaryLangCode){ + this.http.get(this.appConfig.baseUrl + 'masterdata/applicationconfigs').subscribe( + response => { + this.appConfig["primaryLangCode"]= response["response"]["primaryLangCode"]; + this.appConfig["secondaryLangCode"] = response["response"]["secondaryLangCode"]; + }, + error => { + console.log(error); + } + ); + } } getConfig() { diff --git a/admin-ui/src/app/app-routing.module.ts b/admin-ui/src/app/app-routing.module.ts index 641c3b31274..c27e906b19e 100644 --- a/admin-ui/src/app/app-routing.module.ts +++ b/admin-ui/src/app/app-routing.module.ts @@ -42,6 +42,13 @@ const routes: Routes = [ import('./features/bulkupload/bulkupload.module').then( m => m.BulkuploadModule ) + }, + { + path: 'keymanager', + loadChildren: () => + import('./features/keymanager/keymanager.module').then( + m => m.KeymanagerModule + ) } ], canActivateChild : [AuthguardService] , canActivate: [LanguageGuard] }, diff --git a/admin-ui/src/app/app.constants.ts b/admin-ui/src/app/app.constants.ts index 85923c57a84..048377e2761 100644 --- a/admin-ui/src/app/app.constants.ts +++ b/admin-ui/src/app/app.constants.ts @@ -63,7 +63,7 @@ export const navItems = [ route: '/admin/packet-status', children: null, auditEventId: 'ADM-008', - roles: ['ZONAL_ADMIN'] + roles: ['ZONAL_ADMIN', 'GLOBAL_ADMIN'] }, { displayName: 'menuItems.item3.title', @@ -83,13 +83,57 @@ export const navItems = [ icon: null, route: '/admin/bulkupload/masterdataupload', auditEventId: 'ADM-004', - roles: ['ZONAL_ADMIN', 'GLOBAL_ADMIN'] + roles: ['GLOBAL_ADMIN'] }, { displayName: 'menuItems.item5.subItem2', icon: null, route: '/admin/bulkupload/packetupload', auditEventId: 'ADM-005', + roles: ['GLOBAL_ADMIN'] + } + ], + auditEventId: 'ADM-003', + roles: ['GLOBAL_ADMIN'] + }, + { + displayName: 'menuItems.item6.title', + icon: 'assets/images/support.svg', + route: 'admin/keymanager', + children: [ + { + displayName: 'menuItems.item6.subItem1', + icon: null, + route: '/admin/keymanager/generatecsr', + auditEventId: 'ADM-004', + roles: ['ZONAL_ADMIN', 'GLOBAL_ADMIN'] + }, + { + displayName: 'menuItems.item6.subItem2', + icon: null, + route: '/admin/keymanager/generatemasterkey', + auditEventId: 'ADM-004', + roles: ['ZONAL_ADMIN', 'GLOBAL_ADMIN'] + }, + { + displayName: 'menuItems.item6.subItem3', + icon: null, + route: '/admin/keymanager/getcertificate', + auditEventId: 'ADM-004', + roles: ['ZONAL_ADMIN', 'GLOBAL_ADMIN'] + }, + { + displayName: 'menuItems.item6.subItem4', + icon: null, + route: '/admin/keymanager/uploadcertificate', + auditEventId: 'ADM-004', + roles: ['ZONAL_ADMIN', 'GLOBAL_ADMIN'] + }, + { + displayName: 'menuItems.item6.subItem5', + icon: null, + route: '/admin/keymanager/uploadotherdomaincertificate', + auditEventId: 'ADM-004', roles: ['ZONAL_ADMIN', 'GLOBAL_ADMIN'] } ], @@ -307,7 +351,7 @@ export const ListViewIdKeyMapping = { 'machine-type': { idKey: 'code', auditEventId: 'ADM-067' }, templates: { idKey: 'id', auditEventId: 'ADM-068' }, title: { idKey: 'code', auditEventId: 'ADM-069' }, - 'blacklisted-words': { idKey: 'word', auditEventId: 'ADM-070' }, + 'blacklisted-words': { idKey: 'word', auditEventId: 'ADM-070'}, 'document-type': { idKey: 'code', auditEventId: 'ADM-071' }, location: { idKey: 'postalCode', auditEventId: 'ADM-072' }, 'device-specs': { idKey: 'id', auditEventId: 'ADM-073' }, @@ -319,7 +363,8 @@ export const ListViewIdKeyMapping = { 'center-type': { idKey: 'code', auditEventId: 'ADM-079' }, holiday: { idKey: 'holidayId', auditEventId: 'ADM-080' }, masterdataupload : { idKey: 'transcationId', auditEventId: 'ADM-081' }, - packetupload : { idKey: 'transcationId', auditEventId: 'ADM-082' } + packetupload : { idKey: 'transcationId', auditEventId: 'ADM-082' }, + getcertificate : { idKey: 'applicationId', auditEventId: 'ADM-083' } }; diff --git a/admin-ui/src/app/core/models/filter-request.model.ts b/admin-ui/src/app/core/models/filter-request.model.ts index b5a258bcf69..1a9c88c9425 100644 --- a/admin-ui/src/app/core/models/filter-request.model.ts +++ b/admin-ui/src/app/core/models/filter-request.model.ts @@ -3,6 +3,7 @@ import { FilterModel } from './filter.model'; export class FilterRequest { constructor( public filters: FilterModel[], - public languageCode: string + public languageCode: string, + public optionalFilters: FilterModel[] ) {} } diff --git a/admin-ui/src/app/core/models/holiday-specs.model.ts b/admin-ui/src/app/core/models/holiday-specs.model.ts index 9dcec14d72f..faca595f3f4 100644 --- a/admin-ui/src/app/core/models/holiday-specs.model.ts +++ b/admin-ui/src/app/core/models/holiday-specs.model.ts @@ -7,6 +7,6 @@ export class HolidaySpecsModel { public locationCode: string, public langCode: string, public isActive?: boolean, - public id?: string + public holidayId?: string ) {} } \ No newline at end of file diff --git a/admin-ui/src/app/core/models/optional-filter-values.model.ts b/admin-ui/src/app/core/models/optional-filter-values.model.ts new file mode 100644 index 00000000000..2fe64bb3af0 --- /dev/null +++ b/admin-ui/src/app/core/models/optional-filter-values.model.ts @@ -0,0 +1,7 @@ +export class OptionalFilterValuesModel { + constructor( + public columnName: string, + public type: string, + public value?: string, + ) {} +} 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 c71a9c4a6f7..2122de1a1b1 100644 --- a/admin-ui/src/app/core/services/data-storage.service.ts +++ b/admin-ui/src/app/core/services/data-storage.service.ts @@ -24,7 +24,6 @@ export class DataStorageService { locationCode: string, langCode: string ): Observable { - console.log('getImmediateChildren>>>'); return this.http.get( this.BASE_URL + appConstants.MASTERDATA_BASE_URL + @@ -115,7 +114,6 @@ export class DataStorageService { type: string, data: RequestModel ): Observable { - console.log('getFiltersForAllMaterDataTypes>>>' + type + '<<>>' + data); return this.http.post( this.BASE_URL + appConstants.MASTERDATA_BASE_URL + type + '/filtervalues', data @@ -131,7 +129,6 @@ export class DataStorageService { } getZoneData(langCode: string): Observable { - console.log('getZoneData>>>'); return this.http.get( this.BASE_URL + appConstants.MASTERDATA_BASE_URL + diff --git a/admin-ui/src/app/core/services/keymanager.service.ts b/admin-ui/src/app/core/services/keymanager.service.ts new file mode 100644 index 00000000000..4e07e7def51 --- /dev/null +++ b/admin-ui/src/app/core/services/keymanager.service.ts @@ -0,0 +1,48 @@ +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { RequestModel } from '../models/request.model'; +import { Observable } from 'rxjs'; +import { AppConfigService } from 'src/app/app-config.service'; + +@Injectable({ + providedIn: 'root' +}) +export class KeymanagerService { + + constructor(private http: HttpClient, private appService: AppConfigService) { } + + private BASE_URL = this.appService.getConfig().baseUrl; + + getCertificate(request: RequestModel, applicationId : any, pageStart : any, pageFetch : any, referenceId : any): Observable { + return this.http.get(this.BASE_URL + 'keymanager' + '/getCertificate?applicationId='+applicationId+'&referenceId='+referenceId); + } + + + uploadOtherDomainCertificate(data: any): Observable { + return this.http.post( + this.BASE_URL + 'keymanager' + '/uploadOtherDomainCertificate', + data + ); + } + + uploadCertificate(data: any): Observable { + return this.http.post( + this.BASE_URL + 'keymanager' + '/uploadCertificate', + data + ); + } + + generateMasterkey(data: any, ObjectType : any): Observable { + return this.http.post( + this.BASE_URL + 'keymanager' + '/generateMasterKey' + '/' + ObjectType, + data + ); + } + + generateCSR(data: any): Observable { + return this.http.post( + this.BASE_URL + 'keymanager' + '/generateCSR', + data + ); + } +} diff --git a/admin-ui/src/app/core/side-menu/side-menu.component.html b/admin-ui/src/app/core/side-menu/side-menu.component.html index 0c449357a71..f0bbf00feeb 100644 --- a/admin-ui/src/app/core/side-menu/side-menu.component.html +++ b/admin-ui/src/app/core/side-menu/side-menu.component.html @@ -1,11 +1,10 @@
    -
  • - +