Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge dev to tst #154

Merged
merged 38 commits into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
d970fb2
Adding env.var applicationsightsConnectionSrting for BE
Jun 21, 2023
7beb8fc
Feature/163742/enable ootb monitoring capabilities (#135)
gkalomalos Jun 21, 2023
bcb2fb9
Feature/157615/allow retrieval of all initiatives published and unpub…
gkalomalos Jun 22, 2023
0172a7d
Feature/163295/add swimlanes at phase board (#137)
ladeniva2 Jun 22, 2023
3756c7e
removed overflow-x from el-select-tags (#138)
ladeniva2 Jun 22, 2023
bc4f945
hide square logo and change menu height (#139)
ladeniva2 Jun 22, 2023
a13bfd0
Feature/160826/group innovation portfolio solution details section (#…
ladeniva2 Jun 22, 2023
a9a0bf3
Revert adding azure-monitor-opentelemetry==1.0.0b13 to resolve No mod…
gkalomalos Jun 22, 2023
6eb8a49
updated empty value type (#141)
ladeniva2 Jun 22, 2023
b96f005
Feature/160752/stages phases (#142)
Alexa-Laf Jun 22, 2023
51f573f
updated styles to work on all browsers (#143)
ladeniva2 Jun 22, 2023
f1888a7
feat/Add azure-monitor-opentelemetry to requirements
gkalomalos Jun 22, 2023
3434f2e
feat/Add configure_azure_monitor to settings.py
gkalomalos Jun 22, 2023
c011d98
chore/Remove configure_azure_monitor and implement older approach to …
gkalomalos Jun 22, 2023
0bf2a32
chore/Remove opentelemetry from settings.py
gkalomalos Jun 22, 2023
30171be
chore/Code cleanup
gkalomalos Jun 23, 2023
7e6ba8f
Feature/163742/enable ootb monitoring capabilities (#146)
gkalomalos Jun 26, 2023
8c40f81
chore/Change configure_azure_monitor signature to include named argument
gkalomalos Jun 26, 2023
85e2c4b
feat/Change userprofile list to autocomplete field (#145)
gkalomalos Jun 27, 2023
30e56b7
rename stage_name and phase_name to stage_label and phase_label (#147)
Alexa-Laf Jun 27, 2023
efaaf0b
feature/161336/initiatives-by-stage-board added stage table and tabl…
ladeniva2 Jun 27, 2023
2ed8b75
feat/Switch nextLink to deltaLink mechanism
gkalomalos Jun 27, 2023
bf6e208
feat/Add get and save last delta link mechanism
gkalomalos Jun 27, 2023
da0d89e
chore/Refactor delta link generation and store method
gkalomalos Jun 28, 2023
8bbb50f
Feature/refactor aad user fetch and update mechanism (#149)
gkalomalos Jun 28, 2023
e946458
chore/Add migration file for deltalink
gkalomalos Jun 28, 2023
8c317f6
Merge branch 'feature/refactor-aad-user-fetch-and-update-mechanism' i…
gkalomalos Jun 28, 2023
6157874
chore/Add log statements to debug deltalink response
gkalomalos Jun 28, 2023
46a5dcf
chore/Remove redundant log statements
gkalomalos Jun 28, 2023
6d2f2fc
chore/Refactor deltalinks and logger
gkalomalos Jun 28, 2023
2926ab5
Revert commits 2ed8b75c01bd61b4a100830931c58c340ab6f98c to 46a5dcfae4…
gkalomalos Jun 28, 2023
b7a21b5
Merge branch 'tst' into dev
gkalomalos Jun 28, 2023
1cdfea7
Bugfix/163402/dashboarding system error (#150)
mgaliatsatou Jun 28, 2023
142cb2d
feat/Add delta to graph url
gkalomalos Jun 28, 2023
82acc7c
chore/Remove redundant logging statements
gkalomalos Jun 29, 2023
6164396
Rollback to pre-deltaLink mechanism
gkalomalos Jun 29, 2023
f977532
chore/Remove redundant files
gkalomalos Jun 29, 2023
2aac887
Merge branch 'tst' of https://github.com/unicef/invent into dev
gkalomalos Jun 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion django/azure_services/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,4 @@ def get_access_token(self):
return None

def is_auto_signup_allowed(self, request, sociallogin):
return True
return True
27 changes: 27 additions & 0 deletions django/kpi/management/commands/update_solutionlog.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from django.core.management.base import BaseCommand
from kpi.models import SolutionLog


class Command(BaseCommand):
help = 'Updates solution log data for May and June 2023'

def handle(self, *args, **options):
all_entries = SolutionLog.objects.all()

for entry in all_entries:
data = entry.data
solutions = data['solutions']

for solution in solutions:
if 'problem_statements' in solution:
if isinstance(solution['problem_statements'][0], dict):
solution['problem_statements'] = [x['id'] for x in solution['problem_statements']]
solution['problem_statements'] = list(set(solution['problem_statements']))

if 'portfolios' in solution:
if isinstance(solution['portfolios'][0], dict):
solution['portfolios'] = [x['id'] for x in solution['portfolios']]
solution['portfolios'] = list(set(solution['portfolios']))

entry.data = data
entry.save()
15 changes: 15 additions & 0 deletions django/kpi/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ def update_solution_log_task(current_date=None):
portfolios = PortfolioKPISerializer(Portfolio.objects.all(), many=True)
solutions = SolutionKPISerializer(Solution.objects.all(), many=True)

#making sure that solutions['data']['problem_statements'] and solutions['data']['portfolios']
#are both lists containing unique ids instead of the whole object
for solution in solutions.data:
if "problem_statements" in solution:
#checking if the item is a dictionary
if isinstance(solution["problem_statements"][0], dict):
solution["problem_statements"] = [x["id"] for x in solution["problem_statements"]]
#keeping unique ids only
solution["problem_statements"] = list(set(solution["problem_statements"]))

if "portfolios" in solution:
if isinstance(solution["portfolios"][0], dict):
solution["portfolios"] = [x["id"] for x in solution["portfolios"]]
solution["portfolios"] = list(set(solution["portfolios"]))

log_entry.data = dict(portfolios=portfolios.data, solutions=solutions.data)
log_entry.save()

Expand Down
2 changes: 1 addition & 1 deletion django/project/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1252,4 +1252,4 @@ class Meta:
]

def __str__(self): # pragma: no cover
return f"{self.solution} in {self.country}"
return f"{self.solution} in {self.country}"
1 change: 1 addition & 0 deletions django/startup_actions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ django-admin makemessages -l pt
python manage.py compilemessages
python manage.py migrate
python manage.py migrate_sectors # TODO: Remove when the sectors are split in production.
python manage.py update_solutionlog # TODO: Remove when the solution logs for may and june of 2023 are corrected.
gunicorn tiip.wsgi:application -w 2 -b :8000 --reload --timeout 120