Plugin schema are now just plugin forms (requires eV 1.2)
This commit is contained in:
parent
0d7a5f71e0
commit
d9e07f913a
16 changed files with 106 additions and 98 deletions
|
|
@ -7,7 +7,7 @@
|
|||
"isTask": false,
|
||||
"selfUpdate": true,
|
||||
"route": "/hello",
|
||||
"schema": [
|
||||
"form": [
|
||||
{
|
||||
"fieldType": "textInput",
|
||||
"placeholder": "Enter a string",
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
"isTask": true,
|
||||
"route": "/timelapse",
|
||||
"submitLabel": "Start timelapse",
|
||||
"schema": [
|
||||
"form": [
|
||||
{
|
||||
"fieldType": "numberInput",
|
||||
"name": "n_images",
|
||||
|
|
@ -9,7 +9,7 @@ import json
|
|||
from flask import request, Response, escape, jsonify
|
||||
|
||||
HERE = os.path.dirname(os.path.realpath(__file__))
|
||||
SCHEMA_PATH = os.path.join(HERE, "schema.json")
|
||||
FORM_PATH = os.path.join(HERE, "forms.json")
|
||||
|
||||
### MICROSCOPE PLUGIN ###
|
||||
|
||||
|
|
@ -18,10 +18,10 @@ class MyPluginClass(MicroscopePlugin):
|
|||
A set of default plugins
|
||||
"""
|
||||
|
||||
global SCHEMA_PATH
|
||||
global FORM_PATH
|
||||
|
||||
with open(SCHEMA_PATH, 'r') as sc:
|
||||
api_schema = json.load(sc)
|
||||
with open(FORM_PATH, 'r') as sc:
|
||||
api_form = json.load(sc)
|
||||
|
||||
api_views = {
|
||||
'/identify': IdentifyAPI,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue