-
-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce web administration #1425
Conversation
We'll review first then when done decide on this.
We want you to provide BATS test cases for all major functions but as you're not really providing the functionality itself (but just the interface on top) I'd say in the first place all we need is a test case that installs your extension and does some basic verification it is working properly. This could run e.g. a web request to install (but not run) a specific OH version. |
Signed-off-by: root <[email protected]>
Signed-off-by: root <[email protected]>
Signed-off-by: root <[email protected]>
@mstormi thanks for the feedback. I was able to create a bats file. Unfortunately I can’t run a full test. First I wrote a bats file which made some web calls to ensure that the services are up and responding. But this is not possible inside the docker container. The problem is caused by the cockpit service. This can not start inside the docker due to the following error:
I made some research and found out that the cockpit can not run inside a container. If you want this to run as container you can download a special designed container from cockpit-project. But you can run the normal service inside the container. So I think a full functionality test can not be performed. However I managed to create a bats file which checks if the cockpit.socks and cockpit.service are at least loaded by systemctl (not active). So I can ensure that the apt package installation was successfully. Then I check if the html files in the web folder are all there. And I verify if the scripts that are called by the webservice have the required executable permission. I'm not happy with this test because I would like to make some wget calls to the webservice but due to the described issue this can not be done on the docker test system. A normal installation with openhabian-cli and also by calling the function directly is possible. I tested this on 3 systems. Maybe you know this issues from other tests and have some hint how to handle this on tests? There is some other point I noticed during my tests. If you install the FIND 3 application with openhabian-config it will call a function |
@ecdye this is a good question. I'm not sure what would be the best way and I'm totally open for ideas here. At the beginning I had this in my own repository but as mstormi and also rkoshak mentioned in the community topic it should be included in openhabian. Just for clarification I only added the openhabian addon for cockpit to this repository. The main application is installed via apt install from debian backports repository in any case so the size of this repo should not grow dramatically ;) |
@flo-mic I am sorry to ask this, but can you rebase this on the main branch. We have just switched away from using master and it will only be used for legacy updates. |
Did you run another Docker container or reused any of those openHABian runs at build time ? |
@ecdye are you (still) reviewing this ? FWIW I've just stumbled across the "Blame" feature of GitHub: it's a button at the top when you display a file in a repo and tells you per-line who changed it last i.e. who to blame for it :) |
Not really, as I was hoping that @flo-mic would be able to rebase on main because we aren't really making feature changes to OH 2 any more. FYI Blame has been around for a long time. |
@flo-mic sis you notice the request to rebase? |
@flo-mic any particular reason you closed this ? |
As discussed with @mstormi in this topic I'm currently working on a web administration for openHABian to allow users the control of their system from any web browser.
The baseline for this web application dashboard is the cockpit-project. It is a web administration platform for linux systems. It offers great features like network administration, update management, system overview and a web-based terminal.
I build an application that is integrated in the cockpit-project web application and extends it for openHABian related features. At the moment the application can not provide the full functionality of the CLI. But this ist just a first starting point. I playn to integrate all features of the CLI from time to time.
The following features are included for the beginning:
I added this application to the openhabian-cli menu under "optional components". A new point 2C was added.
I also updated the openhabian_update() function. It will now call a function openhabian_dashboard_update(). This function will copy the related html files if the dashboard application is installed.
I was not adding this to the default installation routine called by openhabian-setup.sh. I'm not sure if this should be included in the default setup or not?
For now I was not creating any test files du to my inexperience. I defeinitely need some information where test files are needed and how to make them. I have no experience here but I'm willing to learn ;)
If there is anything I did wrong in relation to code styling please let me know and I will fix it.
Signed-off-by: Florian Michel [email protected]