Coudl this be a good candidate for hostmaster?
http://drupal.org/sandbox/millette/1515400

The SQL probably needs to be rewritten, it's not really my thing...

Thoughts?

Comments

omar’s picture

StatusFileSize
new34.69 KB

A piece of a screencapture ... A piece of a screen capture

omega8cc’s picture

Version: 6.x-1.6 » 6.x-1.x-dev

It looks great! But please follow Aegir standards and rename it to hosting_package_use.

Robin Millette’s picture

I didn't want to patch aegir right away, but my thought was this single nodeapi hook could probably live in another module, instead of living on its own, no?

I also added a couple issues to the sandbox: #1515540: Show only sites and platforms accessible by the user and #1515532: Pager not working.

anarcat’s picture

Status: Active » Needs work

I think this is a great candidate for core itself, i don't see why it should be a separate module. Please work on patching the existing core if you have time, that would be great!

The pager doesn't seem like a big deal, but this would be a blocker however: #1515540: Show only sites and platforms accessible by the user.

Thanks for your contribution!

Robin Millette’s picture

Great! Going to submit a patch soonish.

I would appreciate some direction with regards to #1515540: Show only sites and platforms accessible by the user. My use of aegir is very "one client" centric. Come to think of it, Client is actually a module that could be enabled or not. If you have any tips for me, please elaborate in #1515540: Show only sites and platforms accessible by the user. Just posting here to get your attention.

helmo’s picture

Great I would love to see this in Aegir.

This relates somewhat to: #1000368: Provide module version/install status across platforms

Robin Millette’s picture

I'm not currently working on this. If somebody wants to jump in, please!

helmo’s picture

Status: Needs work » Needs review
StatusFileSize
new2.62 KB

Here's a patch host hostmaster core.

* I've removed the ClientID column, as I don't really see a good use for it. Or it whould have to be turned into a nice link.
* Added a clear:both css style to prevent the list from overlapping with the task queue in Firefox.

helmo’s picture

Version: 6.x-1.x-dev » 6.x-2.x-dev

Setting the correct version branch

helmo’s picture

StatusFileSize
new2.66 KB

I've added an extra WHERE clause to the query.
It now filters out information about deleted sites.

One other thought is that maybe we should check hosting_platform_client_access. This could be done with the code below, but I doubt that a regular client would access this page.

LEFT JOIN {hosting_platform_client_access} pca ON n2.nid = pca.pid
LEFT JOIN {hosting_client_user} c ON c.client = pca.cid

and in the WHERE clause:
AND (c.user=%d OR pca.pid IS NULL)
helmo’s picture

One other nice to have, but way out of scope here, would be to have info on site specific packages in the hostmaster database. Currently only packages from the platform are loaded in the hostmaster database.

helmo’s picture

Tested with 6.x-2.0-alpha1, works OK.

omega8cc’s picture

Status: Needs review » Needs work
StatusFileSize
new181.92 KB

We are using it (the patch) in BOA for a long time already, however there is something to improve, I think, because it shows usage also for deleted sites - see the screenshot.

packages-aegir.jpg

omega8cc’s picture

Oh, maybe we are using that older patch then? I will check that again.

omega8cc’s picture

Status: Needs work » Reviewed & tested by the community

Of course we have applied that older patch, sorry for the noise!

It is RTBC already.

anarcat’s picture

Status: Reviewed & tested by the community » Needs work

patch doesn't apply anymore, sorry!

1 out of 1 hunk ignored -- saving rejects to file modules/hosting/hosting.css.rej
patching file modules/hosting/package/hosting_package.module
Hunk #1 FAILED at 325.
1 out of 1 hunk FAILED -- saving rejects to file modules/hosting/package/hosting_package.module.rej

@omega8 - can you pinpoint a commit or branch we can merge?

helmo’s picture

Status: Needs work » Reviewed & tested by the community

It seems to be just some lines that have shifted.
Patch -F1000 works wonders for these cases ;)

patch -p1 -F1000 < 1515416-10-package_usage_list.patch 
patching file modules/hosting/hosting.css
patching file modules/hosting/package/hosting_package.module
Hunk #1 succeeded at 325 with fuzz 3.
anarcat’s picture

Status: Reviewed & tested by the community » Fixed

aah the fuzz, i always forget about the fuzz. -F3 was enough, even ;)

thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

ergonlogic’s picture

Status: Closed (fixed) » Needs work

After the Views integration, I believe we have lost this functionality. Either way, we should look at re-implementing it in Views. Since we're already doing this for install profile packages, hopefully it won't be too difficult.

helmo’s picture

OK, so this if in package/hosting_package.module:284 just kills it:

  if (!$node->package_type == 'profile') {

It was probably intended as:

  if ($node->package_type != 'profile') {

The view hosting_site_list is also shown for both modules and profiles. But only shows something for profiles.
What I'm missing there though is the package version info. Do we have views integration for the package instances?

ref: #588728: Meta: Views integration redux

helmo’s picture

anarcat’s picture

Status: Needs work » Fixed

wait, that means we can close this issue already. :)

helmo’s picture

Status: Fixed » Needs work

No, sorry but #22 was extra. #20 and #21 are not resolved.

I think we need an extra view for this. One that takes a package as the basis, listing all sites that have the package enabled, with their respective version.

The current path: node/% (for packages)

deciphered’s picture

Project: Hostmaster (Aegir) » Hosting
Component: Code » Views integration
Assigned: Unassigned » deciphered

Will take a look at this issue tomorrow.

deciphered’s picture

helmo’s picture

StatusFileSize
new1.44 KB

Thanks.
I'd like to filter Disabled modules by default. This patch adds an exposed filter...

One strange thing... in views_handler_field_hosting_package_status.inc we render t('Enabled') : t('Disabled'). Where do we need to declare that to also have it for the exposed filter?

ergonlogic’s picture

Status: Needs review » Fixed

Fixed in dd1995c (hostmaster) and 4f6297b (hosting).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit e2b99d8 on 6.x-2.x, 7.x-3.x, dev-ssl-ip-allocation-refactor, dev-sni, dev-helmo-3.x by anarcat:
    Issue #1515416 by millette, helmo: Added On a package page, show table...
  • Commit 4f6297b on 6.x-2.x, 7.x-3.x, dev-ssl-ip-allocation-refactor, dev-sni, dev-helmo-3.x by ergonlogic:
    Issue #1515416 by ergonlogic, helmo, Deciphered: Replace listing of...

  • Commit e2b99d8 on 6.x-2.x, 7.x-3.x, dev-ssl-ip-allocation-refactor, dev-sni, dev-helmo-3.x by anarcat:
    Issue #1515416 by millette, helmo: Added On a package page, show table...
  • Commit 4f6297b on 6.x-2.x, 7.x-3.x, dev-ssl-ip-allocation-refactor, dev-sni, dev-helmo-3.x by ergonlogic:
    Issue #1515416 by ergonlogic, helmo, Deciphered: Replace listing of...