forked from cisco-open/martian-bank-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue no. 44,UI is not responsive solved,Made the website responsive …
…for laptops as well as mobiles co-authored-by: Dhruv <[email protected]> co-authored-by: Tanish <[email protected]> co-authored-by: Vidhita <[email protected]>
- Loading branch information
1 parent
be51230
commit a0cdd5c
Showing
15 changed files
with
222 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ lerna-debug.log* | |
|
||
node_modules | ||
venv_bankapp | ||
^ | ||
dist | ||
dist-ssr | ||
*.local | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# PowerShell script equivalent to the provided Bash script | ||
|
||
# Setup | ||
|
||
Set-Location .. | ||
|
||
# Check for Dependencies | ||
if (-not (Get-Command "node" -ErrorAction SilentlyContinue)) { | ||
Write-Host "`n Node.js is not installed. Please install Node.js and npm." | ||
exit 1 | ||
} | ||
|
||
if (-not (Get-Command "python3" -ErrorAction SilentlyContinue)) { | ||
Write-Host "`n Python 3 is not installed. Please install Python 3." | ||
exit 1 | ||
} | ||
|
||
# Running JavaScript microservices | ||
|
||
function Run-Javascript-Microservice { | ||
param ( | ||
[string]$service_name, | ||
[string]$service_alias | ||
) | ||
|
||
$current_dir = Get-Location | ||
|
||
Write-Host "Running $service_name microservice..." | ||
|
||
Start-Process PowerShell -ArgumentList @" | ||
Set-Location '$current_dir\$service_name' | ||
npm install | ||
npm run $service_alias | ||
"@ | ||
|
||
Start-Sleep -Seconds 2 | ||
|
||
Write-Host "$service_name is running...`n" | ||
} | ||
|
||
Run-Javascript-Microservice -service_name "ui" -service_alias "ui" | ||
Run-Javascript-Microservice -service_name "customer-auth" -service_alias "auth" | ||
Run-Javascript-Microservice -service_name "atm-locator" -service_alias "atm" | ||
|
||
# Running Python microservices | ||
|
||
function Run-Python-Microservice { | ||
param ( | ||
[string]$service_name, | ||
[string]$service_alias | ||
) | ||
|
||
$current_dir = Get-Location | ||
|
||
Write-Host "Running $service_name microservice..." | ||
|
||
Start-Process PowerShell -ArgumentList @" | ||
Set-Location '$current_dir\$service_name' | ||
Remove-Item -Recurse venv_bankapp -ErrorAction SilentlyContinue | ||
python -m venv venv_bankapp | ||
.\venv_bankapp\Scripts\Activate | ||
pip install -r requirements.txt | ||
python '$service_alias.py' | ||
"@ | ||
|
||
Start-Sleep -Seconds 2 | ||
|
||
Write-Host "$service_name is running...`n" | ||
} | ||
|
||
Run-Python-Microservice -service_name "dashboard" -service_alias "dashboard" | ||
Run-Python-Microservice -service_name "accounts" -service_alias "accounts" | ||
Run-Python-Microservice -service_name "transactions" -service_alias "transaction" | ||
Run-Python-Microservice -service_name "loan" -service_alias "loan" | ||
|
||
Write-Host "Setup completed successfully!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/bin/bash | ||
|
||
####################################################################################### | ||
## Setup | ||
|
||
cd .. | ||
|
||
# Check for Dependencies | ||
if ! command -v node &>/dev/null; then | ||
echo "Node.js is not installed. Please install Node.js and npm." | ||
exit 1 | ||
fi | ||
|
||
# if ! command -v python3 &>/dev/null; then | ||
# echo "Python 3 is not installed. Please install Python 3." | ||
# exit 1 | ||
# fi | ||
|
||
####################################################################################### | ||
## Running Javascript microservices | ||
|
||
run_javascript_microservice() { | ||
local service_name="$1" | ||
local service_alias="$2" | ||
local current_dir="$(pwd)" | ||
|
||
echo "Running $service_name microservice..." | ||
|
||
( | ||
cd "$current_dir/$service_name" && | ||
start bash -c "npm install && npm run $service_alias" & | ||
) | ||
sleep 2 | ||
|
||
echo "$service_name is running ..." | ||
echo | ||
} | ||
|
||
run_javascript_microservice "ui" "ui" | ||
run_javascript_microservice "customer-auth" "auth" | ||
run_javascript_microservice "atm-locator" "atm" | ||
|
||
####################################################################################### | ||
# Running Python microservices | ||
|
||
# conda config --set auto_activate_base false &>/dev/null | ||
# brew update &>/dev/null | ||
# brew upgrade python3 &>/dev/null | ||
|
||
# run_python_microservice() { | ||
# local service_name="$1" | ||
# local service_alias="$2" | ||
# local current_dir="$(pwd)" | ||
|
||
# echo "Running $service_name microservice ..." | ||
|
||
# ( | ||
# cd "$current_dir/$service_name" && | ||
# start bash -c "rm -rf venv_bankapp && python3 -m venv venv_bankapp && source venv_bankapp/bin/activate && pip3 install -r requirements.txt && python3 $service_alias.py" & | ||
# ) | ||
# sleep 2 | ||
|
||
# echo "$service_name is running ..." | ||
# echo | ||
# } | ||
|
||
# run_python_microservice "dashboard" "dashboard" | ||
# run_python_microservice "accounts" "accounts" | ||
# run_python_microservice "transactions" "transaction" | ||
# run_python_microservice "loan" "loan" | ||
|
||
echo "Setup completed successfully!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.