Closed (won't fix)
Project:
Hosting
Version:
6.x-0.4-alpha3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Jan 2010 at 17:07 UTC
Updated:
23 Aug 2012 at 16:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedWhat do you think of
Where nid = the site, rid = the nid of the 'parent' or 'related' site, and 'type' being what made the relationship (which would simply be the $task type.
Then we could do various sorts of mapping in Hosting so that it would display sensible information in the hook_view(), similar to how we map the site status from integers to proper wordings in hosting_site
You'd then be able to query this table via the appropriate API hook to determine whether to override the 'site already exists' restrictions.
Perhaps also a configurable setting in Clone along the lines of 'Allow cloned sites to be overwritten?' or something would be nice too.
Edit: sorry some of the above should've been posted to #699922: multiple clone support.
Comment #2
anarcat commentedSo yeah, that's basically the structure I had in mind. Feel free to start hacking at that if you feel like it. I wonder if there are existing modules that already do exactly that...
Comment #3
Anonymous (not verified) commentedhttp://drupal.org/project/noderelationships
We'd need to add CCK (and nodereference) and Views as dependencies, we have modalframe and jquery_ui already
Maybe nodereference would be enough already but not sure if we want to drag CCK into Aegir
Comment #4
Anonymous (not verified) commentedInitial dev branch has been pushed to g.a.o.
This is early days and entirely frontend. Features:
1) Tried to add as many API functions as I could think of that might be useful for future abstraction
2) Clone implements one of these functions to add a relationship between two sites in the drush post_ task
3) Site nodes have a MENU_LOCAL_TASK called 'Relationships' consisting of a table showing all existing relationships, making a distinction between where a site holds a 'parent' or 'child' relationship of the other. (i.e if Site B is a clone of Site A, Site A is thus the parent in the relationship). Screenshot attached
I added a _settings hook to Clone that simply provides a way to turn 'Overwrite' on or off, based on whether one should be able to overwrite a previous clone of the same name. But no logic to actually handle this exists in the backend yet. The clone form's hook_validate will need to check for this setting before complaining of a URL that already exists, and the backend will need to perform a provision-delete on a site before being able to restore from a tarball if the platform is the same target as the previous edition of the clone's.
Comment #5
adrian commentedthis doesn't have any interface for specifying the relationships as of yet.
I think we need to make the relationships meaninful to our users, for instance being able to say this site is the "live" or "qa" clone of a specific site, versus just saying it's cloned.
Comment #6
steven jones commentedThis may come about as a way to groups sites together so that you can know that one is the staging site of another etc, or that a certain platform is related to this other platform.
But, this really needs fields to shine, possibly relation module in D7, there's literally no point in adding our own DB tables these days.
I'm going to mark this as won't fix, mainly to clean up the issue queue. I think that something highly similar to what has been suggested here will get into the D7/8 version of Hostmaster though.
Comment #7
steven jones commented