Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #69 from vaibhavkhanna08/develop
Browse files Browse the repository at this point in the history
Updating Master Branch Code
  • Loading branch information
devikasuresh20 authored Oct 13, 2023
2 parents 6e8c102 + 3df7ced commit 410023b
Show file tree
Hide file tree
Showing 133 changed files with 22,777 additions and 1,850 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/package-prod
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Static Code Analysis and Package Prod
on:
push:
branches: [ "master"]

jobs:
Package:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
steps:

- name: Checkout code
uses: actions/checkout@v3


- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16


- name: Build with NPM
run: |
npm config set legacy-peer-deps true
npm install -g @angular/cli
npm install -g grunt-cli
npm install [email protected] --save-dev
npm install [email protected]
npm install node-sass --force
npm install --force


- name: Create WAR file
run: npm run ng build --prod --aot && grunt

- name: Upload WAR file as artifact
uses: actions/upload-artifact@v2
with:
name: HWC-UI
path: target/tmui-v1.0.war

52 changes: 52 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Package
on:
push:
branches: [ "develop" ]

jobs:
CodeQL:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
steps:

- name: Checkout code
uses: actions/checkout@v3


- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'


- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Build with NPM and Maven
run: |
npm config set legacy-peer-deps true
npm install -g @angular/cli
npm install [email protected] --save-dev
npm install [email protected]
npm install node-sass
npm install --force
npm run build
mvn clean install
- name: Create WAR file
run: mvn -B package --file pom.xml

- name: Upload WAR file as artifact
uses: actions/upload-artifact@v2
with:
name: HWC-UI
path: target/tmui-v1.0.war
95 changes: 0 additions & 95 deletions .github/workflows/sast-and-package.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/sast.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: "CodeQL"

on:
push:
branches: [ "develop" ]
paths-ignore:
- target/**
- dist/**
pull_request:
# The branches below must be a subset of the branches above
branches: [ "develop" ]
paths-ignore:
- target/**
- dist/**
jobs:
analyze:
name: Analyze

runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write


strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/tmp
/out-tsc
/target
package-lock.json

yarn-error.log
yarn.lock
/src/assets/git-version.json
Expand Down
107 changes: 74 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,60 +34,101 @@ This microservice is built on Java, Spring boot framework and MySQL DB.


## Installation
This service has been tested on Wildfly as the application server.
* Visual Studio Code Installation
Angular is a popular web development platform developed and maintained by Google. Angular uses TypeScript as its main programming language. The Visual Studio Code editor supports TypeScript IntelliSense and code navigation out of the box, so you can do Angular development without installing any other extension.

To install the Health and Wellness Centre (HWC) module, follow these steps:
Download Visual Studio Code from the below link:
https://code.visualstudio.com/download

Clone the repository to your local machine.
Install the dependencies.
Link for installation steps:
https://www.educative.io/answers/how-to-install-visual-studio-code-on-windows-os

* npm install
* npm install [email protected]
* npm run build
* mvn clean install

* NVM Installation
nvm - Node Version Manager. It is a tool that allows you to download and install Node.js. It allows you to pick and choose the Node.js version that you wish to use.

## Configuration
The admin module can be configured by editing the config.js file. This file contains all of the settings for the module, such as the database connection string, the user authentication mechanism, and the role hierarchy.
Download NVM form below link:
https://github.com/coreybutler/nvm-windows/releases

### Prerequisites
* Wildfly (or any compatible app server)
* Redis
* MySQL Database
Steps to download nvm and node: https://dev.to/skaytech/how-to-install-node-version-manager-nvm-for-windows-10-4nbi

## Integrations
* Video Consultation
Install Node.js using below command:
nvm install 8.9.0

## Usage
All features have been exposed as REST endpoints. Refer to the SWAGGER API specification for details.
Check Node.js version:
node --version

Check npm version:
npm --version

Using the below command to specify the version of npm that you wish to use. In our case, since we have only one version installed. Let's go with that.
nvm use 8.9.0

* Angular CLI Installation
Angular CLI is a command line tool for Angular. You can install it globally using npm with the following command:
npm install -g @angular/cli@1.7.0

* Python Installation [ If you face any Python related error during node_modules installation]
Download Python 2.7.12
Download link: https://www.python.org/downloads/


* Setup Environment Variables
1. Add below paths in “User Environment Variables”:
%NVM_HOME% - C:\Users\myFolder\AppData\Roaming\nvm
%NVM_SYMLINK% - C:\Program Files\nodejs

<!-- # MMUUI
2. Add below paths in “User Environment Variables -> Path “:
C:\Python27
C:\Python27\Scripts
C:\Users\myFolder\AppData\Local\Programs\Microsoft VS Code\bin
C:\Users\ myFolder\AppData\Roaming\npm
C:\Users\ myFolder\AppData\Roaming\npm\node_modules\@angular\cli\bin
%NVM_HOME%
%NVM_SYMLINK%

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.1.0-rc.0.
3. Add below paths in “System Environment Variables”:
%NVM_HOME% - C:\Users\ myFolder \AppData\Roaming\nvm
%NVM_SYMLINK% - C:\Program Files\nodejs

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
4. Add below paths in “System Environment Variables -> Path “:
C:\Python27
%NVM_HOME%
%NVM_SYMLINK%
%AppData%\npm
C:\Users\ myFolder\AppData\Roaming\npm

## Code scaffolding
Note: After changing environment variables, please restart your system and check again.

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|module`.

## Build
* Steps to clone and setup HWC-Facility-APP:
1. Clone HWC-Facility-App from git hub fork branch in your local system using below command:
git clone <repository-Url>

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.
2. Open hwc-facility-app project code in Visual Studio Code

## Running unit tests
3. Navigate to your project folder and execute below command for node_modules installation:
npm install

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
4. If you face any error related to ng2-smart-table, execute below command:

## Running end-to-end tests
npm install [email protected]

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
Before running the tests make sure you are serving the app via `ng serve`.
5. Once node module is installed successfully, then run the project using below command:
ng serve

## Further help
By default your application will be available at ‘http://localhost:4200/’. You can access it in your browser.


### Prerequisites
* Wildfly (or any compatible app server)
* Redis
* MySQL Database

## Integrations
* Video Consultation

## Usage
All features have been exposed as REST endpoints. Refer to the SWAGGER API specification for details.

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). -->
Loading

0 comments on commit 410023b

Please sign in to comment.