Hi all, Gadgets developed for analytics products (E.g ESB, IS,MB, IoTs etc) depend on JS libraries which are currently been referred from multiple locations.
For instance 1. JS utilities common to all gadgets like wso2gadgets.js and chart-utils.js (Currently referred from /portal/libs/common-chart-libs) 2. JS libraries used by chart template authors (related to gadget wizard). E.g VizGrammar, Vega etc (Currently referred from gadget level js folder) Since above JS libraries do tasks specific to analytics (E.g mostly for data visualization), it is better to maintain them in a analytics repository like carbon-analytics-common. Advantage is that a simple change in those JS files will not require a new carbon-dashboards release. Another issue is when generating a gadget, libraries like VizGrammar are packed with each gadget. If there are considerable amount of gadget's exist, it is quite difficult to propagate a library change across all gadgets. So as a solution, we came up like this. 1. There's a feature [1] in carbon-analytics-common to put all analytics UX related artifcats such as chart templates and data providers. We can have a room for JS files as well. 2. All analytics related JS files will be maintained inside [1] and analytics folks will have total control over them. 3. When building an analytics product, required analytics JS files will be copied to /portal/libs/analytics-wso2_1.0 folder (Can be instructed in p2.inf file of feature [1]). 4. Gadgets generated using wizard will refer JS files from above location so that change in one file will be reflected in every generated gadget. E.g /portal/libs/analytics-wso2_1.0/VizGrammar.min.js By this way, carbon-dashboards repo will no longer needing to maintain any analytics specific JS files. @DS Team, @Dakshika can we have your feedback on this please? Suggest a naming standard if possible. [1] https://github.com/wso2/carbon-analytics-common/tree/master/features/analytics-gadget-templates Regards, Dunith Dhanushka, Associate Technical Lead WSO2 Inc, Mobile - +94 71 8615744 Blog - *https://medium.com/@dunithd <https://medium.com/@dunithd>* Twitter - @dunithd <http://twitter.com/dunithd>
_______________________________________________ Architecture mailing list [email protected] https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
