praekelt/diamondash — pull request #74 by justinvdm (2013-10-07 14:10:42+00:00)
Title: Componentize dashboard and widget configuration

Currently, our dashboards and widgets are an uncomfortable combination of model-like parts interacting with graphite, view-like parts used for the presentation, and configuration parts relevant to both sides.

The ultimate goal is to move the dashboard and widget presentation completely client side (#67), so all the view logic will eventually move there, and the server side widget code will end up containing only the model logic. However, we generate dashboards and widgets from a config file, so there will still need to be view configuration on the server side.

Instead of parsing and holding this view configuration directly on the server-side models, things would be much cleaner and extendable if dashboards and widgets had a config component. This would move out all the view configuration out of the server-side models, and make populating the client-side models a matter of serializing each widget's config object.