This branch fixes a number of issues relating to the new single-page client, mostly having to do with how data loads. It also fixes:
1) ISO8601 format for updated_at times
2) Uses a single route to capture view routes instead of naming them explicitly server-side. The Routes global object is amended to be generated both via the bin/timur create_routes command and by the timur_router module, using both server-side and client-side routes.
3) Non-existent routes are caught by the JS client instead of being trapped by the server (as previously).
Relating to the main issue, the data loading for the Browser component is amended to reflect the various possible states of data loading necessary to render the Browser - a view object, a model and record name, a tab name taken from the view, and Magma data appropriate to that tab.
This loading logic is quite obtuse, is tightly coupled to the Browser component itself, and seems brittle in general; it seems a good target for reform in the future, but pending changes such as #221 I have left it more-or-less as is.
The Browser also currently re-loads ALL plots and manifests whenever it mounts. This is expensive and wasteful; instead it should only load whatever plots are required for the current tab to render. This also should be reformed following #221 and #214. A better methodology would collect loading requirements from each attribute to be loaded (e.g. a plot, some magma data, etc.) rather than loading magma data on tab load and shoveling all plots into the store.
This branch fixes a number of issues relating to the new single-page client, mostly having to do with how data loads. It also fixes:
1) ISO8601 format for updated_at times 2) Uses a single route to capture view routes instead of naming them explicitly server-side. The Routes global object is amended to be generated both via the bin/timur create_routes command and by the timur_router module, using both server-side and client-side routes. 3) Non-existent routes are caught by the JS client instead of being trapped by the server (as previously).
Relating to the main issue, the data loading for the Browser component is amended to reflect the various possible states of data loading necessary to render the Browser - a view object, a model and record name, a tab name taken from the view, and Magma data appropriate to that tab.
This loading logic is quite obtuse, is tightly coupled to the Browser component itself, and seems brittle in general; it seems a good target for reform in the future, but pending changes such as #221 I have left it more-or-less as is.
The Browser also currently re-loads ALL plots and manifests whenever it mounts. This is expensive and wasteful; instead it should only load whatever plots are required for the current tab to render. This also should be reformed following #221 and #214. A better methodology would collect loading requirements from each attribute to be loaded (e.g. a plot, some magma data, etc.) rather than loading magma data on tab load and shoveling all plots into the store.