From d7405ad05d2eacd555d46700f1194330a7722b9d Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 22 May 2023 02:20:58 +0200 Subject: [PATCH] Added multiple parsers for the entities referenced in docstrings. The `inspect` plugin can now detect references to plugins, backends, events, responses and schemas in docstrings and replace them either with links to the documentation or auto-generated examples. --- .../http/webapp/src/components/Nav.vue | 2 + .../src/components/panels/Execute/Index.vue | 35 +++- .../http/webapp/src/style/components.scss | 7 +- platypush/plugins/inspect/_model.py | 158 ++++++++++-------- .../plugins/inspect/_parsers/__init__.py | 16 ++ .../plugins/inspect/_parsers/_backend.py | 34 ++++ platypush/plugins/inspect/_parsers/_base.py | 12 ++ platypush/plugins/inspect/_parsers/_event.py | 34 ++++ platypush/plugins/inspect/_parsers/_method.py | 35 ++++ platypush/plugins/inspect/_parsers/_plugin.py | 34 ++++ .../plugins/inspect/_parsers/_response.py | 34 ++++ platypush/plugins/inspect/_parsers/_schema.py | 97 +++++++++++ 12 files changed, 428 insertions(+), 70 deletions(-) create mode 100644 platypush/plugins/inspect/_parsers/__init__.py create mode 100644 platypush/plugins/inspect/_parsers/_backend.py create mode 100644 platypush/plugins/inspect/_parsers/_base.py create mode 100644 platypush/plugins/inspect/_parsers/_event.py create mode 100644 platypush/plugins/inspect/_parsers/_method.py create mode 100644 platypush/plugins/inspect/_parsers/_plugin.py create mode 100644 platypush/plugins/inspect/_parsers/_response.py create mode 100644 platypush/plugins/inspect/_parsers/_schema.py diff --git a/platypush/backend/http/webapp/src/components/Nav.vue b/platypush/backend/http/webapp/src/components/Nav.vue index 51deb02abc..4f2fccad54 100644 --- a/platypush/backend/http/webapp/src/components/Nav.vue +++ b/platypush/backend/http/webapp/src/components/Nav.vue @@ -156,6 +156,8 @@ nav { display: block; color: $nav-fg; padding: 1em 0.5em; + text-decoration: none; + &:hover { color: $nav-fg; } diff --git a/platypush/backend/http/webapp/src/components/panels/Execute/Index.vue b/platypush/backend/http/webapp/src/components/panels/Execute/Index.vue index 93fc79c915..9322d85836 100644 --- a/platypush/backend/http/webapp/src/components/panels/Execute/Index.vue +++ b/platypush/backend/http/webapp/src/components/panels/Execute/Index.vue @@ -1,5 +1,5 @@