From 8a3f63b9a3b2eeb5682bfe6a13449d724c49bbc1 Mon Sep 17 00:00:00 2001 From: matteotolloso Date: Thu, 9 Nov 2023 23:05:51 +0100 Subject: [PATCH 1/3] requirements --- requirements.txt | 6 ++++++ page_render.py => smartreport_app/page_render.py | 0 2 files changed, 6 insertions(+) rename page_render.py => smartreport_app/page_render.py (100%) diff --git a/requirements.txt b/requirements.txt index d537e2d..685f815 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,9 @@ filelock==3.13.1 greenlet==3.0.0 idna==3.4 iniconfig==2.0.0 +numpy==1.26.1 packaging==23.2 +pandas==2.1.2 Pillow==10.1.0 pipenv==2023.10.24 platformdirs==3.11.0 @@ -22,12 +24,16 @@ pyee==11.0.1 pytest==7.4.3 pytest-base-url==2.0.0 pytest-playwright==0.4.3 +python-dateutil==2.8.2 python-slugify==8.0.1 pytz==2023.3.post1 requests==2.31.0 +scipy==1.11.3 +six==1.16.0 sqlparse==0.4.4 text-unidecode==1.3 tomli==2.0.1 typing_extensions==4.8.0 +tzdata==2023.3 urllib3==2.0.7 virtualenv==20.24.6 diff --git a/page_render.py b/smartreport_app/page_render.py similarity index 100% rename from page_render.py rename to smartreport_app/page_render.py From 49f423b8cc739e0b717d1275dc7917511e2cb6ec Mon Sep 17 00:00:00 2001 From: matteotolloso Date: Fri, 10 Nov 2023 12:56:24 +0100 Subject: [PATCH 2/3] bugfix --- smartreport_app/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smartreport_app/models.py b/smartreport_app/models.py index 8250f61..044dbe1 100644 --- a/smartreport_app/models.py +++ b/smartreport_app/models.py @@ -117,7 +117,7 @@ class DashboardLayout(models.Model): choices=UserType.choices, ) - layout = models.CharField(max_length=2048) + layout = models.JSONField() def __str__(self): return self.name From 3048213f592758af539222cb403e92b382866bbb Mon Sep 17 00:00:00 2001 From: matteotolloso Date: Sat, 11 Nov 2023 16:39:36 +0100 Subject: [PATCH 3/3] fixed type of chart --- smartreport_app/kb_interface.py | 2 -- smartreport_app/models.py | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/smartreport_app/kb_interface.py b/smartreport_app/kb_interface.py index a6b3479..3e1e91f 100644 --- a/smartreport_app/kb_interface.py +++ b/smartreport_app/kb_interface.py @@ -7,7 +7,6 @@ def kb_interface(kpi_name, params): if plot_type == 'line': response = { 'labels': ['January', 'February', 'March', 'April', 'May', 'June', 'July'], - 'data' : { 'datasets': [{ 'label': 'massa di filippo', 'data': [65, 59, 50, 40, 30, 20, 10], @@ -15,7 +14,6 @@ def kb_interface(kpi_name, params): 'borderColor': 'rgb(75, 192, 192)', 'tension': 0.1 }] - } } return response diff --git a/smartreport_app/models.py b/smartreport_app/models.py index e13896e..8aa01ac 100644 --- a/smartreport_app/models.py +++ b/smartreport_app/models.py @@ -15,7 +15,8 @@ class UserType(models.TextChoices): "line", "bar", "pie", - "scatter", + "doughnut", + "radar", )