From db36f11633f01d44efbbae6c179af52cc53bb076 Mon Sep 17 00:00:00 2001 From: Jordi Albert <63541019+jarg1023@users.noreply.github.com> Date: Mon, 5 Sep 2022 15:54:28 +0200 Subject: [PATCH] #13 | Add relation to ToDo Doctype in dashboards information and create needed dashboards --- msp/msp/doctype/ip_address/ip_address_dashboard.py | 14 ++++++++++++++ msp/msp/doctype/ip_network/ip_network_dashboard.py | 4 ++++ .../doctype/it_landscape/it_landscape_dashboard.py | 2 +- msp/msp/doctype/it_object/it_object_dashboard.py | 14 ++++++++++++++ .../it_user_account/it_user_account_dashboard.py | 14 ++++++++++++++ 5 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 msp/msp/doctype/ip_address/ip_address_dashboard.py create mode 100644 msp/msp/doctype/it_object/it_object_dashboard.py create mode 100644 msp/msp/doctype/it_user_account/it_user_account_dashboard.py diff --git a/msp/msp/doctype/ip_address/ip_address_dashboard.py b/msp/msp/doctype/ip_address/ip_address_dashboard.py new file mode 100644 index 0000000..e2d4eb9 --- /dev/null +++ b/msp/msp/doctype/ip_address/ip_address_dashboard.py @@ -0,0 +1,14 @@ +from __future__ import unicode_literals +from frappe import _ + +def get_data(): + return { + 'heatmap': False, + 'fieldname': 'ip_address', + 'transactions': [ + { + 'label': _('Processes'), + 'items': ['ToDo'] + } + ] + } diff --git a/msp/msp/doctype/ip_network/ip_network_dashboard.py b/msp/msp/doctype/ip_network/ip_network_dashboard.py index 9ccf345..71feceb 100644 --- a/msp/msp/doctype/ip_network/ip_network_dashboard.py +++ b/msp/msp/doctype/ip_network/ip_network_dashboard.py @@ -9,6 +9,10 @@ def get_data(): { 'label': _('Objects'), 'items': ['IP Address' ] + }, + { + 'label': _('Processes'), + 'items': ['ToDo' ] } ] } diff --git a/msp/msp/doctype/it_landscape/it_landscape_dashboard.py b/msp/msp/doctype/it_landscape/it_landscape_dashboard.py index 3b57d2f..7f66ea2 100644 --- a/msp/msp/doctype/it_landscape/it_landscape_dashboard.py +++ b/msp/msp/doctype/it_landscape/it_landscape_dashboard.py @@ -13,7 +13,7 @@ def get_data(): }, { 'label': _('Processes'), - 'items': ['IT Contract'] + 'items': ['IT Contract', 'ToDo'] } ] } diff --git a/msp/msp/doctype/it_object/it_object_dashboard.py b/msp/msp/doctype/it_object/it_object_dashboard.py new file mode 100644 index 0000000..1721e13 --- /dev/null +++ b/msp/msp/doctype/it_object/it_object_dashboard.py @@ -0,0 +1,14 @@ +from __future__ import unicode_literals +from frappe import _ + +def get_data(): + return { + 'heatmap': False, + 'fieldname': 'it_object', + 'transactions': [ + { + 'label': _('Processes'), + 'items': ['ToDo'] + } + ] + } diff --git a/msp/msp/doctype/it_user_account/it_user_account_dashboard.py b/msp/msp/doctype/it_user_account/it_user_account_dashboard.py new file mode 100644 index 0000000..421ec63 --- /dev/null +++ b/msp/msp/doctype/it_user_account/it_user_account_dashboard.py @@ -0,0 +1,14 @@ +from __future__ import unicode_literals +from frappe import _ + +def get_data(): + return { + 'heatmap': False, + 'fieldname': 'it_user_account', + 'transactions': [ + { + 'label': _('Processes'), + 'items': ['ToDo'] + } + ] + }