Closed ladventure closed 8 years ago
I would recommend creating a fresh hawtio project following the 'getting started' guide on this page:
http://hawt.io/overview/index.html
I'd maybe suggest typescript, but javascript would work as well. You can then bring in hawtio-kubernetes as a bower dependency via:
bower install --save hawtio-kubernetes
If you use typescript you can add a line to plugins/includes.ts to include all the hawtio-kubernetes definitions in your own plugin if you need to re-use some of the API. Also the slush generator gives you a simple example plugin to start from with a couple pages.
In terms of the code structure we organize hawtio project code by plugin. So all the typescript goes in plugins/
The generated slush project compiles all the code for your plugin into 'dist'. If you want to say create a full site say to put in a .war file I can point you to an example, I tend to copy functions over as needed between projects:
https://github.com/hawtio/hawtio-java/blob/master/hawtio-console-assembly/gulpfile.js#L286-348
Also if it's something you think would be useful for other folks, feel free to open a PR, we love contributions!
Thank you very much!
@ladventure hope this is all set, closing for now, re-open or create another issue if you've more questions.
I want to change the page and add some new functions for me .But I don't know the structure of code ,can you tell me ?
Thanks!