Hi all,
I'm attaching a patch for #1529, getting PoolsController#show to work with the new UI.
I haven't applied the Wonder Twins' styling; my understanding is that this will be
done as a separate step. Please let me know if this is incorrect and I'm submitting
something hideously ugly that's not supposed to be.
I also have some scattered musings/questions about this below:
- There are a few components I haven't implemented because I don't believe
they're ready / in scope yet. Namely, the "Alerts" section of the page and
the Deployments / History / Properties / Permission line, including the buttons to the
right of those tabs.
- Is there an existing implementation of switching between 'filter' and
'pretty' views? I suspect that multiple tasks are going to involve doing this, and
want to make sure I'm not reinventing the wheel.
- I added a "statistics" method to pools, returning the data required for the
partial at top. (Except for Alerts, Updates, and Quota, which I don't believe are
ready to be implemented.) You'll note that I have it in a commented-out
Rails.cache.fetch block. If uncommented, it'll store the result in local memory. (We
don't need to pull in memcache this way.) It's commented out right now because
it'll take some work to make sure we invalidate it properly, and I wanted someone else
to sanity-check this idea before I implemented it. The Rails logs indicate that the
queries for this section takes about 25ms; this isn't a crazy amount of time, but I
suspect these sections will start to add up.
- A few sections seem to imply that we care about the state/status of a deployment, but
the code has no such concept just yet. Instances have a state, but their deployments do
not. Retrieving it through the association implies that we cannot (easily, at least) sort
or filter on deployment state. It's also unclear to me what the state of a deployment
would be if it had multiple instances in different states. Has someone already figured
this out?
- You may note some deep associations being used, like
"deployment.realm.provider.provider_type.name". I tried to add a few
associations where they made sense, but it wouldn't hurt for someone to give a little
extra scrutiny to make sure I didn't do anything too foolish.
-- Matt