gobbledy-gook / report.ai

A Chrome Extension to page rating, summary and reviewing
MIT License
8 stars 9 forks source link

Server status display #23

Closed AnsahMohammad closed 1 year ago

AnsahMohammad commented 1 year ago

Add a small server status icon in the index.html, something like : green - Server online orange - Connecting (default) red - Server connection failed

Rough implementation idea: Send an API request to the server, if the server returns True, display green, if no response display red.

farhadjaman commented 1 year ago

Kindly assign the mentioned issue to me as I am interested and well-equipped to work on it.

gobbledy-gook commented 1 year ago

@farhadjaman assigned you to this issue. You can start working on it. Let us know if you find any problem.

AnsahMohammad commented 1 year ago

@farhadjaman can you confirm if you have already started working on this?

Extra context: The status icon was added in merge #26 , You just need to add an API handler in the server.py

gobbledy-gook commented 1 year ago

@farhadjaman it is always a best practice to update about your progress or problems you are facing so that we can help at our best !

farhadjaman commented 1 year ago

I have started working on the issue. Thanks for letting me know.I will let you know if I face any problem

farhadjaman commented 1 year ago

@AnsahMohammad have you already solved the issue?

AnsahMohammad commented 1 year ago

No, you can continue your work

farhadjaman commented 1 year ago

@AnsahMohammad Could you please provide further details on the specific location within the index.html file where the red or green signal should be added? Additionally, I would appreciate clarification on whether there is a specific API address to which the request should be sent, or if it is acceptable to send it to the default API at "http://127.0.0.1:5000/."

AnsahMohammad commented 1 year ago

There's already a dummy green button added in the UI (div connectionStatus)

You can just make a script in popup.js, which will route to "localhost:5000/healthcheck" as you can see healthcheck always returns a 200 OK in the server.

farhadjaman commented 1 year ago

@AnsahMohammad thank you sir,got it!

farhadjaman commented 1 year ago

@gobbledy-gook i have made a pull request regarding the issue. Would you kindly review it?Thank you.