So the module can manage REST resources, but the UI is completely messed up. I need a hand with this.

| Comment | File | Size | Author |
|---|---|---|---|
| #13 | rest_revamped.png | 308.09 KB | juampynr |
| #13 | resource_settings.png | 114.07 KB | juampynr |
| #12 | Selection_001.png | 22.47 KB | juampynr |
| #11 | Selection_001.png | 29.1 KB | juampynr |
| #10 | restui.png | 218.69 KB | juampynr |
Comments
Comment #1
juampynr commentedThe hierarchy should be:
- Resources (ie. node, user, taxonomy).
- Methods (GET, POST, PATCH, PUT)
- Formats (json, xml...)
- Autentication (cookie, http_basic...)
Ideally each level should toggle automatically.
Comment #2
hypertext200@juampy, this is an interesting module that I can put my time in, So Methods, Formats etc are going to be global settings or individual setting those correspond to the Resources?. What do you mean by "Ideally each level should toggle automatically."?.
Comment #3
yoroy commentedOne approach could be
1. Have a page that only lists the resources but in two sections: enabled, disabled. Similar to the views overview
2. For each enabled resource have a dropbutton with links to Methods, Formats, Auth.
But looks like each resource has its own methods and each method has its own formats and each format has its own authentication?
Resource 1
- Format A
-- Authentication
- Format B
-- Authentication
Resource 2
- Format A
-- Auth
etc?
Comment #4
yoroy commentedComment #5
yoroy commentedtags
Comment #6
juampynr commentedEach resource AND HTTP method has its own formats and authentication providers.
Comment #7
juampynr commentedAt the end all this module does is to provide an interface for the settings of rest module. These are written at sites/default/files/config_somelongid/active/rest.settings.yml.
Here is an example of how it looks like. You can see the tree structure that I was trying to resemble in the UI:
Comment #8
capynet commentedHi, Here is a patch may help.
I've needed modify submit callback to work properly with the new changes.
Comment #9
juampynr commentedDefinitively an improvement. Thanks! I have committed it.
I started implementing a simpler approach that resembles the UI to administer Views (see admin/structure/views). Progress can be seen and contributed at branch 2065855-improve-ui.
Comment #10
juampynr commentedNow resources are listed as Views UI does it. Pending to add the status of each enabled resource and a select button with operations.
Here is the UI so far at branch 2065855-improve-ui:
Comment #11
juampynr commentedOperations are now listed. Pending to implement them. First I want to fix the Description column.
Comment #12
juampynr commentedAdded description column and implemented dummy handler for Enable/Disable operations.
Comment #13
juampynr commentedFixed.
Here are two attachments of how the new UI looks like.
List of all resources (enabled and then disabled). The Enabled ones have a description column:
And this is the edit page for an enabled resource (thanks @capynet for the tips on theming):