It would be nice if a site would be made it's own entity type. This would provide several benefits and would make monitoring and reporting alot more flexible.

Some benefits that come to mind :

  • Fieldable - You could add any field you want to a site. If you would like to add a title field, image, owner, comments, relations etc, it's all supported (often) out of the box. You could even add different bundles for different kind of sites
  • Views Integration - you could easily create custom listings with own filters, sorting, layouts, exports etc.
  • Many more integrations with other modules (rules etc)
  • CRUD for creating and managing site entities
  • Entity access - you could give specific access to sites via contrib modules (OG, own sites only, workflow etc)
  • Much easier unit testing
  • This module would be easier to integrate in other sites (fe. commerce , aegir, ...)
  • ...

This would mean a major rewrite, but I think this would be an awesome improvement for a new branch.
What do you think?

Comments

malc0mn’s picture

You are talking about the production monitor module, right? There is an odd 6.x branch in which we once started a rewrite of prod_mon to make it more like the nodes module... Your proposal does indeed make a lot more sense in D7 and I can see all the benefits.

I'm just wondering what to do with the remote site data, like modules & performance data... Where would that go if 'site' was an entity...?

sanguis’s picture

I think I could convince my boss to sponsor my development of this feature if I could tell him that the patch I write would be accepted.

Otherwise I will just be writing some sort of Prod Check Monitor Site reference field would be in order.

sanguis’s picture

what I may do is start the entity controller class to work with your current schema as a separate module. I know its a bit wonkey. but its the way to go here

sanguis’s picture

I'm just wondering what to do with the remote site data, like modules & performance data... Where would that go if 'site' was an entity...?

I have been thinking about this, currently all the data is in one serialized array per site. while I see any blocker in continuing to store this data. It would make the data more accessible to searches via sql, there are some fields such as Drupal version the deserve their own fields.

Some the other categories, that basically could be split up using the current overview pages columns could deserve individual serialized array, blob columns.

This would ease the possibility of pulling just that fields data into a separate node and controlling the way its displayed using the entity field display api. (summery, boolean. detailed).

All this data would be read only of course, but it would make sub sets of if available for other entities to grab use.

I imagine the work flow for adding seo information to a customer node being like add prod_check_field_seo, and in the field configuration you select the site id to display. Or something like that.

Its a lot of work but a super flexible tool, als the work could be phased into releases.

Kirschbaum’s picture

I think the flexibility described in #4 would be great. Sanguis, let me know if I can help in any way to move this forward.

malc0mn’s picture

@sanguis: by all means go right ahead! Been thinking about this too for long, and site should simply be an entity in D7. It has just been ported 'as is' from Drupal 6 right now which is not the best way obviously ;-)

Edit: gave you git access. Please use the 7.x-1.x-dev branch!

malc0mn’s picture

Or: should we make a 7.x-2.x-dev for this? Would make sense as it's a big change...

sanguis’s picture

Thanks so much for the access!

Or: should we make a 7.x-2.x-dev for this? Would make sense as it's a big change...

I reckon your right 2.x is the way to go. I am going to brainstorm a bit about a feature road map.

malc0mn’s picture

7.x-2.x-dev created

Anybody’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Issue summary: View changes

Won't be fixed for 7.x anymore but we should check if this is already the case for 8.x! :)

Grevil’s picture

Status: Active » Closed (outdated)

Seems like this was implemented! Not as "Site" but instead as "Production Check". At least the "7.x-2.x-dev" was merged a while ago, so I think people forgot to close this issue!?