| Summary: | New feature: "site definition" so that we can simulate a running web site | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Boris Bokowski <bokowski> | ||||||
| Component: | Client | Assignee: | Mark Macdonald <mamacdon> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | aniefer, christophe.cornu+eclipse, fg, john.arthorne, johnjbarton, mamacdon, susan | ||||||
| Version: | 0.2 | ||||||||
| Target Milestone: | 0.2 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||
| Whiteboard: | |||||||||
| Bug Depends on: | 334956 | ||||||||
| Bug Blocks: | |||||||||
| Attachments: |
|
||||||||
The headers for Firebug integration (see bug 334956) should be present for these sites, pointing back to the editable location of the resources. Mark, can you please find out if JavaScript developers are already using something like my "site definitions" from comment 0, for example in the context of JavaScript builds? How do they work if a single web site is authored using more than one "root folder" or "project"? If there is an established format that already exists, we should be using it. We have some code in org.eclipse.orion.server.launching that was working in M1 to host the site out of the same server. This code quickly became out of date when we started changing the workspace setup. This did have an attempt at defining which projects were present in the site along with what the roots in those projects were. I will dig up the old code and post something here. > Mark, can you please find out if JavaScript developers are already using
> something like my "site definitions" from comment 0, for example in the context
> of JavaScript builds? How do they work if a single web site is authored using
> more than one "root folder" or "project"? If there is an established format
> that already exists, we should be using it.
So far I haven't seen anything like this in the wild. JS developers seem to write project-specific scripts that copy their site files into an output location, but don't have a formal way of expressing that mapping.
Created attachment 190812 [details]
UI enhancements for edit-site page
Here's a patch that makes the following changes on the edit-site.html page:
1. Adds a dropdown list of suggestions (= folder/project names) to the "Add" button (e81985d)
2. Adds a column that, if an entry in the mapping table points to a workspace path, displays the workspace path in a readable way (ie. project name, not id).
(207ff18)
3. Makes the path from #2 into a clickable link so you can check if it really points to a valid location in your workspace. (c5fb00d)
Created attachment 190816 [details] patch, try #2 Since the original patch is not working, here's a squashed version of the same changes described in comment #4. Marking as fixed: this feature is in M6. |
I would like us to implement a way to define a "site" so that we can host it for the user rather than just files appearing under "/file". For example, I could be working on a couple of files for a website, under a directory "mywebsite". I'd want to be able to have the files under that directory hosted such that they appear at the root of the namespace. In this case my "site definition" could be something like: mysite = [{target: "/", source: "/mywebsite"}] Once you've defined a "site", Orion should be able to host it for you, either on a different port (http://localhost:8081/) or a different name for the same server (http://127.0.0.2:8080) or a subdomain assuming this is set up properly with DNS and wildcards (http://mysite.boris.orion.eclipse.org). If you allow more than one mapping from target to source per site definition, we could handle the self-hosting scenario as follows: selfhostingsite = [ {target: "/", source: "/org.eclipse.orion.client.core/static/"}, {target: "/editor", source: "/org.eclipse.orion.client.editor/web/"}, ... ]