Skip to content

Commit

Permalink
Tst (#161)
Browse files Browse the repository at this point in the history
* Revert adding azure-monitor-opentelemetry==1.0.0b13 to resolve No module named azure.monitor issue

* updated empty value type (#141)

* Feature/160752/stages phases (#142)

* add new column - feature key phases_stages

* create a mapping between phases and stages

* updated styles to work on all browsers (#143)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add configure_azure_monitor to settings.py

* chore/Remove configure_azure_monitor and implement older approach to identify compatibility

* chore/Remove opentelemetry from settings.py

* chore/Code cleanup

* Dev 157615 160826 162116 163295 163762 164563 (#144)

* Adding env.var applicationsightsConnectionSrting for BE

* Feature/163742/enable ootb monitoring capabilities (#135)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add opentelemetry to application settings

* chore/Change env from dev to tst

* chore/Rollback env from tst to dev

* Feature/157615/allow retrieval of all initiatives published and unpublished from api revision (#136)

* feat/Add published query parameter to the get_queryset

- if we do not provide an additional query parameter, then the default behavior will remain the same and the endpoint will return only the published ones.
- If we provide the additional query parameter published=0, then the endpoint will return only the unpublished ones.
- If we provide the additional query parameter published=1, then the endpoint will return both the unpublished and published ones.

* feat/Change published-unpublished to match new criteria

- Change get_queryset method to its original status, but removing the unpublished.
- Add logic to support published/unpublished parameters.

* chore/Refactor publised-unpublished cases in a more pythonic way

* Feature/163295/add swimlanes at phase board (#137)

* table with new story features

* code refactoring

* removed overflow-x from el-select-tags (#138)

* hide square logo and change menu height (#139)

* Feature/160826/group innovation portfolio solution details section (#140)

* solutions edit/create new Innovation Portfolios group, portfolios table key bug fix

* updated solution view with new Innovation portfolios card section

* Revert adding azure-monitor-opentelemetry==1.0.0b13 to resolve No module named azure.monitor issue

* updated empty value type (#141)

* Feature/160752/stages phases (#142)

* add new column - feature key phases_stages

* create a mapping between phases and stages

* updated styles to work on all browsers (#143)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add configure_azure_monitor to settings.py

* chore/Remove configure_azure_monitor and implement older approach to identify compatibility

* chore/Remove opentelemetry from settings.py

* chore/Code cleanup

* chore/Rollback phases stages

- Rollback dbd9139 add new column - feature key phases_stages
- Rollback d665c3f create a mapping between phases and stages

Remove additions for item 160752 to move selected items to tst environment

---------

Co-authored-by: Diogenis Petropoulos <diogenis,petropoulos@sword-group.com>
Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>
Co-authored-by: Alexa-Laf <131444412+Alexa-Laf@users.noreply.github.com>

* Feature/163742/enable ootb monitoring capabilities (#146)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add opentelemetry to application settings

* chore/Change env from dev to tst

* chore/Rollback env from tst to dev

* feat/Add internal_ips to fetch the pod internal ip

* chore/Rename azure folder to azure_services

* chore/Remove reduntant import from settings

* chore/Change configure_azure_monitor signature to include named argument

* feat/Change userprofile list to autocomplete field (#145)

- Add list with autocomplete search bar in the edit technology platform admin page.
- Add name as the search bar option.

* rename stage_name and phase_name to stage_label and phase_label (#147)

* feature/161336/initiatives-by-stage-board  added stage table and table switch (#148)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* Feature/refactor aad user fetch and update mechanism (#149)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* chore/Add migration file for deltalink

* chore/Add log statements to debug deltalink response

* chore/Remove redundant log statements

* chore/Refactor deltalinks and logger

- Refactor delta links to accept more than one page.
- Change azure logger from info to warning level to unclutter the django logs

* Revert commits 2ed8b75 to 46a5dcf

* Bugfix/163402/dashboarding system error (#150)

* problem_statements and portfolios are now lists containing only unique ids

* created a django management command to update the problematic solution logs (may and june 2023)

* fixed error in comment

* custom management command will now be run on deployment

* updated to fix problematic entries in all solution log rows

* Merge dev to tst (#152)

* Adding env.var applicationsightsConnectionSrting for BE

* Feature/163742/enable ootb monitoring capabilities (#135)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add opentelemetry to application settings

* chore/Change env from dev to tst

* chore/Rollback env from tst to dev

* Feature/157615/allow retrieval of all initiatives published and unpublished from api revision (#136)

* feat/Add published query parameter to the get_queryset

- if we do not provide an additional query parameter, then the default behavior will remain the same and the endpoint will return only the published ones.
- If we provide the additional query parameter published=0, then the endpoint will return only the unpublished ones.
- If we provide the additional query parameter published=1, then the endpoint will return both the unpublished and published ones.

* feat/Change published-unpublished to match new criteria

- Change get_queryset method to its original status, but removing the unpublished.
- Add logic to support published/unpublished parameters.

* chore/Refactor publised-unpublished cases in a more pythonic way

* Feature/163295/add swimlanes at phase board (#137)

* table with new story features

* code refactoring

* removed overflow-x from el-select-tags (#138)

* hide square logo and change menu height (#139)

* Feature/160826/group innovation portfolio solution details section (#140)

* solutions edit/create new Innovation Portfolios group, portfolios table key bug fix

* updated solution view with new Innovation portfolios card section

* Revert adding azure-monitor-opentelemetry==1.0.0b13 to resolve No module named azure.monitor issue

* updated empty value type (#141)

* Feature/160752/stages phases (#142)

* add new column - feature key phases_stages

* create a mapping between phases and stages

* updated styles to work on all browsers (#143)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add configure_azure_monitor to settings.py

* chore/Remove configure_azure_monitor and implement older approach to identify compatibility

* chore/Remove opentelemetry from settings.py

* chore/Code cleanup

* Feature/163742/enable ootb monitoring capabilities (#146)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add opentelemetry to application settings

* chore/Change env from dev to tst

* chore/Rollback env from tst to dev

* feat/Add internal_ips to fetch the pod internal ip

* chore/Rename azure folder to azure_services

* chore/Remove reduntant import from settings

* chore/Change configure_azure_monitor signature to include named argument

* feat/Change userprofile list to autocomplete field (#145)

- Add list with autocomplete search bar in the edit technology platform admin page.
- Add name as the search bar option.

* rename stage_name and phase_name to stage_label and phase_label (#147)

* feature/161336/initiatives-by-stage-board  added stage table and table switch (#148)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* Feature/refactor aad user fetch and update mechanism (#149)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* chore/Add migration file for deltalink

* chore/Add log statements to debug deltalink response

* chore/Remove redundant log statements

* chore/Refactor deltalinks and logger

- Refactor delta links to accept more than one page.
- Change azure logger from info to warning level to unclutter the django logs

* Revert commits 2ed8b75 to 46a5dcf

---------

Co-authored-by: Diogenis Petropoulos <diogenis,petropoulos@sword-group.com>
Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>
Co-authored-by: Alexa-Laf <131444412+Alexa-Laf@users.noreply.github.com>

* feat/Add delta to graph url

* chore/Remove redundant logging statements

* Rollback to pre-deltaLink mechanism

* chore/Remove redundant files

* Merge dev to tst (#154)

* Adding env.var applicationsightsConnectionSrting for BE

* Feature/163742/enable ootb monitoring capabilities (#135)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add opentelemetry to application settings

* chore/Change env from dev to tst

* chore/Rollback env from tst to dev

* Feature/157615/allow retrieval of all initiatives published and unpublished from api revision (#136)

* feat/Add published query parameter to the get_queryset

- if we do not provide an additional query parameter, then the default behavior will remain the same and the endpoint will return only the published ones.
- If we provide the additional query parameter published=0, then the endpoint will return only the unpublished ones.
- If we provide the additional query parameter published=1, then the endpoint will return both the unpublished and published ones.

* feat/Change published-unpublished to match new criteria

- Change get_queryset method to its original status, but removing the unpublished.
- Add logic to support published/unpublished parameters.

* chore/Refactor publised-unpublished cases in a more pythonic way

* Feature/163295/add swimlanes at phase board (#137)

* table with new story features

* code refactoring

* removed overflow-x from el-select-tags (#138)

* hide square logo and change menu height (#139)

* Feature/160826/group innovation portfolio solution details section (#140)

* solutions edit/create new Innovation Portfolios group, portfolios table key bug fix

* updated solution view with new Innovation portfolios card section

* Revert adding azure-monitor-opentelemetry==1.0.0b13 to resolve No module named azure.monitor issue

* updated empty value type (#141)

* Feature/160752/stages phases (#142)

* add new column - feature key phases_stages

* create a mapping between phases and stages

* updated styles to work on all browsers (#143)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add configure_azure_monitor to settings.py

* chore/Remove configure_azure_monitor and implement older approach to identify compatibility

* chore/Remove opentelemetry from settings.py

* chore/Code cleanup

* Feature/163742/enable ootb monitoring capabilities (#146)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add opentelemetry to application settings

* chore/Change env from dev to tst

* chore/Rollback env from tst to dev

* feat/Add internal_ips to fetch the pod internal ip

* chore/Rename azure folder to azure_services

* chore/Remove reduntant import from settings

* chore/Change configure_azure_monitor signature to include named argument

* feat/Change userprofile list to autocomplete field (#145)

- Add list with autocomplete search bar in the edit technology platform admin page.
- Add name as the search bar option.

* rename stage_name and phase_name to stage_label and phase_label (#147)

* feature/161336/initiatives-by-stage-board  added stage table and table switch (#148)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* Feature/refactor aad user fetch and update mechanism (#149)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* chore/Add migration file for deltalink

* chore/Add log statements to debug deltalink response

* chore/Remove redundant log statements

* chore/Refactor deltalinks and logger

- Refactor delta links to accept more than one page.
- Change azure logger from info to warning level to unclutter the django logs

* Revert commits 2ed8b75 to 46a5dcf

* Bugfix/163402/dashboarding system error (#150)

* problem_statements and portfolios are now lists containing only unique ids

* created a django management command to update the problematic solution logs (may and june 2023)

* fixed error in comment

* custom management command will now be run on deployment

* updated to fix problematic entries in all solution log rows

* feat/Add delta to graph url

* chore/Remove redundant logging statements

* Rollback to pre-deltaLink mechanism

* chore/Remove redundant files

---------

Co-authored-by: Diogenis Petropoulos <diogenis,petropoulos@sword-group.com>
Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>
Co-authored-by: Alexa-Laf <131444412+Alexa-Laf@users.noreply.github.com>
Co-authored-by: mgaliatsatou <122973661+mgaliatsatou@users.noreply.github.com>

* Performance optimization (#156)

* load users optimization

* performance improvements for inventory list page

* inventory load fix

* performance improvement by reordering api calls and asyncronicity

* removed sentry lib, removed unused unicef logo

* update node 12 to 14 in containers and fron 10 to 14 as compilation in babel

* lazy loading images

---------

Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>

* Merge dev to tst (#157)

* Revert adding azure-monitor-opentelemetry==1.0.0b13 to resolve No module named azure.monitor issue

* updated empty value type (#141)

* Feature/160752/stages phases (#142)

* add new column - feature key phases_stages

* create a mapping between phases and stages

* updated styles to work on all browsers (#143)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add configure_azure_monitor to settings.py

* chore/Remove configure_azure_monitor and implement older approach to identify compatibility

* chore/Remove opentelemetry from settings.py

* chore/Code cleanup

* Feature/163742/enable ootb monitoring capabilities (#146)

* feat/Add azure-monitor-opentelemetry to requirements

* feat/Add opentelemetry to application settings

* chore/Change env from dev to tst

* chore/Rollback env from tst to dev

* feat/Add internal_ips to fetch the pod internal ip

* chore/Rename azure folder to azure_services

* chore/Remove reduntant import from settings

* chore/Change configure_azure_monitor signature to include named argument

* feat/Change userprofile list to autocomplete field (#145)

- Add list with autocomplete search bar in the edit technology platform admin page.
- Add name as the search bar option.

* rename stage_name and phase_name to stage_label and phase_label (#147)

* feature/161336/initiatives-by-stage-board  added stage table and table switch (#148)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* Feature/refactor aad user fetch and update mechanism (#149)

* feat/Switch nextLink to deltaLink mechanism

* feat/Add get and save last delta link mechanism

* chore/Refactor delta link generation and store method

- Add new DeltaLink model to let Django handle the table creation/update mechanism.
- Change get_last_delta_link and save_delta_link to follow the same pattern.

* chore/Add migration file for deltalink

* chore/Add log statements to debug deltalink response

* chore/Remove redundant log statements

* chore/Refactor deltalinks and logger

- Refactor delta links to accept more than one page.
- Change azure logger from info to warning level to unclutter the django logs

* Revert commits 2ed8b75 to 46a5dcf

* Bugfix/163402/dashboarding system error (#150)

* problem_statements and portfolios are now lists containing only unique ids

* created a django management command to update the problematic solution logs (may and june 2023)

* fixed error in comment

* custom management command will now be run on deployment

* updated to fix problematic entries in all solution log rows

* feat/Add delta to graph url

* chore/Remove redundant logging statements

* Rollback to pre-deltaLink mechanism

* chore/Remove redundant files

* Performance optimization (#156)

* load users optimization

* performance improvements for inventory list page

* inventory load fix

* performance improvement by reordering api calls and asyncronicity

* removed sentry lib, removed unused unicef logo

* update node 12 to 14 in containers and fron 10 to 14 as compilation in babel

* lazy loading images

---------

Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>

---------

Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>
Co-authored-by: Alexa-Laf <131444412+Alexa-Laf@users.noreply.github.com>
Co-authored-by: mgaliatsatou <122973661+mgaliatsatou@users.noreply.github.com>

* add autocomplete field managers (#159) (#160)

* Merge dev to tst (#163)

* add autocomplete field managers (#159)

* chore/Remove DeltaLink model

---------

Co-authored-by: Alexa-Laf <131444412+Alexa-Laf@users.noreply.github.com>

---------

Co-authored-by: gkalomalos <georgios.kalomalos@sword-group.com>
Co-authored-by: ladeniva2 <122989825+ladeniva2@users.noreply.github.com>
Co-authored-by: gkalomalos <123368636+gkalomalos@users.noreply.github.com>
Co-authored-by: Diogenis Petropoulos <diogenis,petropoulos@sword-group.com>
Co-authored-by: mgaliatsatou <122973661+mgaliatsatou@users.noreply.github.com>
  • Loading branch information
6 people authored Jul 5, 2023
1 parent b22a887 commit dc62065
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 8 deletions.
24 changes: 16 additions & 8 deletions django/project/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
RegionFilter

# This has to stay here to use the proper celery instance with the djcelery_email package
import scheduler.celery # noqa
import scheduler.celery # noqa

from import_export.admin import ExportActionMixin
from import_export_celery.admin_actions import create_export_job_action
Expand Down Expand Up @@ -175,14 +175,16 @@ def has_add_permission(self, request, obj):


class ProjectAdmin(ExportActionMixin, AllObjectsAdmin):
create_export_job_action.short_description = _("Generate export in the background")
create_export_job_action.short_description = _(
"Generate export in the background")
actions = (create_export_job_action,)
list_display = ['__str__', 'modified', 'get_country', 'get_team', 'get_published', 'is_active', 'versions',
'featured', 'featured_rank']
list_filter = ('featured', IsPublishedFilter, UserFilter, OverViewFilter, DescriptionFilter,
RegionFilter, CountryFilter)

readonly_fields = ['name', 'team', 'viewers', 'link', 'created', 'modified', 'data', 'draft', 'versions_detailed']
readonly_fields = ['name', 'team', 'viewers', 'link',
'created', 'modified', 'data', 'draft', 'versions_detailed']
fields = ['is_active', 'featured', 'featured_rank'] + readonly_fields
search_fields = ['name']
resource_class = ProjectResource
Expand Down Expand Up @@ -219,7 +221,8 @@ def versions_detailed(obj):
prev_version = None
for version in ProjectVersion.objects.filter(project=obj):
if prev_version is None:
results_list.append(f'{version.version} - {version.created} - Initial version')
results_list.append(
f'{version.version} - {version.created} - Initial version')
else:
status_change = project_status_change(prev_version, version)
results_list.append(
Expand Down Expand Up @@ -253,7 +256,8 @@ class Meta:
model = Portfolio
fields = ['name', 'description', 'status', 'is_active',
'managers', 'icon', 'innovation_hub', 'landscape_review', 'investment_to_date']
labels = {'investment_to_date': 'Cumulative investment.', 'landscape_review': 'Completed landscape review'}
labels = {'investment_to_date': 'Cumulative investment.',
'landscape_review': 'Completed landscape review'}
widgets = {'innovation_hub': forms.CheckboxInput,
'icon': forms.Select(choices=[(1, 'education'),
(2, 'nutrition'),
Expand Down Expand Up @@ -295,6 +299,7 @@ class PortfolioAdmin(ExportActionMixin, AllObjectsAdmin):
'created', 'icon', 'managers_list', 'is_active', 'innovation_hub', 'investment_to_date']
inlines = [ProblemStatementsInline]
form = PortfolioForm
autocomplete_fields = ['managers']
filter_horizontal = ['managers']

def managers_list(self, obj):
Expand Down Expand Up @@ -330,7 +335,8 @@ class CapabilitySubCategoryInline(ViewOnlyInlineMixin, admin.TabularInline):

class UNICEFGoalAdmin(admin.ModelAdmin):
ordering = search_fields = ['name']
inlines = [ResultAreaInline, CapabilityLevelInline, CapabilityCategoryInline, CapabilitySubCategoryInline]
inlines = [ResultAreaInline, CapabilityLevelInline,
CapabilityCategoryInline, CapabilitySubCategoryInline]


class UNICEFResultAreaAdmin(admin.ModelAdmin):
Expand Down Expand Up @@ -397,7 +403,8 @@ class SolutionAdmin(ExportActionMixin, admin.ModelAdmin):
ordering = search_fields = ['name']
list_display = ['__str__', 'portfolio_list', 'phase', 'open_source_frontier_tech',
'learning_investment', 'people_reached', 'list_of_countries']
list_filter = ['portfolios', 'open_source_frontier_tech', 'learning_investment']
list_filter = ['portfolios',
'open_source_frontier_tech', 'learning_investment']
filter_horizontal = ['portfolios', 'problem_statements']
readonly_fields = ['people_reached', 'regions_display']
inlines = (CountrySolutionInline,)
Expand Down Expand Up @@ -431,7 +438,8 @@ class UserProfileAdmin(admin.ModelAdmin):
admin.site.register(UNICEFResultArea, UNICEFResultAreaAdmin)
admin.site.register(UNICEFCapabilityLevel, UNICEFCapabilityLevelAdmin)
admin.site.register(UNICEFCapabilityCategory, UNICEFCapabilityCategoryAdmin)
admin.site.register(UNICEFCapabilitySubCategory, UNICEFCapabilitySubCategoryAdmin)
admin.site.register(UNICEFCapabilitySubCategory,
UNICEFCapabilitySubCategoryAdmin)
admin.site.register(UNICEFSector, UNICEFSectorAdmin)
admin.site.register(RegionalPriority, RegionalPriorityAdmin)
admin.site.register(HardwarePlatform, HardwarePlatformAdmin)
Expand Down
16 changes: 16 additions & 0 deletions django/project/migrations/0105_delete_deltalink.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Generated by Django 2.1 on 2023-07-03 15:25

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('project', '0104_deltalink'),
]

operations = [
migrations.DeleteModel(
name='DeltaLink',
),
]

0 comments on commit dc62065

Please sign in to comment.