Comments (8)
@zrthxn some documentation is here: https://fnndsc.github.io/ChRIS_store/
But more helpful is the API itself. It's designed to be self-documenting in a way. (does it work? you be the judge)
For example:
https https://chrisstore.co/api/v1/20/
HTTP/1.1 200 OK
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
Connection: Keep-Alive
Content-Length: 973
Content-Type: application/vnd.collection+json
Date: Thu, 08 Apr 2021 06:54:39 GMT
Keep-Alive: timeout=5, max=100
Server: Apache
Vary: Accept,Cookie
X-Frame-Options: SAMEORIGIN
{
"collection": {
"href": "https://chrisstore.co/api/v1/20/",
"items": [
{
"data": [
{
"name": "id",
"value": 20
},
{
"name": "creation_date",
"value": "2021-02-08T11:49:15.818028-05:00"
},
{
"name": "modification_date",
"value": "2021-02-09T07:44:00.312420-05:00"
},
{
"name": "name",
"value": "pl-med2img"
},
{
"name": "title",
"value": "A ChRIS plugin app"
},
{
"name": "stars",
"value": 0
},
{
"name": "public_repo",
"value": "https://github.com/FNNDSC/pl-med2img"
},
{
"name": "license",
"value": "MIT"
},
{
"name": "type",
"value": "ds"
},
{
"name": "icon",
"value": ""
},
{
"name": "category",
"value": ""
},
{
"name": "authors",
"value": "Arushi Vyas <[email protected]>"
},
{
"name": "documentation",
"value": "https://github.com/FNNDSC/pl-med2img"
}
],
"href": "https://chrisstore.co/api/v1/20/",
"links": [
{
"href": "https://chrisstore.co/api/v1/20/plugins/",
"rel": "plugins"
},
{
"href": "https://chrisstore.co/api/v1/users/1/",
"rel": "owner"
}
]
}
],
"links": [],
"template": {
"data": [
{
"name": "public_repo",
"value": ""
},
{
"name": "new_owner",
"value": ""
}
]
},
"version": "1.0"
}
}
Take note of these parts:
Allow: GET, PUT, PATCH, DELETE, HEAD, OPTIONS
[...]
"template": {
"data": [
{
"name": "public_repo",
"value": ""
},
{
"name": "new_owner",
"value": ""
}
]
},
Piecing it together, such a request would be legal:
https -a <username>:<password> PATCH https://chrisstore.co/api/v1/20/ content-type:application/vnd.collection+json template:='{"data":[{"name": "public_repo", "value": "https://github.com/FNNDSC/pl-med2img"}]}'
The effect is, the plugin's public code repository is changed.
from chris_store_ui.
@mairin I could start working on this if I can get some documentation on the backend API. Also please let me know if there are specific requirements for this
from chris_store_ui.
After creating a test account and creating a sample plugin for testing, whose representation file I copied from the cookiecutter Wiki here, I get the following runtime error when I try to open the Dashboard.
TypeError: DashApplicationType is not a constructor
I haven't modified anything related to the Dashboard yet.
I think this happens because DashApplicationType
is a function
const DashApplicationType = (type) => {
if (type === 'ds') {
return (<React.Fragment><span className="fa fa-database" /> Data System</React.Fragment>);
}
return (<React.Fragment><span className="fa fa-file" /> File System</React.Fragment>);
};
and it's being called with the new
keyword.
const applicationType = new DashApplicationType(plugin.type);
Should I modify this or is there something I'm missing here?
from chris_store_ui.
@zrthxn I am getting the same error. Maybe it is a backwards incompatible change with latest version of node
. Would you submit a PR for your fix?
from chris_store_ui.
from chris_store_ui.
From the documentation, if I understand correctly, the modifiable fields are
public_repo
dock_image
name
descriptor_file
Now there is already a edit modal that is able to edit the public_repo
field. I am considering two approaches to this, one which uses the existing modal setup and another that will make more drastic changes.
- Using the modal, just add more fields to the modal and change the API call to include those fields. This will be simple but limited in the number of things you can put in the modal.
- Changing the CreatePlugin component to PluginEditor, and introduce an
intent
prop. Based on this the component can either populate the fields with given valuesif (intent == 'edit')
or it can show empty fieldsif (intent == 'create')
Which dyou think is better and is this the right direction?
from chris_store_ui.
I don't see where in the documentation page it says that descriptor_file
, name
, or dock_image
is modifiable. Neither do I think these should be modifiable.
Using the edit modal would be easier to implement, I believe. The 'intent' idea would be great, but at the moment we have too much first to figure out.
Perhaps I should have studied this issue a bit before having you take it up, since the edit modal allows for editing of the only editable field (aside from "owner," which is a bit special). I will ask @jbernal0019, our backend developer, how to proceed.
The "intent" idea might be worthwhile to pursue. If you were to implement the feature, uneditable fields such as name
should be greyed out. i.e. most things should be greyed out. But the plugin's long description should maybe be editable. Unfortunately the backend does not support the long description yet.
from chris_store_ui.
I don't see where in the documentation page it says that
descriptor_file
,name
, ordock_image
is modifiable. Neither do I think these should be modifiable.
I saw them being sent in the "template" field and I tried to piece it together from how you had described it. I think that was wrong then.
The "intent" idea might be worthwhile to pursue. If you were to implement the feature, uneditable fields such as
name
should be greyed out. i.e. most things should be greyed out. But the plugin's long description should maybe be editable. Unfortunately the backend does not support the long description yet.
Yea that's what I had thought of as well.
Perhaps I should have studied this issue a bit before having you take it up, since the edit modal allows for editing of the only editable field (aside from "owner," which is a bit special). I will ask @jbernal0019, our backend developer, how to proceed.
Alright I'll wait for a response from him.
from chris_store_ui.
Related Issues (20)
- Link to view plugin aftrer creation leads to 404 HOT 2
- Show error screen instead of 404 screen if backend response is 500 HOT 5
- Places in code assume that repo is a Github repo HOT 5
- Search Autocomplete Text-Box has Fixed Height HOT 5
- Add an Eye Icon on password Area to show Password When A user Clicks on it HOT 4
- Docker run throws error HOT 2
- Converting class components to functional HOT 2
- Alignment in Dashboard page
- The close button of the notification does not work HOT 7
- 404ing page HOT 2
- Error when trying to submit plugin to chrisstore.co HOT 4
- Typo error in components html code HOT 2
- Plugin drop down menu gets cutoff on mobile screen
- Single quote rule is not enforced HOT 2
- Creating new Footer for the chris_UI HOT 1
- Sort by button not working and add sort by "most starred" HOT 2
- Add Forgotten password HOT 1
- Fix DeveloperSignup form reload, wrong error messages, password visibility
- Warning about bad dock_image tag name does not prevent upload. HOT 1
- Feature request: based on plugin version, try to guess tag for correct README.md version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chris_store_ui.