Avaiga / taipy-gui

Graphical User Interface generator for Taipy
Apache License 2.0
60 stars 20 forks source link

Add /status page #265

Closed florian-vuillemot closed 2 years ago

florian-vuillemot commented 2 years ago

What would that feature address Add monitoring facility for external tools as sonde. Calling "/" of an application can have side effects (computation, db connection, etc.).

Description of the ideal solution Application monitoring uses to call a "/static" page on an application to know if the application is still running. Information like "websocket are up" is a plus.

Caveats Users can want to provide other information on this page for internal needs. Taipy can not handle this custom behaviour but should allow users to do it. Ex: Ensure that my application can still communicate with an external tool.

Acceptance Criteria

FredLL-Avaiga commented 2 years ago

image.png

What do you think @florian-vuillemot ?

FredLL-Avaiga commented 2 years ago

After a enlightened comment from @FabienLelaquais the status.html page is now a status.json

{
  "backend_version": "1.2.0", 
  "flask_version": "2.1.0", 
  "frontend_version": "1.2.0", 
  "host": "127.0.0.1:5000", 
  "python_version": "3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)]", 
  "user_status": "on_status(state: State)"
}

Which is way better !

FredLL-Avaiga commented 2 years ago

URL is /taipy.status.json

FredLL-Avaiga commented 2 years ago

CVE informations are not shown by default @florian-vuillemot

FredLL-Avaiga commented 2 years ago

commanded by config extended_status: bool Default is;

{
  "gui": {
    "user_status": ""
  }
}

extended is:

{
  "gui": {
    "backend_version": "1.2.0", 
    "flask_version": "2.1.0", 
    "frontend_build_date": "2022-08-26T09:03:10.419Z", 
    "frontend_build_mode": "development", 
    "frontend_version": "1.2.0", 
    "host": "127.0.0.1:5000", 
    "python_version": "3.10.1 (tags/v3.10.1:2cd268a, Dec  6 2021, 19:10:37) [MSC v.1929 64 bit (AMD64)]",
    "user_status": "on_status(state: State)"
  }
}