-
Notifications
You must be signed in to change notification settings - Fork 130
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
Major web interface rehaul #489
Conversation
You can test out the web interface by setting the following in your ini file: html_alias2_ia5=<ia7 directory>
In order to call the header routine from none server-side include pages, header needs to be in code.
I left the images here right now, these can be converted to buttons later, but I thought maybe Audrey users would prefer that these not change?
XML work can likely be expanded for use on many web functions.
Remove BrowseMisterHouse page, it is not needed. Move all JS code to ia7_utils, create more JS for listing categories
New routine returns all print log messages that have occurred since time. Added support to JSON and XML servers to serve print_log messages
It works, and seems to work well. This is pretty cool.
The commit describing the line when added state: ``` Fix to make JSOn vars return without $, %, @ or & Fix to call vars by name e.g. Time_Now instead of $Time_Now ``` This line seems way overbroad to fix the issue described. The line was replacing percent signs within voice commands, resulting in an invalid voice command. Commenting out the line seems to have no effect on any other aspect of the code. calling json(vars) produces variable names without any $ signs, similarly calling json(subs) does not produce any & signs.
Move large global replacement so that it affects keys not values. Allows for values to contain protected entities such as in a voice command (e.g. 20%)
I didn't realize a JSON server existed in MH. JSON has less overhead and is generally easier to deal with.
Attempt to move as much as possible into JavaScript
Similar to a frame concept that was used in ia5. Partially necessary if we want to have a breadcrumb like navigation. Makes adding new pages a little easier since only need to program the <div></div> content and not a whole page.
In the prior schema the same data could appear in different locations depending on the request made. For example, the same object may have been listed under objects->myobject and groups->main->myobject This rewrite attempts to restrict data to a single location. Objects always appear under the object path. The goal was to start migrating towards a RESTful design. Certain special paths exist for listing a list of unique values. These include groups, categories, and types. There was no code inside MH that relied on the JSON server, so this change should not cause drastic problems. I apologize to those users who have user_code specifically relying on the old schema.
The prior code was returning both the new lines and the most recent previous line.
Get type is a simple function that returns the object type. Object types will serve an important function in the next web interface. Get type is included in the Generic Item package, but a few packages do not inherit from Generic Item, so they need their own functions.
Seemed out of place as a perl file in the web directory. In the future, user can add (likely with the help of the interace) their own collections.json file in their user data directory to overide or change the collections.
Changed the JSON Schema so that data is not duplicated in multiple locations. This make parsing on the front end side much easier. Use the new collections.json file Move Categories and Types into the object path. Make "fake" objects for each category and type. Again this makes parsing on the frontend much easier. Condense all variables to reside within vars path. Add parents and members fields to objects Store JSON complete JSON data on the frontend Perform various fixes and changes.
Idle times are only reported by seconds, so we need to round the current and requested time to seconds in order to avoid detecting mulitple idendical changes in the first 0-second.
Insert Rough UI for sortable interface Move sort logic into its own function so that it can be reused.
…PUT Requests Using the /SUB?json() url is both confusing, unfriendly to developers, and would require lots of JSON specific code to be incorporated into the http_server Add a number of global variables to HTTP server, allows for processing of HTTP vars by subroutines in other packages. Could help simplify the http server
It Works! At the moment, the only thing we are prepared to handle is Sort_Order. Although other methods can likely be added very easily too, including 'set'
- added print_speaklog* routines to mh, json & xml servers - layout fixes - added in advanced/simple functionality - some random bugfixes
Just a basic question: would there be a way to give certain objects a 'nice' name to be displayed in the web interface? The iphone interface has this (you could call $object->set_label("Nice name")). |
I currently have no time to submit a patch, but I notice the link to the wiki still points to the wikispace wiki. Something that needs fixing (and that is possibly not only for ia7). |
…ak_Log_Time doesn't work.
Big kludge to get print_speaklog to work
Yes, you can give things nice names using the set_label command. |
I'll fix the wiki link, and add instructions on how to use the interface |
Hey @hplato thanks for the feedback and the fix. Would it be OK for you to already merge this version into master? |
yes is there anything I need to do?
|
No, merge is done. If you add other commits to this branch they should show up here for further merging. Regards! |
Sounds good. Thanks Lieven. Sent from my mobile device.
|
Rehaul of the web interface. Let's make it look like it's 2015!