-
-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin mechanism #105
Plugin mechanism #105
Conversation
I've been thinking that configuration could be based on JSON schema and the UI & data model would be dynamically generated. The server would get a JSON schema for the configuration UI via plugin API and create the UI using for example https://github.com/mozilla-services/react-jsonschema-form. The server would take care of saving & retrieving the configuration data and plugin lifecycle. |
My current idea is that plugins would be independent npm modules, installed as usual with |
The configuration UI could be browser-only, with no server side html generation apart from initial bootstrap. The UI would use server's REST api to retrieve & store per plugin configuration data. This part of the architecture could be part of the shared SK spec. |
During sailing season 2016 I had the following server side pluginish functionalities
My plan is to turn these into plugins and eat this PRs dogfood with them. |
#102 could be another plugin. |
Capability to intercept and capture the data the server is passing out would be useful. For example primary + backup: send data from backup source only if data from primary source is not available. |
|
This is a really good initiative and should be able to cover many needs/requests. With good documentation and examples how to develop own plugins, we could have ourself an app store. |
I'm looking into it. But as far as I can see, none of these plugins are published on npm and npm update does not add these to my server. Would it be possible to make another example that takes sk data, does some calculation and sends back sk to the server? It could well be empty for me to fill in the paths. Ideas for plugins:
|
Ready for merging - I would appreciate any and all feedback. In case somebody bites: start from Readme. |
</div> | ||
|
||
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> | ||
<script src="/bower_components/jquery/dist/jquery.min.js"</script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing >
<script src="/bower_components/bootstrap/dist/js/bootstrap.min.js"></script> | ||
|
||
<script src="main.js"></script> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
main.js is found in developer tools, but not on the webpage
CDN version is not going to be available locally, so include it in the bundle
This reverts commit 919bb5b.
I believe this is ready for merging. |
It would be nice to be able to do a quick check to see if a specific plugin is installed and enabled. I currently have to get the config for all of the plugins and go through them. |
@sbender9 you mean via http / rest? |
See 4368588 |
Yep. Perfect. Thanks! |
A plugin mechanism should allow extending the server's functionalities. Some examples:
A plugin needs access to
Plugins should be installed independently, allowing independent versioning & dependencies.
There should be a standard plugin configuration UI.