commit 4f7b75dbe54fa575bd5a61919e474ce558e1c663 Author: David Malinowski Date: Wed Mar 24 01:36:20 2021 +0100 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4ee4d4b --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +.DS_Store +*.pyc +*.egg-info +*.swp +tags +msp/docs/current \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..ec8ea37 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,18 @@ +include MANIFEST.in +include requirements.txt +include *.json +include *.md +include *.py +include *.txt +recursive-include msp *.css +recursive-include msp *.csv +recursive-include msp *.html +recursive-include msp *.ico +recursive-include msp *.js +recursive-include msp *.json +recursive-include msp *.md +recursive-include msp *.png +recursive-include msp *.py +recursive-include msp *.svg +recursive-include msp *.txt +recursive-exclude msp *.pyc \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..f1cc76e --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +## MSP + +App for Managed Service Providers + +#### License + +GPLv3# msp diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..d964aaa --- /dev/null +++ b/license.txt @@ -0,0 +1 @@ +License: GPLv3 \ No newline at end of file diff --git a/msp/__init__.py b/msp/__init__.py new file mode 100644 index 0000000..95d1338 --- /dev/null +++ b/msp/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +__version__ = '0.0.1' + diff --git a/msp/config/__init__.py b/msp/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/config/desktop.py b/msp/config/desktop.py new file mode 100644 index 0000000..692d436 --- /dev/null +++ b/msp/config/desktop.py @@ -0,0 +1,14 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals +from frappe import _ + +def get_data(): + return [ + { + "module_name": "MSP", + "color": "grey", + "icon": "octicon octicon-rocket", + "type": "module", + "label": _("MSP") + } + ] diff --git a/msp/config/docs.py b/msp/config/docs.py new file mode 100644 index 0000000..183432e --- /dev/null +++ b/msp/config/docs.py @@ -0,0 +1,11 @@ +""" +Configuration for docs +""" + +# source_link = "https://github.com/[org_name]/msp" +# docs_base_url = "https://[org_name].github.io/msp" +# headline = "App that does everything" +# sub_heading = "Yes, you got that right the first time, everything" + +def get_context(context): + context.brand_html = "MSP" diff --git a/msp/config/msp.py b/msp/config/msp.py new file mode 100644 index 0000000..5ae3e11 --- /dev/null +++ b/msp/config/msp.py @@ -0,0 +1,95 @@ +from __future__ import unicode_literals +from frappe import _ + + + +def get_data(): + return [ + { + "label": _("Objects"), + "items": [ + { + "type": "doctype", + "name": "IT Object", + "label": _("IT Object"), + "description": _("IT Object") + }, + { + "type": "doctype", + "name": "IP Network", + "label": _("IP Network"), + "description": _("IP Network") + }, + { + "type": "doctype", + "name": "IP Address", + "label": _("IP Address"), + "description": _("IP Address") + }, + { + "type": "doctype", + "name": "IT User Account", + "label": _("IT User Account"), + "description": _("IT User Account") + }, + { + "type": "doctype", + "name": "IT Backup", + "label": _("IT Backup"), + "description": _("IT Backup") + } + ] + }, + { + "label": _("Master Data"), + "items": [ + { + "type": "doctype", + "name": "IT Landscape", + "label": _("IT Landscape"), + "description": _("IT Landscape") + }, + { + "type": "doctype", + "name": "IT Object Type", + "label": _("IT Object Type"), + "description": _("IT Object Type") + }, + { + "type": "doctype", + "name": "IT Contract", + "label": _("IT Contract"), + "description": _("IT Contract") + }, + { + "type": "doctype", + "name": "IT Contract Type", + "label": _("IT Contract Type"), + "description": _("IT Contract Type") + }, + { + "type": "doctype", + "name": "IT User Account Type", + "label": _("IT User Account Type"), + "description": _("IT User Account Type") + }, + ] + }, + { + "label": _("Process Management"), + "items": [ + { + "type": "doctype", + "name": "IT Checklist", + "label": _("IT Checklist"), + "description": _("IT Checklist") + }, + { + "type": "doctype", + "name": "IT Checklist Template", + "label": _("IT Checklist Template"), + "description": _("IT Checklist Template") + } + ] + } + ] \ No newline at end of file diff --git a/msp/hooks.py b/msp/hooks.py new file mode 100644 index 0000000..c5f86e4 --- /dev/null +++ b/msp/hooks.py @@ -0,0 +1,129 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals +from . import __version__ as app_version + +app_name = "msp" +app_title = "MSP" +app_publisher = "itsdave GmbH" +app_description = "App for Managed Service Providers" +app_icon = "octicon octicon-rocket" +app_color = "grey" +app_email = "dev@itsdave.de" +app_license = "GPLv3" + +# Includes in +# ------------------ + +# include js, css files in header of desk.html +# app_include_css = "/assets/msp/css/msp.css" +# app_include_js = "/assets/msp/js/msp.js" + +# include js, css files in header of web template +# web_include_css = "/assets/msp/css/msp.css" +# web_include_js = "/assets/msp/js/msp.js" + +# include js in page +# page_js = {"page" : "public/js/file.js"} + +# include js in doctype views +# doctype_js = {"doctype" : "public/js/doctype.js"} +# doctype_list_js = {"doctype" : "public/js/doctype_list.js"} +# doctype_tree_js = {"doctype" : "public/js/doctype_tree.js"} +# doctype_calendar_js = {"doctype" : "public/js/doctype_calendar.js"} + +# Home Pages +# ---------- + +# application home page (will override Website Settings) +# home_page = "login" + +# website user home page (by Role) +# role_home_page = { +# "Role": "home_page" +# } + +# Website user home page (by function) +# get_website_user_home_page = "msp.utils.get_home_page" + +# Generators +# ---------- + +# automatically create page for each record of this doctype +# website_generators = ["Web Page"] + +# Installation +# ------------ + +# before_install = "msp.install.before_install" +# after_install = "msp.install.after_install" + +# Desk Notifications +# ------------------ +# See frappe.core.notifications.get_notification_config + +# notification_config = "msp.notifications.get_notification_config" + +# Permissions +# ----------- +# Permissions evaluated in scripted ways + +# permission_query_conditions = { +# "Event": "frappe.desk.doctype.event.event.get_permission_query_conditions", +# } +# +# has_permission = { +# "Event": "frappe.desk.doctype.event.event.has_permission", +# } + +# Document Events +# --------------- +# Hook on document methods and events + +# doc_events = { +# "*": { +# "on_update": "method", +# "on_cancel": "method", +# "on_trash": "method" +# } +# } + +# Scheduled Tasks +# --------------- + +# scheduler_events = { +# "all": [ +# "msp.tasks.all" +# ], +# "daily": [ +# "msp.tasks.daily" +# ], +# "hourly": [ +# "msp.tasks.hourly" +# ], +# "weekly": [ +# "msp.tasks.weekly" +# ] +# "monthly": [ +# "msp.tasks.monthly" +# ] +# } + +# Testing +# ------- + +# before_tests = "msp.install.before_tests" + +# Overriding Methods +# ------------------------------ +# +# override_whitelisted_methods = { +# "frappe.desk.doctype.event.event.get_events": "msp.event.get_events" +# } +# +# each overriding function accepts a `data` argument; +# generated from the base implementation of the doctype dashboard, +# along with any modifications made in other Frappe apps +# override_doctype_dashboards = { +# "Task": "msp.task.get_dashboard_data" +# } + diff --git a/msp/modules.txt b/msp/modules.txt new file mode 100644 index 0000000..b0cb5ff --- /dev/null +++ b/msp/modules.txt @@ -0,0 +1 @@ +MSP \ No newline at end of file diff --git a/msp/msp/__init__.py b/msp/msp/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/msp/doctype/__init__.py b/msp/msp/doctype/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/msp/doctype/ip_address/__init__.py b/msp/msp/doctype/ip_address/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/msp/doctype/ip_address/ip_address.js b/msp/msp/doctype/ip_address/ip_address.js new file mode 100644 index 0000000..2f22a9c --- /dev/null +++ b/msp/msp/doctype/ip_address/ip_address.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, itsdave GmbH and contributors +// For license information, please see license.txt + +frappe.ui.form.on('IP Address', { + // refresh: function(frm) { + + // } +}); diff --git a/msp/msp/doctype/ip_address/ip_address.json b/msp/msp/doctype/ip_address/ip_address.json new file mode 100644 index 0000000..551b4c5 --- /dev/null +++ b/msp/msp/doctype/ip_address/ip_address.json @@ -0,0 +1,80 @@ +{ + "allow_rename": 1, + "autoname": "format:IP-{ip_address}-{it_landscape}", + "creation": "2021-03-18 03:15:11.235106", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "title", + "ip_address", + "protocol", + "it_object", + "ip_network", + "it_landscape" + ], + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "label": "Title" + }, + { + "fieldname": "ip_address", + "fieldtype": "Data", + "in_list_view": 1, + "label": "IP Address", + "reqd": 1 + }, + { + "fieldname": "protocol", + "fieldtype": "Select", + "label": "Protocol", + "options": "IPv4\nIPv6" + }, + { + "fieldname": "it_object", + "fieldtype": "Link", + "label": "IT Object", + "options": "IT Object" + }, + { + "fieldname": "it_landscape", + "fieldtype": "Link", + "label": "IT Landscape", + "options": "IT Landscape", + "reqd": 1 + }, + { + "fieldname": "ip_network", + "fieldtype": "Link", + "label": "IP Network", + "options": "IP Network", + "reqd": 1 + } + ], + "modified": "2021-03-24 00:15:34.341218", + "modified_by": "Administrator", + "module": "MSP", + "name": "IP Address", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1, + "track_views": 1 +} \ No newline at end of file diff --git a/msp/msp/doctype/ip_address/ip_address.py b/msp/msp/doctype/ip_address/ip_address.py new file mode 100644 index 0000000..4581163 --- /dev/null +++ b/msp/msp/doctype/ip_address/ip_address.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class IPAddress(Document): + pass diff --git a/msp/msp/doctype/ip_address/test_ip_address.py b/msp/msp/doctype/ip_address/test_ip_address.py new file mode 100644 index 0000000..377361b --- /dev/null +++ b/msp/msp/doctype/ip_address/test_ip_address.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestIPAddress(unittest.TestCase): + pass diff --git a/msp/msp/doctype/ip_network/__init__.py b/msp/msp/doctype/ip_network/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/msp/doctype/ip_network/ip_network.js b/msp/msp/doctype/ip_network/ip_network.js new file mode 100644 index 0000000..cfa8bd8 --- /dev/null +++ b/msp/msp/doctype/ip_network/ip_network.js @@ -0,0 +1,18 @@ +// Copyright (c) 2021, itsdave GmbH and contributors +// For license information, please see license.txt + +frappe.ui.form.on('IP Network', { + + refresh(frm) { + frm.add_custom_button('Calculate Network Data', function(){ + frappe.call({ + method: 'msp.msp.doctype.ip_network.ip_network.calculate_network_data', + args: { doc: frm.doc.name }, + callback:function(r){ + console.log(r.message) + frm.reload_doc() + } + }) + }) + } +}); diff --git a/msp/msp/doctype/ip_network/ip_network.json b/msp/msp/doctype/ip_network/ip_network.json new file mode 100644 index 0000000..64154d6 --- /dev/null +++ b/msp/msp/doctype/ip_network/ip_network.json @@ -0,0 +1,174 @@ +{ + "allow_rename": 1, + "autoname": "format:NET-{network_address}/{cidr_mask}-{it_landscape}", + "creation": "2021-03-18 03:13:40.772882", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "network_address", + "subnet_mask", + "host_min", + "host_max", + "broadcast", + "number_of_hosts", + "column_break_4", + "cidr_mask", + "configuration_section", + "default_gateway", + "primary_dns", + "secondary_dns", + "column_break_13", + "vlan", + "dhcp_server", + "1_to_1_nat_network_address", + "aditional_data_section", + "it_landscape", + "description", + "customer", + "location" + ], + "fields": [ + { + "fieldname": "description", + "fieldtype": "Text Editor", + "label": "Description" + }, + { + "fieldname": "network_address", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Network Address", + "reqd": 1 + }, + { + "fieldname": "cidr_mask", + "fieldtype": "Select", + "in_list_view": 1, + "label": "CIDR Mask", + "options": "24\n25\n26\n27\n28\n29\n30\n31\n32", + "reqd": 1 + }, + { + "fieldname": "subnet_mask", + "fieldtype": "Data", + "label": "Subnet Mask" + }, + { + "fieldname": "broadcast", + "fieldtype": "Data", + "label": "Broadcast", + "read_only": 1 + }, + { + "fieldname": "host_min", + "fieldtype": "Data", + "label": "Host min", + "read_only": 1 + }, + { + "fieldname": "host_max", + "fieldtype": "Data", + "label": "Host max", + "read_only": 1 + }, + { + "fieldname": "number_of_hosts", + "fieldtype": "Data", + "label": "number of Hosts", + "read_only": 1 + }, + { + "fieldname": "vlan", + "fieldtype": "Data", + "label": "VLAN" + }, + { + "fieldname": "default_gateway", + "fieldtype": "Data", + "label": "Default Gateway" + }, + { + "fieldname": "primary_dns", + "fieldtype": "Data", + "label": "Primary DNS" + }, + { + "fieldname": "secondary_dns", + "fieldtype": "Data", + "label": "Secondary DNS" + }, + { + "fieldname": "dhcp_server", + "fieldtype": "Data", + "label": "DHCP Server" + }, + { + "fieldname": "1_to_1_nat_network_address", + "fieldtype": "Data", + "label": "1 to 1 NAT Network Address" + }, + { + "fieldname": "customer", + "fieldtype": "Link", + "label": "Customer", + "options": "Customer" + }, + { + "fieldname": "it_landscape", + "fieldtype": "Link", + "in_list_view": 1, + "label": "IT Landscape", + "options": "IT Landscape", + "reqd": 1 + }, + { + "fieldname": "location", + "fieldtype": "Link", + "label": "Location", + "options": "Location" + }, + { + "fieldname": "column_break_4", + "fieldtype": "Column Break" + }, + { + "fieldname": "configuration_section", + "fieldtype": "Section Break", + "label": "Configuration" + }, + { + "fieldname": "column_break_13", + "fieldtype": "Column Break" + }, + { + "fieldname": "aditional_data_section", + "fieldtype": "Section Break", + "label": "Aditional Data" + } + ], + "modified": "2021-03-24 00:12:13.023565", + "modified_by": "Administrator", + "module": "MSP", + "name": "IP Network", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1, + "track_views": 1 +} \ No newline at end of file diff --git a/msp/msp/doctype/ip_network/ip_network.py b/msp/msp/doctype/ip_network/ip_network.py new file mode 100644 index 0000000..dcf44fa --- /dev/null +++ b/msp/msp/doctype/ip_network/ip_network.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from ipaddress import IPv4Address, IPv4Network +from frappe.model.document import Document + +class IPNetwork(Document): + pass + +@frappe.whitelist() +def calculate_network_data(doc): + net_doc = frappe.get_doc("IP Network", doc) + network = IPv4Network(net_doc.network_address + "/" + net_doc.cidr_mask) + net_doc.host_min = str(min(list(network.hosts()))) + net_doc.host_max = str(max(list(network.hosts()))) + net_doc.number_of_hosts = len(list(network.hosts())) + net_doc.subnet_mask = str(network.netmask) + net_doc.broadcast = str(network.broadcast_address) + net_doc.save() + return "please refresh" + diff --git a/msp/msp/doctype/ip_network/ip_network_dashboard.py b/msp/msp/doctype/ip_network/ip_network_dashboard.py new file mode 100644 index 0000000..9ccf345 --- /dev/null +++ b/msp/msp/doctype/ip_network/ip_network_dashboard.py @@ -0,0 +1,14 @@ +from __future__ import unicode_literals +from frappe import _ + +def get_data(): + return { + 'heatmap': False, + 'fieldname': 'ip_network', + 'transactions': [ + { + 'label': _('Objects'), + 'items': ['IP Address' ] + } + ] + } diff --git a/msp/msp/doctype/ip_network/test_ip_network.py b/msp/msp/doctype/ip_network/test_ip_network.py new file mode 100644 index 0000000..287628f --- /dev/null +++ b/msp/msp/doctype/ip_network/test_ip_network.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestIPNetwork(unittest.TestCase): + pass diff --git a/msp/msp/doctype/it_checklist/__init__.py b/msp/msp/doctype/it_checklist/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/msp/doctype/it_checklist/it_checklist.js b/msp/msp/doctype/it_checklist/it_checklist.js new file mode 100644 index 0000000..4e435f1 --- /dev/null +++ b/msp/msp/doctype/it_checklist/it_checklist.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, itsdave GmbH and contributors +// For license information, please see license.txt + +frappe.ui.form.on('IT Checklist', { + // refresh: function(frm) { + + // } +}); diff --git a/msp/msp/doctype/it_checklist/it_checklist.json b/msp/msp/doctype/it_checklist/it_checklist.json new file mode 100644 index 0000000..f157fcf --- /dev/null +++ b/msp/msp/doctype/it_checklist/it_checklist.json @@ -0,0 +1,60 @@ +{ + "autoname": "ITCL-.#####", + "creation": "2021-03-18 02:30:47.686842", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "title", + "customer", + "it_landscape", + "completed_on" + ], + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "label": "Title" + }, + { + "fieldname": "customer", + "fieldtype": "Link", + "label": "Customer", + "options": "Customer" + }, + { + "fieldname": "it_landscape", + "fieldtype": "Link", + "label": "IT Landscape", + "options": "IT Landscape" + }, + { + "fieldname": "completed_on", + "fieldtype": "Datetime", + "label": "Completed on" + } + ], + "modified": "2021-03-18 02:30:47.686842", + "modified_by": "Administrator", + "module": "MSP", + "name": "IT Checklist", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/msp/msp/doctype/it_checklist/it_checklist.py b/msp/msp/doctype/it_checklist/it_checklist.py new file mode 100644 index 0000000..1cf76ef --- /dev/null +++ b/msp/msp/doctype/it_checklist/it_checklist.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class ITChecklist(Document): + pass diff --git a/msp/msp/doctype/it_checklist/test_it_checklist.py b/msp/msp/doctype/it_checklist/test_it_checklist.py new file mode 100644 index 0000000..d1eb7a8 --- /dev/null +++ b/msp/msp/doctype/it_checklist/test_it_checklist.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestITChecklist(unittest.TestCase): + pass diff --git a/msp/msp/doctype/it_checklist_template/__init__.py b/msp/msp/doctype/it_checklist_template/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/msp/doctype/it_checklist_template/it_checklist_template.js b/msp/msp/doctype/it_checklist_template/it_checklist_template.js new file mode 100644 index 0000000..41d8155 --- /dev/null +++ b/msp/msp/doctype/it_checklist_template/it_checklist_template.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, itsdave GmbH and contributors +// For license information, please see license.txt + +frappe.ui.form.on('IT Checklist Template', { + // refresh: function(frm) { + + // } +}); diff --git a/msp/msp/doctype/it_checklist_template/it_checklist_template.json b/msp/msp/doctype/it_checklist_template/it_checklist_template.json new file mode 100644 index 0000000..ff88258 --- /dev/null +++ b/msp/msp/doctype/it_checklist_template/it_checklist_template.json @@ -0,0 +1,40 @@ +{ + "autoname": "ITCLT-.###", + "creation": "2021-03-18 02:27:40.328506", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "title" + ], + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "label": "Title" + } + ], + "modified": "2021-03-18 02:27:40.328506", + "modified_by": "Administrator", + "module": "MSP", + "name": "IT Checklist Template", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "title_field": "title", + "track_changes": 1 +} \ No newline at end of file diff --git a/msp/msp/doctype/it_checklist_template/it_checklist_template.py b/msp/msp/doctype/it_checklist_template/it_checklist_template.py new file mode 100644 index 0000000..8c65e6f --- /dev/null +++ b/msp/msp/doctype/it_checklist_template/it_checklist_template.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class ITChecklistTemplate(Document): + pass diff --git a/msp/msp/doctype/it_checklist_template/test_it_checklist_template.py b/msp/msp/doctype/it_checklist_template/test_it_checklist_template.py new file mode 100644 index 0000000..41c2c4b --- /dev/null +++ b/msp/msp/doctype/it_checklist_template/test_it_checklist_template.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestITChecklistTemplate(unittest.TestCase): + pass diff --git a/msp/msp/doctype/it_contract/__init__.py b/msp/msp/doctype/it_contract/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/msp/doctype/it_contract/it_contract.js b/msp/msp/doctype/it_contract/it_contract.js new file mode 100644 index 0000000..1ba4c83 --- /dev/null +++ b/msp/msp/doctype/it_contract/it_contract.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, itsdave GmbH and contributors +// For license information, please see license.txt + +frappe.ui.form.on('IT Contract', { + // refresh: function(frm) { + + // } +}); diff --git a/msp/msp/doctype/it_contract/it_contract.json b/msp/msp/doctype/it_contract/it_contract.json new file mode 100644 index 0000000..49080ec --- /dev/null +++ b/msp/msp/doctype/it_contract/it_contract.json @@ -0,0 +1,62 @@ +{ + "autoname": "ITCON-.#####", + "creation": "2021-03-18 02:54:42.727620", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "title", + "customer", + "it_landscape", + "it_contract_type" + ], + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "label": "Title" + }, + { + "fieldname": "customer", + "fieldtype": "Link", + "label": "Customer", + "options": "Customer" + }, + { + "fieldname": "it_landscape", + "fieldtype": "Link", + "label": "IT Landscape", + "options": "IT Landscape" + }, + { + "fieldname": "it_contract_type", + "fieldtype": "Link", + "label": "IT Contract Type", + "options": "IT Contract Type" + } + ], + "modified": "2021-03-23 21:04:54.623670", + "modified_by": "Administrator", + "module": "MSP", + "name": "IT Contract", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "title_field": "title", + "track_changes": 1 +} \ No newline at end of file diff --git a/msp/msp/doctype/it_contract/it_contract.py b/msp/msp/doctype/it_contract/it_contract.py new file mode 100644 index 0000000..feb9a1f --- /dev/null +++ b/msp/msp/doctype/it_contract/it_contract.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class ITContract(Document): + pass diff --git a/msp/msp/doctype/it_contract/test_it_contract.py b/msp/msp/doctype/it_contract/test_it_contract.py new file mode 100644 index 0000000..2b43185 --- /dev/null +++ b/msp/msp/doctype/it_contract/test_it_contract.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestITContract(unittest.TestCase): + pass diff --git a/msp/msp/doctype/it_contract_type/__init__.py b/msp/msp/doctype/it_contract_type/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/msp/doctype/it_contract_type/it_contract_type.js b/msp/msp/doctype/it_contract_type/it_contract_type.js new file mode 100644 index 0000000..d41ede8 --- /dev/null +++ b/msp/msp/doctype/it_contract_type/it_contract_type.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, itsdave GmbH and contributors +// For license information, please see license.txt + +frappe.ui.form.on('IT Contract Type', { + // refresh: function(frm) { + + // } +}); diff --git a/msp/msp/doctype/it_contract_type/it_contract_type.json b/msp/msp/doctype/it_contract_type/it_contract_type.json new file mode 100644 index 0000000..491a741 --- /dev/null +++ b/msp/msp/doctype/it_contract_type/it_contract_type.json @@ -0,0 +1,40 @@ +{ + "autoname": "field:title", + "creation": "2021-03-23 21:03:02.275205", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "title" + ], + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "label": "Title", + "unique": 1 + } + ], + "modified": "2021-03-23 21:03:02.275205", + "modified_by": "Administrator", + "module": "MSP", + "name": "IT Contract Type", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/msp/msp/doctype/it_contract_type/it_contract_type.py b/msp/msp/doctype/it_contract_type/it_contract_type.py new file mode 100644 index 0000000..55294b6 --- /dev/null +++ b/msp/msp/doctype/it_contract_type/it_contract_type.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class ITContractType(Document): + pass diff --git a/msp/msp/doctype/it_contract_type/test_it_contract_type.py b/msp/msp/doctype/it_contract_type/test_it_contract_type.py new file mode 100644 index 0000000..9611327 --- /dev/null +++ b/msp/msp/doctype/it_contract_type/test_it_contract_type.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestITContractType(unittest.TestCase): + pass diff --git a/msp/msp/doctype/it_landscape/__init__.py b/msp/msp/doctype/it_landscape/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/msp/doctype/it_landscape/it_landscape.js b/msp/msp/doctype/it_landscape/it_landscape.js new file mode 100644 index 0000000..6cd7c52 --- /dev/null +++ b/msp/msp/doctype/it_landscape/it_landscape.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, itsdave GmbH and contributors +// For license information, please see license.txt + +frappe.ui.form.on('IT Landscape', { + // refresh: function(frm) { + + // } +}); diff --git a/msp/msp/doctype/it_landscape/it_landscape.json b/msp/msp/doctype/it_landscape/it_landscape.json new file mode 100644 index 0000000..5d5bde8 --- /dev/null +++ b/msp/msp/doctype/it_landscape/it_landscape.json @@ -0,0 +1,68 @@ +{ + "allow_rename": 1, + "autoname": "field:abbreviation", + "creation": "2021-03-18 01:39:06.814363", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "title", + "abbreviation", + "customer", + "description" + ], + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Title" + }, + { + "fieldname": "customer", + "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Customer", + "options": "Customer" + }, + { + "fieldname": "description", + "fieldtype": "Text Editor", + "label": "Description" + }, + { + "fieldname": "abbreviation", + "fieldtype": "Data", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Abbreviation", + "unique": 1 + } + ], + "modified": "2021-03-24 00:34:10.605746", + "modified_by": "Administrator", + "module": "MSP", + "name": "IT Landscape", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1, + "track_views": 1 +} \ No newline at end of file diff --git a/msp/msp/doctype/it_landscape/it_landscape.py b/msp/msp/doctype/it_landscape/it_landscape.py new file mode 100644 index 0000000..d12ae2f --- /dev/null +++ b/msp/msp/doctype/it_landscape/it_landscape.py @@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from frappe.model.document import Document + +class ITLandscape(Document): + pass + +def get_timeline_data(doctype, name): + """views for linked objects""" + return dict(frappe.db.sql("""select unix_timestamp(l.creation), sum(1) as `count` + from `tabView Log` as l where + (`reference_doctype` = "IT Object" and `reference_name` in (select `name` from `tabIT Object` where `it_landscape` = %s)) + or + (`reference_doctype` = "IP Network" and `reference_name` in (select `name` from `tabIP Network` where `it_landscape` = %s)) + or + (`reference_doctype` = "IP Address" and `reference_name` in (select `name` from `tabIP Address` where `it_landscape` = %s)) + or + (`reference_doctype` = "IT User Account" and `reference_name` in (select `name` from `tabIT User Account` where `it_landscape` = %s)) + or + (`reference_doctype` = "IT Landscape" and `reference_name` = %s) + and + creation > date_sub(curdate(), interval 1 year) + group by date(l.creation);""", (name,name,name,name,name))) diff --git a/msp/msp/doctype/it_landscape/it_landscape_dashboard.py b/msp/msp/doctype/it_landscape/it_landscape_dashboard.py new file mode 100644 index 0000000..8262f3a --- /dev/null +++ b/msp/msp/doctype/it_landscape/it_landscape_dashboard.py @@ -0,0 +1,19 @@ +from __future__ import unicode_literals +from frappe import _ + +def get_data(): + return { + 'heatmap': True, + 'heatmap_message': _('Based on Views of linked Objects and this Landscape.'), + 'fieldname': 'it_landscape', + 'transactions': [ + { + 'label': _('Objects'), + 'items': ['IT Object', 'IT User Account', 'IP Network', 'IP Address' ] + }, + { + 'label': _('Processes'), + 'items': ['IT Contract'] + } + ] + } diff --git a/msp/msp/doctype/it_landscape/test_it_landscape.py b/msp/msp/doctype/it_landscape/test_it_landscape.py new file mode 100644 index 0000000..9dfd3dc --- /dev/null +++ b/msp/msp/doctype/it_landscape/test_it_landscape.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestITLandscape(unittest.TestCase): + pass diff --git a/msp/msp/doctype/it_object/__init__.py b/msp/msp/doctype/it_object/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/msp/doctype/it_object/it_object.js b/msp/msp/doctype/it_object/it_object.js new file mode 100644 index 0000000..0a8c304 --- /dev/null +++ b/msp/msp/doctype/it_object/it_object.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, itsdave GmbH and contributors +// For license information, please see license.txt + +frappe.ui.form.on('IT Object', { + // refresh: function(frm) { + + // } +}); diff --git a/msp/msp/doctype/it_object/it_object.json b/msp/msp/doctype/it_object/it_object.json new file mode 100644 index 0000000..1483dbf --- /dev/null +++ b/msp/msp/doctype/it_object/it_object.json @@ -0,0 +1,149 @@ +{ + "autoname": "ITO-.#####", + "creation": "2021-03-18 01:33:25.740040", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "overview_section", + "title", + "main_ip", + "link", + "status", + "column_break_4", + "type", + "item", + "customer", + "it_landscape", + "location", + "description_section", + "description", + "image", + "network_config_section", + "ip_adresses" + ], + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "in_standard_filter": 1, + "label": "Title" + }, + { + "fieldname": "description", + "fieldtype": "Text Editor", + "label": "Description" + }, + { + "fieldname": "item", + "fieldtype": "Link", + "label": "Item", + "options": "Item" + }, + { + "fieldname": "network_config_section", + "fieldtype": "Section Break", + "label": "Advanced Network Config" + }, + { + "fieldname": "overview_section", + "fieldtype": "Section Break", + "label": "Overview" + }, + { + "fieldname": "type", + "fieldtype": "Link", + "label": "Type", + "options": "IT Object Type" + }, + { + "fieldname": "description_section", + "fieldtype": "Section Break", + "label": "Description" + }, + { + "fieldname": "main_ip", + "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Main IP Address", + "options": "IP Address" + }, + { + "fieldname": "location", + "fieldtype": "Link", + "label": "Location", + "options": "Location" + }, + { + "fieldname": "it_landscape", + "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "IT Landscape", + "options": "IT Landscape" + }, + { + "fieldname": "column_break_4", + "fieldtype": "Column Break" + }, + { + "fieldname": "image", + "fieldtype": "Attach Image", + "label": "Image" + }, + { + "fieldname": "status", + "fieldtype": "Select", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Status", + "options": "in Production\nImplementation\nin Maintenance\nDecommissioned" + }, + { + "fieldname": "link", + "fieldtype": "Link", + "label": "Main Admin Account", + "options": "IT User Account" + }, + { + "fieldname": "customer", + "fieldtype": "Link", + "label": "Customer", + "options": "Customer" + }, + { + "fieldname": "ip_adresses", + "fieldtype": "Table", + "label": "IP Adresses", + "options": "IT Object IP Address" + } + ], + "image_field": "image", + "modified": "2021-03-23 21:28:29.467402", + "modified_by": "Administrator", + "module": "MSP", + "name": "IT Object", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "search_fields": "title, main_ip, item, description", + "sort_field": "modified", + "sort_order": "DESC", + "title_field": "title", + "track_changes": 1, + "track_views": 1 +} \ No newline at end of file diff --git a/msp/msp/doctype/it_object/it_object.py b/msp/msp/doctype/it_object/it_object.py new file mode 100644 index 0000000..f004f43 --- /dev/null +++ b/msp/msp/doctype/it_object/it_object.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class ITObject(Document): + pass diff --git a/msp/msp/doctype/it_object/test_it_object.py b/msp/msp/doctype/it_object/test_it_object.py new file mode 100644 index 0000000..97749eb --- /dev/null +++ b/msp/msp/doctype/it_object/test_it_object.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestITObject(unittest.TestCase): + pass diff --git a/msp/msp/doctype/it_object_ip_address/__init__.py b/msp/msp/doctype/it_object_ip_address/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/msp/doctype/it_object_ip_address/it_object_ip_address.json b/msp/msp/doctype/it_object_ip_address/it_object_ip_address.json new file mode 100644 index 0000000..75c5acc --- /dev/null +++ b/msp/msp/doctype/it_object_ip_address/it_object_ip_address.json @@ -0,0 +1,44 @@ +{ + "creation": "2021-03-18 03:40:19.147899", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "ip_address", + "interface_caption", + "main_address" + ], + "fields": [ + { + "fieldname": "ip_address", + "fieldtype": "Link", + "in_list_view": 1, + "label": "IP Address", + "options": "IP Address" + }, + { + "fieldname": "interface_caption", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Interface Caption" + }, + { + "default": "0", + "fieldname": "main_address", + "fieldtype": "Check", + "in_list_view": 1, + "label": "Main Address" + } + ], + "istable": 1, + "modified": "2021-03-18 03:46:44.712861", + "modified_by": "Administrator", + "module": "MSP", + "name": "IT Object IP Address", + "owner": "Administrator", + "permissions": [], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/msp/msp/doctype/it_object_ip_address/it_object_ip_address.py b/msp/msp/doctype/it_object_ip_address/it_object_ip_address.py new file mode 100644 index 0000000..613bebd --- /dev/null +++ b/msp/msp/doctype/it_object_ip_address/it_object_ip_address.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class ITObjectIPAddress(Document): + pass diff --git a/msp/msp/doctype/it_object_type/__init__.py b/msp/msp/doctype/it_object_type/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/msp/doctype/it_object_type/it_object_type.js b/msp/msp/doctype/it_object_type/it_object_type.js new file mode 100644 index 0000000..06c8248 --- /dev/null +++ b/msp/msp/doctype/it_object_type/it_object_type.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, itsdave GmbH and contributors +// For license information, please see license.txt + +frappe.ui.form.on('IT Object Type', { + // refresh: function(frm) { + + // } +}); diff --git a/msp/msp/doctype/it_object_type/it_object_type.json b/msp/msp/doctype/it_object_type/it_object_type.json new file mode 100644 index 0000000..c1ad76f --- /dev/null +++ b/msp/msp/doctype/it_object_type/it_object_type.json @@ -0,0 +1,55 @@ +{ + "allow_rename": 1, + "autoname": "field:title", + "creation": "2021-03-18 01:31:27.823964", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "title", + "description", + "default_image" + ], + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "in_list_view": 1, + "label": "Title", + "reqd": 1, + "unique": 1 + }, + { + "fieldname": "description", + "fieldtype": "Data", + "label": "Description" + }, + { + "fieldname": "default_image", + "fieldtype": "Attach Image", + "label": "Default Image" + } + ], + "modified": "2021-03-23 21:09:27.176989", + "modified_by": "Administrator", + "module": "MSP", + "name": "IT Object Type", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/msp/msp/doctype/it_object_type/it_object_type.py b/msp/msp/doctype/it_object_type/it_object_type.py new file mode 100644 index 0000000..9889032 --- /dev/null +++ b/msp/msp/doctype/it_object_type/it_object_type.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class ITObjectType(Document): + pass diff --git a/msp/msp/doctype/it_object_type/test_it_object_type.py b/msp/msp/doctype/it_object_type/test_it_object_type.py new file mode 100644 index 0000000..ac85272 --- /dev/null +++ b/msp/msp/doctype/it_object_type/test_it_object_type.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestITObjectType(unittest.TestCase): + pass diff --git a/msp/msp/doctype/it_user_account/__init__.py b/msp/msp/doctype/it_user_account/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/msp/doctype/it_user_account/it_user_account.js b/msp/msp/doctype/it_user_account/it_user_account.js new file mode 100644 index 0000000..2bea55d --- /dev/null +++ b/msp/msp/doctype/it_user_account/it_user_account.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, itsdave GmbH and contributors +// For license information, please see license.txt + +frappe.ui.form.on('IT User Account', { + // refresh: function(frm) { + + // } +}); diff --git a/msp/msp/doctype/it_user_account/it_user_account.json b/msp/msp/doctype/it_user_account/it_user_account.json new file mode 100644 index 0000000..aa69db6 --- /dev/null +++ b/msp/msp/doctype/it_user_account/it_user_account.json @@ -0,0 +1,80 @@ +{ + "autoname": "ITUACC-.#####", + "creation": "2021-03-18 02:43:33.591837", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "username", + "password", + "domain", + "account_type", + "it_landscape", + "upn" + ], + "fields": [ + { + "fieldname": "username", + "fieldtype": "Data", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Username" + }, + { + "fieldname": "password", + "fieldtype": "Password", + "label": "Password" + }, + { + "fieldname": "account_type", + "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Account Type", + "options": "IT User Account Type" + }, + { + "fieldname": "it_landscape", + "fieldtype": "Link", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "IT Landscape", + "options": "IT Landscape" + }, + { + "fieldname": "domain", + "fieldtype": "Data", + "in_list_view": 1, + "in_standard_filter": 1, + "label": "Domain" + }, + { + "fieldname": "upn", + "fieldtype": "Data", + "label": "UPN" + } + ], + "modified": "2021-03-24 00:27:17.507476", + "modified_by": "Administrator", + "module": "MSP", + "name": "IT User Account", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "sort_field": "modified", + "sort_order": "DESC", + "title_field": "upn", + "track_changes": 1 +} \ No newline at end of file diff --git a/msp/msp/doctype/it_user_account/it_user_account.py b/msp/msp/doctype/it_user_account/it_user_account.py new file mode 100644 index 0000000..46e747b --- /dev/null +++ b/msp/msp/doctype/it_user_account/it_user_account.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class ITUserAccount(Document): + pass diff --git a/msp/msp/doctype/it_user_account/test_it_user_account.py b/msp/msp/doctype/it_user_account/test_it_user_account.py new file mode 100644 index 0000000..494aa2d --- /dev/null +++ b/msp/msp/doctype/it_user_account/test_it_user_account.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestITUserAccount(unittest.TestCase): + pass diff --git a/msp/msp/doctype/it_user_account_type/__init__.py b/msp/msp/doctype/it_user_account_type/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/msp/doctype/it_user_account_type/it_user_account_type.js b/msp/msp/doctype/it_user_account_type/it_user_account_type.js new file mode 100644 index 0000000..73776da --- /dev/null +++ b/msp/msp/doctype/it_user_account_type/it_user_account_type.js @@ -0,0 +1,8 @@ +// Copyright (c) 2021, itsdave GmbH and contributors +// For license information, please see license.txt + +frappe.ui.form.on('IT User Account Type', { + // refresh: function(frm) { + + // } +}); diff --git a/msp/msp/doctype/it_user_account_type/it_user_account_type.json b/msp/msp/doctype/it_user_account_type/it_user_account_type.json new file mode 100644 index 0000000..a8ad440 --- /dev/null +++ b/msp/msp/doctype/it_user_account_type/it_user_account_type.json @@ -0,0 +1,41 @@ +{ + "autoname": "field:title", + "creation": "2021-03-18 02:44:48.527444", + "doctype": "DocType", + "editable_grid": 1, + "engine": "InnoDB", + "field_order": [ + "title" + ], + "fields": [ + { + "fieldname": "title", + "fieldtype": "Data", + "label": "Title", + "unique": 1 + } + ], + "modified": "2021-03-18 02:44:48.527444", + "modified_by": "Administrator", + "module": "MSP", + "name": "IT User Account Type", + "owner": "Administrator", + "permissions": [ + { + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "share": 1, + "write": 1 + } + ], + "quick_entry": 1, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1 +} \ No newline at end of file diff --git a/msp/msp/doctype/it_user_account_type/it_user_account_type.py b/msp/msp/doctype/it_user_account_type/it_user_account_type.py new file mode 100644 index 0000000..2a94e46 --- /dev/null +++ b/msp/msp/doctype/it_user_account_type/it_user_account_type.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +# import frappe +from frappe.model.document import Document + +class ITUserAccountType(Document): + pass diff --git a/msp/msp/doctype/it_user_account_type/test_it_user_account_type.py b/msp/msp/doctype/it_user_account_type/test_it_user_account_type.py new file mode 100644 index 0000000..2992553 --- /dev/null +++ b/msp/msp/doctype/it_user_account_type/test_it_user_account_type.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2021, itsdave GmbH and Contributors +# See license.txt +from __future__ import unicode_literals + +# import frappe +import unittest + +class TestITUserAccountType(unittest.TestCase): + pass diff --git a/msp/patches.txt b/msp/patches.txt new file mode 100644 index 0000000..e69de29 diff --git a/msp/templates/__init__.py b/msp/templates/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp/templates/pages/__init__.py b/msp/templates/pages/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..286eaac --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +frappe +ipaddress \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..c58f8f7 --- /dev/null +++ b/setup.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from setuptools import setup, find_packages + +with open('requirements.txt') as f: + install_requires = f.read().strip().split('\n') + +# get version from __version__ variable in msp/__init__.py +from msp import __version__ as version + +setup( + name='msp', + version=version, + description='App for Managed Service Providers', + author='itsdave GmbH', + author_email='dev@itsdave.de', + packages=find_packages(), + zip_safe=False, + include_package_data=True, + install_requires=install_requires +)