Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Yuri created an issue. See original summary.

gboudrias’s picture

As I replied through email, go to the servers tab, click on the server you want to use, then look at the nid in the URL of the edit tab. We should change this to autocomplete soon-ish.

gboudrias’s picture

Title: How to get the 'nid of te db server to use' » Change settings fields to autocomplete for nids
Category: Support request » Feature request
gboudrias’s picture

Component: Documentation » Code
colan’s picture

Project: Aegir SaaS » Aegir Services
Version: 7.x-2.x-dev » 7.x-1.x-dev
Component: Code » Aegir SaaS
Assigned: Unassigned » colan

I'll be working on this shortly, but feel free to steal it from me if you/anyone feels like working on it ASAP.

colan’s picture

Version: 7.x-1.x-dev » 7.x-3.x-dev
colan’s picture

Title: Change settings fields to autocomplete for nids » Make settings fields user-friendly instead of requesting node IDs

Looking into this now.

Plan is to do the following:

  • Template site: autocomplete on site names
  • Database server: select menu on server names
  • Platform: select menu on platform names
colan’s picture

Here's some code for the first one. It requires the patch over at #2720439: Add site autocompletion & ID retrieval without loading nodes so hopefully that gets in soon.

The one strange thing I had to do was overload the "nid" argument in the service call. In this case, it takes a site name like blah.example.com as the template site instead of the template site's node ID.

This is better for 2 reasons:

  • The calling client site doesn't need to know anything about node IDs, just the name of the site it wishes to clone.
  • The Aegir admin doesn't need to know anything about node IDs when filling out the SaaS settings form, just the template site name (which now autocompletes).

I didn't commit this yet in case it's a problem for anyone; if we need to do this differently. And we should also wait for that other patch to get in.

I'll commit code for the other two items above after I get to them.

colan’s picture

Yuri’s picture

Issue summary: View changes
FileSize
31.7 KB

I applied both required patched mentioned above, cleared cache but don't see any difference in the pages, apart from that the node ID's of the template site and database server are not recognized (while they are present).

Yuri’s picture

Issue summary: View changes
colan’s picture

Status: Needs review » Needs work

The first field now accepts only a site name (e.g. foo.example.com). That's what this patch does. So you'll need to enter that instead of a nid.

I'm not sure about the second field. What's showing up in your logs?

This is going to be reworked a bit (i.e. using another helper function) given the necessary changes for #2720439: Add site autocompletion & ID retrieval without loading nodes.

colan’s picture

Here's an update with the latest patch from the other issue.

  • colan committed 147e6e2 on 7.x-3.x
    Issue #2712701 by colan: Have users select DB options for SaaS rather...
gboudrias’s picture

  • colan committed 8cc497d on 7.x-3.x
    Issue #2712701 by colan, gboudrias: Request the template site name...
colan’s picture

Committed the above as the other patch has been merged.

Here's the code for the platform selection, which depends on #2721949: Deprecate _hosting_get_enabled_platforms(). Would someone kindly review that one?

Once we get this last bit of code merged, we can close this issue.

colan’s picture

  • colan committed ee8eb24 on 7.x-3.x
    Issue #2712701 by colan: Provide select options for the SaaS platform...
colan’s picture

Status: Needs review » Fixed

Done!

Status: Fixed » Closed (fixed)

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