-
Notifications
You must be signed in to change notification settings - Fork 28
New GUI for editing projects #255
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
Merged
odeimaiz
merged 721 commits into
ITISFoundation:master
from
odeimaiz:feature/sim-widget
Oct 17, 2018
Merged
Changes from all commits
Commits
Show all changes
721 commits
Select commit
Hold shift + click to select a range
c304bbc
set dynamic services back in
sanderegg f858855
fix container under linux
sanderegg c3c23cf
check if part of swarm
sanderegg e109fee
revert last change
sanderegg 47c9653
try updating docker in travis
sanderegg ef0d162
switch conversion back on as node description are again going to chan…
sanderegg b24ac18
fix test with conversion back on
sanderegg 314036a
More refactoring
6747827
minor
7fc94d7
minor
3e77996
minor
f6a5f55
Working after refactoring. Needs to be cleaned.
984420c
minor
c1c89ee
createNode uniformed
dcecac7
Distinguish between remove and clear nodes/links
dfcbb88
"of Object.keys()" -> "in"
1ee019b
ups
6332897
Show path on title
3402493
minor
325c9f6
Data extended
19efae3
refactoring going on
cb3aff3
Cleaning code
aa83f26
Cleaning code
62406fe
More cleaning
1d76a60
removed input/outpurPortId from linkBase
0388ce7
More refactoring
a53d625
Refactoring finished
c4d36a0
minor
d0fb73e
minor
a523763
Cleaning code
cb937ed
stop starting dynamic codes upon creation
d9ccfa2
distinguish same level node links and different node links
a814325
Fixed collapsed LF Sim Data
d8a6506
flush Layout when adding nodes
3d75ed6
minor fix
cefe8e5
minor
7663f85
Inputs box added
57c65ae
minor fix
e400c45
set Name in NodeModel
7a00bdd
Showing input nodes for the macro-view
28029af
Make travis happy
ebf65e4
renaming
2455978
renaming
1b9e5cd
cleaning
ce90382
No more portId
1fb7424
refactoring
58b9bfa
refactoring
05c98bd
renaming
b94fc5a
renaming
b388f04
Mini versions not needed anymore
f0138fb
SettingsView moved to widgets
856971c
Making sure node is rendered before trying to get its bounds
684ce7e
more refactoring
36e94c0
Node Input has its own class
44d9171
cleaning
6164092
Links into containers working!
e2ae5df
some safety checks added
4906bda
Fake Data modified
32ce15d
reusing code
729da5e
reusing code
ae42bb3
Cleaning
5e259b4
renaming
7485f77
refactoring
f7e7b78
minor
53a8645
Nodes can be added in any level
65e0e76
minor
bc2db0a
minor
c6cfa61
InputNodes layout added to SettingsView
8ded340
translations added
1dc7206
SettingsView needs WorkbenchModel
b95cebd
Workbench -> WorkbenchView
f61efb3
NodeInput is a widget
ad2c8a2
minor
8cb0cb8
Show folder icon in settingsView
084d986
Show start and folder buttons in settings view
fdec675
Add Exposed nodes to WorkebenchView
09ad98c
SettingsView shows input nodes
6c4236a
Revert "Add Exposed nodes to WorkebenchView"
odeimaiz 8bc0ad7
Show interactive service mechanism is back
odeimaiz d7c097d
minor
odeimaiz 3dad256
LF sensor settings data extended
odeimaiz 2b005e0
Collapsable VBox improved
odeimaiz c8f98d8
Show Node Ports with settings view
odeimaiz 6b43007
added force flag
sanderegg 488f42a
minor
7887dc8
minor fix
4ede44d
aesthetics
7cd5c25
minor
64f2497
FileManager -> FilePicker
50b1d38
File Manager -> File Picker
ea1c9be
File Manager added to node
e22627a
added tool for converting jsonschema files to openapi files
sanderegg 115b3e7
enhance converter to save as yaml
sanderegg 7d1a448
moved parameters and schemas to components subfolder
sanderegg 43b704e
Working drag drop mechanism
ab0667a
minor
9edc88d
examples are not allowed in openAPI in schemas and properties. exampl…
sanderegg 8c57611
director uses json to openapi converted file for services
sanderegg 233c3bf
Merge branch 'master' into feature/#249_jsonschema2openapi_tool
sanderegg 0b02f1f
reverted wrong change
sanderegg e76a734
reverted wrong change (typo)
sanderegg 31d0dcc
use fct as_uri to get valid url
sanderegg 54baa3a
FakeData follows new schemas
bb9dbd3
Frontend adapted to new schema
b70face
added tool docs
sanderegg 8f81dd3
minor
e6704ae
"Show Workbench" button removed
c9e1d56
"Show Workbench" button removed (2)
c1354f4
TreeTool knows project name
d134a75
VirtualTree -> TreeVirtual
1609ea6
minor
7590fc0
getPath moved to WorkbenchModel
3d0f8ad
WorkbenchModel knows projectName
70d4ca8
minor
51380d4
minor
76902de
changed output filename following discussion with @pcrespo
sanderegg 403da9e
some basic documentation on reusability of opeapi
sanderegg c9bcbf7
first draft of a shared folder structure
sanderegg f26c53c
first tests that check validity of any openapi spec in the folders
sanderegg 4fb1fab
Node knows its parent's nodeId
659affd
cleaning
5b44ef0
getPath working
d0eb3e5
Split side panel in three equal spaces
c817efe
Show Logger on the bottom right
65f12cc
Remove project name from top right
f8981c2
removed generic response
sanderegg ff59d5d
renamed tests and separated in themesadded tests to validate separate…
sanderegg 46e4af3
spaces
sanderegg b2a3995
Added getPathWithId
1dffb21
Merge branch 'master' into feature/#233_api_sharing
sanderegg 2a883f4
enable testing on travis
sanderegg a853712
minor
5aace94
refactoring
d14c816
Show path with buttons in NavigationBar
a682c94
NodeModel.name ->NodeModel.label
6dda7cb
TreeTool logic improved
6bc97ed
Tree always in sync with selection
027ff2a
added automatic json schema validator
sanderegg 899b112
Attempt to show nodeId, didn't make it :(
2a24664
SidePanel properly sized
14ce4c5
minor
c1b0c95
modified setup to follow cookiecutter
sanderegg 20752b1
removed openapi from director folder
sanderegg d3631c8
aesthetics
9fffb22
minor
6ca10f7
drag&drop event type renamed
de8db76
drag&drop event type renamed (2)
42c24a5
arePortsCompatible signature extended
83ae72a
NodePorts can only be dragged
277d07f
Ports always are compatible
d66522f
Drag&Drop working between NodePorts and SettingsView
c644935
minor
4661517
minor
c563688
set to v0 as it is still dev
sanderegg a2fcbf2
minor
ccf8595
only keep schemas as separated entities
sanderegg f4707c5
refactored openapi to have only schemas as separate entities
sanderegg edb55de
fixed reference
sanderegg e5c378f
minor
3052abb
renamed folder back from api to oas3
sanderegg 6561fb1
added version in codegenerator
sanderegg 2c51a1c
updated code generator version
sanderegg 37b5cdf
added validation tests for individual schemas
sanderegg fdecb06
fixing path
sanderegg f131d46
Show only exposed nodes in SettingsView (no containers)
0463a9e
OptionsBar commented out
2ef4bd3
Use Window.center() instead of hardcoded positions
797cc94
reverted to genreator 3.2.3
sanderegg 8a124f8
fixed root get test as new openapi modifed the object type??
sanderegg 15a9b0e
fixed nullability of response 204
sanderegg 8410903
WorkebenchModel takes care of workbench serialization
edaeeb0
FilePicker has only one output port
8916cf6
force Visibility.flush when changing visibility
eb8d32f
WidgetManager only returns file-picker
2d7bca0
PrjEditor asks WidgetManager for dynamic services
4c97523
Workbench serialization following schema
9915722
Workbench serialization following schema (2)
bfff8ce
isPropertyInitialized :)
1975d94
Rerender form everytime data is set or changed (needed for linked props)
a72c9ef
added apihub service
sanderegg 05e5961
now generating openapi from apihub files
sanderegg 633052e
minor
6b1ced0
setSettingsData dicoupled
a52335a
minor
8b59e86
Merge remote-tracking branch 'upstream/master'
26e65c4
Merge branch 'master' into feature/sim-widget
8cef1d3
added tests for the apihub service
sanderegg 387471e
pylint
sanderegg b848e2b
pylint is happy
sanderegg 23ccb30
pyliint
sanderegg 1d3712f
minor
2f46d77
NodeModel contructor signature changed. Refactoring
c939f9a
renaming
f5d49d0
minor
c8402e0
minor
a6af27c
minor
bb8678f
Create Port Link (Drag&Drop) and Remove Link (button) working
9f91ac4
minor
8a7502d
isLinked is not used
ead1efd
disable/enable form field according to link
40f25fa
minor
31d657b
File Picker writes output not metadata
b375f73
renaming
8cac872
small fix
d3c6db9
Write current output when serializing
6e21505
get/setOutputValues added
2e5c112
cleaning
81ce5cc
Cleaning the backend a bit
5c71ddf
minor
b2a4401
renaming
a890f30
added rationales
sanderegg 4aa343c
setLabel from metadata and then override
911ad9f
added tests on api conventions
sanderegg 97b81df
references fixed
f97dec8
Working get_services call
6d81ad7
Stop flushing Widgets
380521a
renamed componets -> componet and widgets -> widget
9fb4c6c
Add Custom TreeItem widget for node tree
oetiker 174081c
added tool to compile oas from separated files
sanderegg bc3e5a7
rename things
oetiker 5dd2a7e
Merge pull request #8 from oetiker/sim-widget-tobi
odeimaiz 169e461
Were moved somewhere else
7f05229
Merge branch 'feature/sim-widget' of github.com:odeimaiz/osparc-simco…
4dbc98b
Merge pull request #9 from sanderegg/feature/#233_api_sharing
odeimaiz fa75042
client director re-generated version 0 now
sanderegg c469013
re-generated director service models
sanderegg 092bc97
minor
851d915
function(e) to e =>
2ce336f
deprecated files
5b33a78
fixed tests to newly generated models
sanderegg ff3af8b
sans-serif => Roboto
fb08e1a
re-generated director client code
sanderegg 138ca1a
we use v0 development
sanderegg 89362a1
fixed return enveloped data
sanderegg 10211cd
Merge pull request #10 from sanderegg/feature/#233_api_sharing
odeimaiz 67e1d65
updated readme
sanderegg 2a3ce63
Show in logger when service is started
499eac0
removed status from envelope
sanderegg 8caef08
minor
e40b405
re-generated models
sanderegg 5c1490a
minor
0397614
some more tests
sanderegg f7d6671
reg-generated client sdk
sanderegg c0313e0
adapted to new api without status
sanderegg 0702a77
webserver returns const {data, error} = requ.getResponse();
2669a16
Revert "adapted to new api without status"
sanderegg e258613
Merge pull request #12 from sanderegg/feature/#233_api_sharing
odeimaiz 6fe6bcf
minor renaming
526191a
Workebench View also shows exposed nodes layout. Logic working as well
ca75391
Making pylint happy
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# APIs development guidelines | ||
|
||
# Concept | ||
|
||
REST APIs and models (defined as openAPI- or JSON-schemas) are defined in a central location (/apis) to allow for "design-first" development. | ||
|
||
# Development guidelines | ||
|
||
## Standards | ||
|
||
The oSparc platform uses the following standards: | ||
- REST API: [Open API v3](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md) | ||
- Models and configuration [JSON Schema](https://json-schema.org/) | ||
|
||
## Folder structure | ||
|
||
```bash | ||
/apis/ # base folder | ||
/apis/director/ # service name folder (e.g. for director service) | ||
/apis/director/v0/ # service version (v0 for development, then v1, v2... only major) | ||
/apis/director/v0/openapi.yaml # openapi specifications in YAML | ||
/apis/director/v0/schemas/ # schemas only used by the director API | ||
/apis/director/v0/schemas/services.yaml # openapi encoded service only schema | ||
|
||
/apis/shared/ # shared apis/schemas base folder | ||
/apis/shared/schemas/ # sub folder for schemas | ||
/apis/shared/schemas/health_check.yaml # openapi encoded shared schema | ||
/apis/shared/schemas/node-meta.json # jsonschema encoded shared schema | ||
/apis/shared/schemas/v1/error.yaml # openapi encoded shaared schema for version 1 | ||
/apis/shared/schemas/v2/error.yaml # openapi encoded shaared schema for version 2 | ||
|
||
/tests/ # python tests folder to check schemas validity | ||
/tests/requirements.txt # requirements for python tests | ||
``` | ||
|
||
## Organization | ||
|
||
### Openapi specifications file | ||
|
||
Each API is defined within a file __openapi.yaml__ in YAML format. The file shall be located in the a subfolder named after the service/package and the major version subfolder. | ||
|
||
#### Version subfolder | ||
|
||
For initial development, the version shall be 0.1.0 and the subfolder v0 | ||
For release, the version shall start from 1.0.0 and subfolder v1. | ||
The subolder digit corresponds to the version major digits. It shall be modified only when changes are not backwards compatible (e.g. changing a return value, removing parameters or resource, ...). | ||
|
||
#### Schemas in separate files | ||
|
||
Schemas shall always be defined in separate files. | ||
|
||
Schemas format shall be either OpenAPI v3 or JSON schema Draft#7. | ||
|
||
If these schemas are pertinent only to the current API they shall be contained together with the openapi specifications file inside a __schemas__ subfolder. | ||
If these schemas are shared with other APIs they should be located in the __/shared/schemas__ subfolder. | ||
|
||
#### Versioning shared schemas | ||
|
||
NOTE: If shared schemas need backward incompatible changes, then a new major version of this specific shared schema is necessary and all APIs that rely on this specific schema will need to be upgraded. | ||
In that case, a version subfolder shall be added in the __/shared/__ subfolder and the relevant schemas shall be moved there. | ||
|
||
### Schemas defined with JSONSchema format that are used together with OpenAPI | ||
|
||
Mixing JSONSchema with OpenAPI schema needs some additional steps: | ||
|
||
1. Define the JSONSchema schema. | ||
2. Convert the JSONSchema formatted file to OpenAPI formatted file using the [converter](../scripts/jsonschema/openapi_converter). | ||
3. In the openapi specifications file ref the converted OpenAPI schema file. | ||
|
||
## Using the openAPI | ||
|
||
### Python: Current status (using aiohttp-apiset) | ||
|
||
The current python-based packages use the aiohttp-apiset library to create routes from the defined API. The aiohttp-apiset library requires a physical file to create the routes. Therefore one needs to generate that file by following: | ||
|
||
1. Generate a 1 file OpenAPI formatted file using [prance](https://pypi.org/project/prance/). By using [openapi-resolver](../scripts/openapi/oas_resolver). | ||
2. Copy the generated file in a folder in the python-based code and use it. | ||
|
||
### Python: in development and should be available soon | ||
|
||
Using the library [openapi-core](https://github.com/p1c2u/openapi-core) the library is able to download the api at starting point. | ||
The [apihub service](../services/apihub) serves the apis and schemas to the internal parts of the oSparc platform. | ||
|
||
## references | ||
|
||
- [defining reusable components - good practices](https://dev.to/mikeralphson/defining-reusable-components-with-the-openapi-specification-4077) | ||
- [official guidelines on OAS re-usability](https://github.com/OAI/OpenAPI-Specification/blob/master/guidelines/v2.0/REUSE.md) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
cool