Skip to content
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

Introduced new ui.start bundle, which brings custom lifecycle status … #419

Merged
merged 3 commits into from
Oct 31, 2018

Conversation

kaikreuzer
Copy link
Member

…HTTP pages as well as an 404 error page.

With this PR, openHAB will now show the following page (on any url) during startup as long as the dashboard is not yet available:

bildschirmfoto 2018-10-30 um 00 00 06

Once the system is up and running, any non-existent page will result in a 404:

bildschirmfoto 2018-10-29 um 23 59 36

This are first small steps to come towards eclipse-archived/smarthome#1896 and I think this alone is already quite useful.

Signed-off-by: Kai Kreuzer [email protected]

…HTTP pages as well as an 404 error page.

Signed-off-by: Kai Kreuzer <[email protected]>
Signed-off-by: Kai Kreuzer <[email protected]>
@kaikreuzer kaikreuzer requested a review from martinvw October 30, 2018 13:09
Copy link
Member

@martinvw martinvw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaikreuzer thanks for picking this up, sounds like it could make it way more intuitive.

try {
pageStatus = IOUtils.toString(status.openStream());
} catch (IOException e) {
throw new RuntimeException(e);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Imho, the code could benefit a lot from a better separation between the error handling and the logic, what about not catching this error and marking the method to throw an IOException? If that is allowed otherwise splitting of some methods could be beneficial?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the activation of the component, so we cannot declare catched exceptions.
And these errors really mean that the component isn't usable, so I think this should happen in here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe splitting up the method could help but, but if at least the exceptions are cleaned 👍

Signed-off-by: Kai Kreuzer <[email protected]>
@kaikreuzer
Copy link
Member Author

@martinvw Thanks for your review, all comments should be addressed!

@martinvw
Copy link
Member

Maybe you should await the builds, I'll be offline :-)

@kaikreuzer
Copy link
Member Author

Maybe you should await the builds, I'll be offline :-)

I understand that I should do the merge as the build is green as you cannot do it yourself - I hope this is what you meant ;-)

@kaikreuzer kaikreuzer merged commit 39f0e17 into openhab:master Oct 31, 2018
@kaikreuzer kaikreuzer deleted the startup branch October 31, 2018 08:16
@martinvw martinvw added this to the 2.4 milestone Dec 9, 2018
splatch pushed a commit to ConnectorIO/copybara-hab-core that referenced this pull request Jul 11, 2023
openhab#419)

* Introduced new ui.start bundle, which brings custom lifecycle status HTTP pages as well as an 404 error page.

Signed-off-by: Kai Kreuzer <[email protected]>
GitOrigin-RevId: 39f0e17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants