From ff44ee0a4c779436fb25d1212b63e2458476c21f Mon Sep 17 00:00:00 2001 From: Luiz Costa Date: Fri, 31 May 2024 11:42:42 +0200 Subject: [PATCH] feat: Initialize App --- .gitignore | 7 + MANIFEST.in | 18 ++ README.md | 7 + license.txt | 1 + msp_remoteadmin/__init__.py | 3 + msp_remoteadmin/config/__init__.py | 0 msp_remoteadmin/config/desktop.py | 10 + msp_remoteadmin/config/docs.py | 10 + msp_remoteadmin/hooks.py | 217 ++++++++++++++++++++ msp_remoteadmin/modules.txt | 1 + msp_remoteadmin/msp_remoteadmin/__init__.py | 0 msp_remoteadmin/patches.txt | 0 msp_remoteadmin/public/.gitkeep | 0 msp_remoteadmin/templates/__init__.py | 0 msp_remoteadmin/templates/pages/__init__.py | 0 requirements.txt | 1 + setup.py | 19 ++ 17 files changed, 294 insertions(+) create mode 100644 .gitignore create mode 100644 MANIFEST.in create mode 100644 README.md create mode 100644 license.txt create mode 100644 msp_remoteadmin/__init__.py create mode 100644 msp_remoteadmin/config/__init__.py create mode 100644 msp_remoteadmin/config/desktop.py create mode 100644 msp_remoteadmin/config/docs.py create mode 100644 msp_remoteadmin/hooks.py create mode 100644 msp_remoteadmin/modules.txt create mode 100644 msp_remoteadmin/msp_remoteadmin/__init__.py create mode 100644 msp_remoteadmin/patches.txt create mode 100644 msp_remoteadmin/public/.gitkeep create mode 100644 msp_remoteadmin/templates/__init__.py create mode 100644 msp_remoteadmin/templates/pages/__init__.py create mode 100644 requirements.txt create mode 100644 setup.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..498dae4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +*.pyc +*.egg-info +*.swp +tags +msp_remoteadmin/docs/current +node_modules/ \ No newline at end of file diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..f5cfeaf --- /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_remoteadmin *.css +recursive-include msp_remoteadmin *.csv +recursive-include msp_remoteadmin *.html +recursive-include msp_remoteadmin *.ico +recursive-include msp_remoteadmin *.js +recursive-include msp_remoteadmin *.json +recursive-include msp_remoteadmin *.md +recursive-include msp_remoteadmin *.png +recursive-include msp_remoteadmin *.py +recursive-include msp_remoteadmin *.svg +recursive-include msp_remoteadmin *.txt +recursive-exclude msp_remoteadmin *.pyc \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..b95e149 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +## MSP Remoteadmin + +Remote connection management application to servers configured in the MSP + +#### License + +MIT \ No newline at end of file diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..2fdf7c7 --- /dev/null +++ b/license.txt @@ -0,0 +1 @@ +License: MIT \ No newline at end of file diff --git a/msp_remoteadmin/__init__.py b/msp_remoteadmin/__init__.py new file mode 100644 index 0000000..7a0660b --- /dev/null +++ b/msp_remoteadmin/__init__.py @@ -0,0 +1,3 @@ + +__version__ = '0.0.1' + diff --git a/msp_remoteadmin/config/__init__.py b/msp_remoteadmin/config/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp_remoteadmin/config/desktop.py b/msp_remoteadmin/config/desktop.py new file mode 100644 index 0000000..68109b9 --- /dev/null +++ b/msp_remoteadmin/config/desktop.py @@ -0,0 +1,10 @@ +from frappe import _ + +def get_data(): + return [ + { + "module_name": "MSP Remoteadmin", + "type": "module", + "label": _("MSP Remoteadmin") + } + ] diff --git a/msp_remoteadmin/config/docs.py b/msp_remoteadmin/config/docs.py new file mode 100644 index 0000000..7c0ebf9 --- /dev/null +++ b/msp_remoteadmin/config/docs.py @@ -0,0 +1,10 @@ +""" +Configuration for docs +""" + +# source_link = "https://github.com/[org_name]/msp_remoteadmin" +# headline = "App that does everything" +# sub_heading = "Yes, you got that right the first time, everything" + +def get_context(context): + context.brand_html = "MSP Remoteadmin" diff --git a/msp_remoteadmin/hooks.py b/msp_remoteadmin/hooks.py new file mode 100644 index 0000000..f4d5fa9 --- /dev/null +++ b/msp_remoteadmin/hooks.py @@ -0,0 +1,217 @@ +from . import __version__ as app_version + +app_name = "msp_remoteadmin" +app_title = "MSP Remoteadmin" +app_publisher = "Luiz Costa" +app_description = "Remote connection management application to servers configured in the MSP" +app_email = "l.costa@itsdave.de" +app_license = "MIT" + +# Includes in +# ------------------ + +# include js, css files in header of desk.html +# app_include_css = "/assets/msp_remoteadmin/css/msp_remoteadmin.css" +# app_include_js = "/assets/msp_remoteadmin/js/msp_remoteadmin.js" + +# include js, css files in header of web template +# web_include_css = "/assets/msp_remoteadmin/css/msp_remoteadmin.css" +# web_include_js = "/assets/msp_remoteadmin/js/msp_remoteadmin.js" + +# include custom scss in every website theme (without file extension ".scss") +# website_theme_scss = "msp_remoteadmin/public/scss/website" + +# include js, css files in header of web form +# webform_include_js = {"doctype": "public/js/doctype.js"} +# webform_include_css = {"doctype": "public/css/doctype.css"} + +# 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" +# } + +# Generators +# ---------- + +# automatically create page for each record of this doctype +# website_generators = ["Web Page"] + +# Jinja +# ---------- + +# add methods and filters to jinja environment +# jinja = { +# "methods": "msp_remoteadmin.utils.jinja_methods", +# "filters": "msp_remoteadmin.utils.jinja_filters" +# } + +# Installation +# ------------ + +# before_install = "msp_remoteadmin.install.before_install" +# after_install = "msp_remoteadmin.install.after_install" + +# Uninstallation +# ------------ + +# before_uninstall = "msp_remoteadmin.uninstall.before_uninstall" +# after_uninstall = "msp_remoteadmin.uninstall.after_uninstall" + +# Integration Setup +# ------------------ +# To set up dependencies/integrations with other apps +# Name of the app being installed is passed as an argument + +# before_app_install = "msp_remoteadmin.utils.before_app_install" +# after_app_install = "msp_remoteadmin.utils.after_app_install" + +# Integration Cleanup +# ------------------- +# To clean up dependencies/integrations with other apps +# Name of the app being uninstalled is passed as an argument + +# before_app_uninstall = "msp_remoteadmin.utils.before_app_uninstall" +# after_app_uninstall = "msp_remoteadmin.utils.after_app_uninstall" + +# Desk Notifications +# ------------------ +# See frappe.core.notifications.get_notification_config + +# notification_config = "msp_remoteadmin.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", +# } + +# DocType Class +# --------------- +# Override standard doctype classes + +# override_doctype_class = { +# "ToDo": "custom_app.overrides.CustomToDo" +# } + +# 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_remoteadmin.tasks.all" +# ], +# "daily": [ +# "msp_remoteadmin.tasks.daily" +# ], +# "hourly": [ +# "msp_remoteadmin.tasks.hourly" +# ], +# "weekly": [ +# "msp_remoteadmin.tasks.weekly" +# ], +# "monthly": [ +# "msp_remoteadmin.tasks.monthly" +# ], +# } + +# Testing +# ------- + +# before_tests = "msp_remoteadmin.install.before_tests" + +# Overriding Methods +# ------------------------------ +# +# override_whitelisted_methods = { +# "frappe.desk.doctype.event.event.get_events": "msp_remoteadmin.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_remoteadmin.task.get_dashboard_data" +# } + +# exempt linked doctypes from being automatically cancelled +# +# auto_cancel_exempted_doctypes = ["Auto Repeat"] + +# Ignore links to specified DocTypes when deleting documents +# ----------------------------------------------------------- + +# ignore_links_on_delete = ["Communication", "ToDo"] + +# Request Events +# ---------------- +# before_request = ["msp_remoteadmin.utils.before_request"] +# after_request = ["msp_remoteadmin.utils.after_request"] + +# Job Events +# ---------- +# before_job = ["msp_remoteadmin.utils.before_job"] +# after_job = ["msp_remoteadmin.utils.after_job"] + +# User Data Protection +# -------------------- + +# user_data_fields = [ +# { +# "doctype": "{doctype_1}", +# "filter_by": "{filter_by}", +# "redact_fields": ["{field_1}", "{field_2}"], +# "partial": 1, +# }, +# { +# "doctype": "{doctype_2}", +# "filter_by": "{filter_by}", +# "partial": 1, +# }, +# { +# "doctype": "{doctype_3}", +# "strict": False, +# }, +# { +# "doctype": "{doctype_4}" +# } +# ] + +# Authentication and authorization +# -------------------------------- + +# auth_hooks = [ +# "msp_remoteadmin.auth.validate" +# ] diff --git a/msp_remoteadmin/modules.txt b/msp_remoteadmin/modules.txt new file mode 100644 index 0000000..42bbcc5 --- /dev/null +++ b/msp_remoteadmin/modules.txt @@ -0,0 +1 @@ +MSP Remoteadmin \ No newline at end of file diff --git a/msp_remoteadmin/msp_remoteadmin/__init__.py b/msp_remoteadmin/msp_remoteadmin/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp_remoteadmin/patches.txt b/msp_remoteadmin/patches.txt new file mode 100644 index 0000000..e69de29 diff --git a/msp_remoteadmin/public/.gitkeep b/msp_remoteadmin/public/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/msp_remoteadmin/templates/__init__.py b/msp_remoteadmin/templates/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/msp_remoteadmin/templates/pages/__init__.py b/msp_remoteadmin/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..7668191 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +# frappe -- https://github.com/frappe/frappe is installed via 'bench init' \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..0c6da5c --- /dev/null +++ b/setup.py @@ -0,0 +1,19 @@ +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_remoteadmin/__init__.py +from msp_remoteadmin import __version__ as version + +setup( + name="msp_remoteadmin", + version=version, + description="Remote connection management application to servers configured in the MSP", + author="Luiz Costa", + author_email="l.costa@itsdave.de", + packages=find_packages(), + zip_safe=False, + include_package_data=True, + install_requires=install_requires +)