CESNET / liberouter-gui

8 stars 4 forks source link

Introduce better module system #17

Closed nerudaj closed 7 years ago

nerudaj commented 7 years ago

Liberouter-gui should only serve as a framework for creating various cesnet-related guis. Thus it should introduce a system that will allow users to install only guis they need (and develop their own) without greater knowledge of api configuration.

Probably the most user friendly system will be a bootstrap script within root modules folder that will take all the modules put there, inspect their python/angular dependencies (and generate proper dependencies files for api) create symlinks to api/liberouterapi/modules and www/src/app/modules and generate frontend module linking files.

This way, users will have to build their own production releases of the frontend (downside), but they'll have the advantage of fully customisable gui system. Official releases are still relevant, though, as they can distribute STaaS ready version of the system.

petrstehlik commented 7 years ago

Thanks for the suggestion.

There is a problem with symlinks in front-end since TypeScript's import statement can follow symlinks only one way (it will go to the module but then the relative and absolute path changes and cannot go back). This introduces a serious problem with importing anything related to Angular or other components.

Only viable solution would be to create a "build folder" where everything will be placed as it should be, built using ng and the generated front-end files moved to specified location.

This script is not needed right now and its development is aimed at the 1.0.0-RC.