Skip to content

Commit

Permalink
Merge pull request #325 from Sunbird-cQube/dev
Browse files Browse the repository at this point in the history
merge dev to staging
  • Loading branch information
htvenkatesh authored Jul 11, 2023
2 parents 382b43c + 27f0d5d commit 0844fc0
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ nishtha,{% if nishtha == true %}true{% else %}false{% endif %}{{''}}
pgi,{% if pgi == true %}true{% else %}false{% endif %}{{''}}
pmPoshan,{% if pmPoshan == true %}true{% else %}false{% endif %}{{''}}
diksha,{% if diksha == true %}true{% else %}false{% endif %}{{''}}
microImprovements,{% if microImprovements == true %}true{% else %}false{% endif %}{{''}}
microImprovement,{% if microImprovement == true %}true{% else %}false{% endif %}{{''}}
nas,{% if nas == true %}true{% else %}false{% endif %}{{''}}
udisePlus,{% if udisePlus == true %}true{% else %}false{% endif %}{{''}}
udise,{% if udise == true %}true{% else %}false{% endif %}{{''}}
nipunBharat,{% if nipunBharat == true %}true{% else %}false{% endif %}{{''}}
ncertQuiz,{% if ncertQuiz == true %}true{% else %}false{% endif %}{{''}}
quiz,{% if quiz == true %}true{% else %}false{% endif %}{{''}}
ncf,{% if ncf == true %}true{% else %}false{% endif %}{{''}}
1 change: 1 addition & 0 deletions ansible/roles/dashboard/templates/environment.prod.ts.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export const environment = {
production: true,
apiURL: 'https://{{ api_endpoint }}/api/queryBuilder',
config: "{{ access_type }}",
cqubeVersion: "{{ cqube_version }}",
stateCode: "{{ state_name }}",
numberFormat: {
reports: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export const environment = {
apiURL: 'http://{{ api_endpoint }}:3002',
config: "{{ access_type }}",
stateCode: "{{ state_name }}",
cqubeVersion: "{{ cqube_version }}",
numberFormat: {
reports: {
locale: 'en-IN',
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/dashboard/templates/environment.ts.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export const environment = {
production: false,
apiURL: 'https://{{ api_endpoint }}/api/queryBuilder',
config: "{{ access_type }}",
cqubeVersion: "{{ cqube_version }}",
stateCode: "{{ state_name }}",
numberFormat: {
reports: {
Expand Down
1 change: 1 addition & 0 deletions ansible/roles/dashboard/templates/environment_local.ts.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export const environment = {
production: false,
apiURL: 'http://{{ api_endpoint }}:3002',
config: "{{ access_type }}",
cqubeVersion: "{{ cqube_version }}",
stateCode: "{{ state_name }}",
numberFormat: {
reports: {
Expand Down
14 changes: 7 additions & 7 deletions config_files/national_program_selector.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
nishtha: true
microImprovement: true
ncf: true
quiz: true
nipunBharat: true
udise: true
pgi: true
pmPoshan: true
diksha: true
microImprovements: true
nas: true
udisePlus: true
nipunBharat: true
ncertQuiz: true
ncf: true
diksha: true
nishtha: true
40 changes: 20 additions & 20 deletions shell_scripts/national_program_selector.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/bin/bash

check_microImprovements(){
check_microImprovement(){
while true
do
echo -e "\e[0;36m${bold}Hint: Enter true or false to enable microImprovements program ${normal}"
echo -e "\e[0;36m${bold}Hint: Enter true or false to enable microImprovement program ${normal}"
echo -e "\e[0;38m${bold}please enter true or false.${normal}"
read micro_Improvements
if ! [[ $micro_Improvements == "true" || $micro_Improvements == "false" ]]; then
read micro_Improvement
if ! [[ $micro_Improvement == "true" || $micro_Improvement == "false" ]]; then
echo -e "\e[0;31m${bold}Error - Please enter either true or false ${normal}"; fail=1
else
printf "microImprovements: $micro_Improvements\n" >> config_files/national_program_selector.yml
printf "microImprovement: $micro_Improvement\n" >> config_files/national_program_selector.yml
break;

fi
Expand All @@ -32,16 +32,16 @@ read n_cf
done
}

check_ncertQuiz(){
check_quiz(){
while true
do
echo -e "\e[0;36m${bold}Hint: Enter true or false to enable ncertQuiz program ${normal}"
echo -e "\e[0;38m${bold}please enter true or false.${normal}"
read ncert_Quiz
if ! [[ $ncert_Quiz == "true" || $ncert_Quiz == "false" ]]; then
read Quiz
if ! [[ $Quiz == "true" || $Quiz == "false" ]]; then
echo -e "\e[0;31m${bold}Error - Please enter either true or false ${normal}"; fail=1
else
printf "ncertQuiz: $ncert_Quiz\n" >> config_files/national_program_selector.yml
printf "quiz: $Quiz\n" >> config_files/national_program_selector.yml
break;

fi
Expand All @@ -64,16 +64,16 @@ read nipun_Bharat
done
}

check_udise_plus(){
check_udise(){
while true
do
echo -e "\e[0;36m${bold}Hint: Enter true or false to enable udise+ program ${normal}"
echo -e "\e[0;36m${bold}Hint: Enter true or false to enable udise program ${normal}"
echo -e "\e[0;38m${bold}please enter true or false.${normal}"
read udise_plus
if ! [[ $udise_plus == "true" || $udise_plus == "false" ]]; then
read u_dise
if ! [[ $u_dise == "true" || $u_dise == "false" ]]; then
echo -e "\e[0;31m${bold}Error - Please enter either true or false ${normal}"; fail=1
else
printf "udise+: $udise_plus\n" >> config_files/national_program_selector.yml
printf "udise: $u_dise\n" >> config_files/national_program_selector.yml
break;

fi
Expand Down Expand Up @@ -182,11 +182,11 @@ if [[ $yn == yes ]]; then
if [[ -e "config_files/national_program_selector.yml" ]]; then
rm config_files/national_program_selector.yml
touch config_files/national_program_selector.yml
check_microImprovements
check_microImprovement
check_ncf
check_ncertQuiz
check_quiz
check_nipunBharat
check_udise_plus
check_udise
check_pgi
check_pmPoshan
check_nas
Expand Down Expand Up @@ -224,11 +224,11 @@ echo -e "\e[0;33m${bold}If you want to edit config value please enter yes.${norm
if [[ $yn == yes ]]; then
rm config_files/program_selector.yml
touch config_files/program_selector.yml
check_microImprovements
check_microImprovement
check_ncf
check_ncertQuiz
check_quiz
check_nipunBharat
check_udise_plus
check_udise
check_pgi
check_pmPoshan
check_nas
Expand Down
6 changes: 6 additions & 0 deletions upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,14 @@ if [[ $storage_type == "oracle" ]]; then
fi

#Running script to generate program selector config file
access_type=$(awk ''/^access_type:' /{ if ($2 !~ /#.*/) {print $2}}' config_files/upgradation_config.yml)
if [[ $access_type == "VSK" ]]; then
chmod u+x shell_scripts/program_selector.sh
. "shell_scripts/program_selector.sh"
else
chmod u+x shell_scripts/national_program_selector.sh
. "shell_scripts/national_program_selector.sh"
fi

#Running script to clone all the required repositories
chmod u+x shell_scripts/repository_clone.sh
Expand Down

0 comments on commit 0844fc0

Please sign in to comment.