FlowFuse / flowfuse

Connect, collect, transform, visualise, and interact with your Industrial Data in a single platform. Use FlowFuse to manage, scale and secure your Node-RED solutions.
https://flowfuse.com
Other
269 stars 63 forks source link

Custom 503 Page #892

Open sammachin opened 2 years ago

sammachin commented 2 years ago

Description

If a project is not running flowforge returns a 503 response. Currently this is a generic server page, and is only seen in the short window when a project re updated such as a stack change.

With the introduction of suspended projects #377 this will be the response that is sent for a project that has been suspended, as such we should have something branded and explanatory with a link to flowforge.com

Suggested Copy: This project is not currently running, login to your FlowForge application and check the status of the project, or contact the owner

Project UI should be fully stand alone and is not part of either the forge application or the website.

Epic/Story

No response

ArshErgon commented 2 years ago

I think vue-route will help here, we can create a custom 503 page or for future we can also 404 page, and we can redirect the user to our custom page, something like this

if (response.status == 503) {
   return custom_503_handler

but can recreate 503 error in development?

hardillb commented 2 years ago

@ArshErgon This is not for the Forge App, this is for the individual FF Projects (instances of Node-RED). This can not be fixed in the Vue code, it needs to be handled by the reverse proxy that routes to them on the Docker and K8s versions of the platform.

hardillb commented 2 years ago

Struggling with this one at the moment.

I've found something that looks like it might work with the nginx ingress controller (https://kubernetes.github.io/ingress-nginx/examples/customization/custom-errors/) but that won't work on AWS because that uses the AWS ALB ingress controller.

It feels like there should be an annotation but I can't find one in the docs, https://kubernetes-sigs.github.io/aws-load-balancer-controller/v2.4/guide/ingress/annotations/#actions looked promising but that looks to only override the normal response from the project.

hardillb commented 2 years ago

Will document how to do this with NGIX and try and find some help at the Kubehuddle for AWS

hardillb commented 1 year ago

https://serverfault.com/questions/1011312/overriding-aws-albs-default-error-pages-with-custom-ones-using-cloudfront

No answer after 2 years is not promising

ZJvandeWeg commented 1 year ago

@hardillb Should we move this issue back to the backlog?

hardillb commented 1 year ago

@ZJvandeWeg yes

hardillb commented 1 year ago

This will also get much easier to do if we move to nginx ingres from AWS ALB ingress