[CDF-374] - Reviewed server side code generation for storage, context an...

...d views. Currently achieved via ajax calls during the dashboard instance creation. Added unit tests for the refactored calls

@pamval please review