Skip to content

Commit

Permalink
Info for Translation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tfloow committed Feb 4, 2024
1 parent 6e7fa9f commit 5fc23ef
Show file tree
Hide file tree
Showing 54 changed files with 148 additions and 36 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,10 @@ pyrightconfig.json
# End of https://www.toptal.com/developers/gitignore/api/python,flask,web

tmp.py
*.log
*.log

# VENV
venv
Scripts
Include
pyvenv.cfg
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- [Roadmap](#roadmap)
- [API](#api)
- [Documentation](#documentation)
- [Translation](#translation)
- [License](#license)

Test the app [here](https://uclouvaindown-ed3979a045e6.herokuapp.com/)
Expand All @@ -20,7 +21,7 @@ You can find the list of all currently track services in this [json](services.js

## How does it work ?

![Homepage](doc/img/image.png)![Alt text](image.png)
![Homepage](doc/img/image.png)

Here is the control panel where every website is displayed.

Expand All @@ -32,23 +33,23 @@ I am tracking and storing the last status in the JSON and only doing request eve

## How to run it ?

First, make sure to get the latest version of python (I am using 3.12). then follow these steps:
First, you need to use **python 3.11** version (we suggest you to use a virtual environnement).

1. `git clone [email protected]:Tfloow/UCLouvainDown.git` (*or fork it*)
2. `pip install -r requirements.txt`
3. `flask run --host=0.0.0.0`
3. `python app.py`

### Explanation of the steps

1. Clone the repo so you can get the code
2. In the main directory, install all needed dependencies and the correct version without hassle in one command
3. Run the app. It will host locally on your pc and you can access it through other devices connected on the same network as your pc
3. Run the app. It will host locally on your pc.c

## Roadmap

- [x] Working pages
- [x] Home Page with links to other sub-pages
- [ ] A nice and clear home page with all current status
- [x] A nice and clear home page with all current status
- [x] Deployed locally
- [x] Deployed globally
- [x] Tracking downtime
Expand All @@ -58,14 +59,20 @@ First, make sure to get the latest version of python (I am using 3.12). then fol

### API

- [ ] Integrate a Fast API
- [ ] Support for webhook
- [x] Integrate a Fast API
- [x] Support for webhook
- [ ] RSS

## Documentation

You can find the documentation and have a better understanding of what is going under the hood by reading [this](doc/doc.md). (*Please, open an issue with the tag "doc" to add any comments or when you need more information about a specific point of the doc*).

## Translation

This website is currently translated in English and French. We welcome any new translations !

Check [this document](/translations/contribue.md) to see how you can contribute to the project.

## License

This work is protected under the [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/). For the favicon, I used the UCLouvain's logo and 2 images that doesn't belong to me but to their rightful owner (*Check compliance with the license*).
6 changes: 5 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ def get_locale():
async def index():
"""Render homepage, with an overview of all services."""
logger.info(f"[LOG]: HTTP request for homepage")
return render_template("index.html", serviceList=all_service_details().root.values(), get_locale=get_locale())
language = {}
language["list"] = LANGUAGES
language["user"] = get_locale()

return render_template("index.html", serviceList=all_service_details().root.values(), language=language)

@app.route("/language")
def languageChange():
Expand Down
1 change: 1 addition & 0 deletions data/404-Test/log.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ date,UP
2024-01-25T02:21:35,True
2024-01-25T02:21:35,True
2024-01-25T02:31:35,True
2024-02-04T08:47:30,False
1 change: 1 addition & 0 deletions data/404-Test/outageReport.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ date,UP
2024-02-03T22:12:39,False
2024-02-03T22:12:39,False
2024-02-03T22:17:39,False
2024-02-04T08:50:42,False
1 change: 1 addition & 0 deletions data/ADE-Scheduler/outageReport.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ date,UP
2024-02-03T22:12:40,True
2024-02-03T22:12:40,True
2024-02-03T22:17:40,True
2024-02-04T08:51:05,True
3 changes: 3 additions & 0 deletions data/ADE/log.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@ date,UP
2024-01-25T02:21:35,True
2024-01-25T02:21:35,True
2024-01-25T02:31:35,True
2024-02-04T08:44:50,True
2024-02-04T08:45:43,True
2024-02-04T08:45:47,True
1 change: 1 addition & 0 deletions data/ADE/outageReport.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ date,UP
2024-02-03T22:12:40,True
2024-02-03T22:12:40,True
2024-02-03T22:17:40,True
2024-02-04T08:50:43,True
1 change: 1 addition & 0 deletions data/Comproved/outageReport.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ date,UP
2024-02-03T22:12:40,True
2024-02-03T22:12:40,True
2024-02-03T22:17:41,True
2024-02-04T08:51:06,True
1 change: 1 addition & 0 deletions data/Gradescope/outageReport.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ date,UP
2024-02-03T22:12:41,True
2024-02-03T22:12:41,True
2024-02-03T22:17:41,True
2024-02-04T08:51:07,True
1 change: 1 addition & 0 deletions data/IDP-Logging/outageReport.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ date,UP
2024-02-03T22:12:45,True
2024-02-03T22:12:45,True
2024-02-03T22:17:45,True
2024-02-04T08:51:14,True
1 change: 1 addition & 0 deletions data/Inginious/outageReport.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ date,UP
2024-02-03T22:12:43,True
2024-02-03T22:12:43,True
2024-02-03T22:17:43,True
2024-02-04T08:51:11,True
1 change: 1 addition & 0 deletions data/Intranet/outageReport.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ date,UP
2024-02-03T22:12:42,True
2024-02-03T22:12:42,True
2024-02-03T22:17:42,True
2024-02-04T08:51:08,True
1 change: 1 addition & 0 deletions data/LEPL1104/outageReport.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ date,UP
2024-02-03T22:12:44,True
2024-02-03T22:12:44,True
2024-02-03T22:17:44,True
2024-02-04T08:51:13,True
1 change: 1 addition & 0 deletions data/LEPL1201/outageReport.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ date,UP
2024-02-03T22:12:44,True
2024-02-03T22:12:44,True
2024-02-03T22:17:45,True
2024-02-04T08:51:14,True
1 change: 1 addition & 0 deletions data/Moodle/outageReport.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ date,UP
2024-02-03T22:12:42,True
2024-02-03T22:12:42,True
2024-02-03T22:17:42,True
2024-02-04T08:51:09,True
1 change: 1 addition & 0 deletions data/UCLSport/outageReport.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ date,UP
2024-02-03T22:12:44,True
2024-02-03T22:12:44,True
2024-02-03T22:17:44,True
2024-02-04T08:51:13,True
1 change: 1 addition & 0 deletions data/UCLouvain/outageReport.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ date,UP
2024-02-03T22:12:43,True
2024-02-03T22:12:43,True
2024-02-03T22:17:43,True
2024-02-04T08:51:10,True
1 change: 1 addition & 0 deletions data/UDS/outageReport.csv
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ date,UP
2024-02-03T22:12:43,True
2024-02-03T22:12:43,True
2024-02-03T22:17:44,True
2024-02-04T08:51:12,True
28 changes: 14 additions & 14 deletions services.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,111 +3,111 @@
"name": "404-Test",
"url": "https://www.google.com/404",
"is_up": false,
"last_checked": "2024-02-03T17:16:15.871368",
"last_checked": "2024-02-04T08:50:42.733091",
"is_up_user": true,
"last_user_report": "2024-01-25T13:39:26.809039"
},
"ADE": {
"name": "ADE",
"url": "https://horaire.uclouvain.be/direct/",
"is_up": true,
"last_checked": "2024-02-03T17:16:19.158669",
"last_checked": "2024-02-04T08:50:43.914754",
"is_up_user": true,
"last_user_report": "2024-01-25T13:39:26.809039"
},
"ADE-Scheduler": {
"name": "ADE-Scheduler",
"url": "https://ade-scheduler.info.ucl.ac.be/calendar/",
"is_up": true,
"last_checked": "2024-02-03T17:16:23.068265",
"last_checked": "2024-02-04T08:51:05.707059",
"is_up_user": true,
"last_user_report": "2024-01-25T13:39:26.809039"
},
"Comproved": {
"name": "Comproved",
"url": "https://app.comproved.com/universite-de-louvain",
"is_up": true,
"last_checked": "2024-02-03T17:16:29.421694",
"last_checked": "2024-02-04T08:51:06.562636",
"is_up_user": true,
"last_user_report": "2024-01-25T13:39:26.809039"
},
"Gradescope": {
"name": "Gradescope",
"url": "https://www.gradescope.com/",
"is_up": true,
"last_checked": "2024-02-03T17:16:45.977483",
"last_checked": "2024-02-04T08:51:07.465749",
"is_up_user": true,
"last_user_report": "2024-01-25T13:39:26.809039"
},
"Intranet": {
"name": "Intranet",
"url": "https://intranet.uclouvain.be",
"is_up": true,
"last_checked": "2024-02-03T17:17:04.985193",
"last_checked": "2024-02-04T08:51:08.881284",
"is_up_user": true,
"last_user_report": "2024-01-25T13:39:26.809039"
},
"Moodle": {
"name": "Moodle",
"url": "https://moodle.uclouvain.be/",
"is_up": true,
"last_checked": "2024-02-03T17:17:07.642464",
"last_checked": "2024-02-04T08:51:09.637473",
"is_up_user": true,
"last_user_report": "2024-01-25T13:39:26.809039"
},
"UCLouvain": {
"name": "UCLouvain",
"url": "https://www.uclouvain.be/",
"is_up": true,
"last_checked": "2024-02-03T17:17:16.113592",
"last_checked": "2024-02-04T08:51:10.864431",
"is_up_user": true,
"last_user_report": "2024-01-25T13:39:26.809039"
},
"Inginious": {
"name": "Inginious",
"url": "https://inginious.info.ucl.ac.be/",
"is_up": true,
"last_checked": "2024-02-03T17:17:21.027127",
"last_checked": "2024-02-04T08:51:11.622933",
"is_up_user": true,
"last_user_report": "2024-01-25T13:39:26.809039"
},
"UDS": {
"name": "UDS",
"url": "https://uds.siws.ucl.ac.be/",
"is_up": true,
"last_checked": "2024-02-03T17:17:30.202910",
"last_checked": "2024-02-04T08:51:12.366077",
"is_up_user": true,
"last_user_report": "2024-01-25T13:39:26.809039"
},
"UCLSport": {
"name": "UCLSport",
"url": "https://sites.uclouvain.be/uclsport/",
"is_up": true,
"last_checked": "2024-01-29T19:43:38.161265",
"last_checked": "2024-02-04T08:51:13.106808",
"is_up_user": true,
"last_user_report": "2024-01-25T13:39:26.809039"
},
"LEPL1104": {
"name": "LEPL1104",
"url": "https://perso.uclouvain.be/vincent.legat/zouLab/epl1104.php",
"is_up": true,
"last_checked": "2024-01-29T19:43:39.924340",
"last_checked": "2024-02-04T08:51:13.865744",
"is_up_user": true,
"last_user_report": "2024-01-25T13:39:26.809039"
},
"LEPL1201": {
"name": "LEPL1201",
"url": "https://perso.uclouvain.be/vincent.legat/zouLab/epl1201.php",
"is_up": true,
"last_checked": "2024-01-29T19:43:41.450161",
"last_checked": "2024-02-04T08:51:14.639822",
"is_up_user": true,
"last_user_report": "2024-01-25T13:39:26.809039"
},
"IDP-Logging": {
"name": "IDP-Logging",
"url": "https://idp.uclouvain.be",
"is_up": true,
"last_checked": "2024-01-29T19:43:42.037906",
"last_checked": "2024-02-04T08:51:14.849874",
"is_up_user": true,
"last_user_report": "2024-01-25T15:27:38.889172"
}
Expand Down
Binary file modified static/img/log/404-Test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/ADE-Scheduler.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/ADE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/Comproved.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/Gradescope.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/IDP-Logging.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/Inginious.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/Intranet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/LEPL1104.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/LEPL1201.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/Moodle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/UCLSport.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/UCLouvain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/UDS.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/outageReport404-Test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/outageReportADE-Scheduler.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/outageReportADE.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/outageReportComproved.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/outageReportGradescope.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/outageReportIDP-Logging.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/outageReportInginious.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/outageReportIntranet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/outageReportLEPL1104.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/outageReportLEPL1201.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/outageReportMoodle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/log/outageReportUCLSport.png
Binary file modified static/img/log/outageReportUCLouvain.png
Binary file modified static/img/log/outageReportUDS.png
4 changes: 2 additions & 2 deletions static/styleItem.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ h2{

#up {
display: inline-block; /* Ensure the link behaves like a block-level element */
padding: 10px 30% 10px 30%; /* Optional: Add padding for better visual appearance */
padding: 10px min(150px, 30%) 10px min(150px, 30%); /* Optional: Add padding for better visual appearance */
background-color: rgb(114, 187, 120); /* Optional: Add background color */
color: white; /* Optional: Set text color */
text-decoration: none; /* Optional: Remove underline */
Expand All @@ -89,7 +89,7 @@ h2{
#down{
background-color: rgb(187, 125, 114);
display: inline-block; /* Ensure the link behaves like a block-level element */
padding: 10px 30% 10px 30%; /* Optional: Add padding for better visual appearance */
padding: 10px min(150px, 30%) 10px min(150px, 30%); /* Optional: Add padding for better visual appearance */
color: white; /* Optional: Set text color */
text-decoration: none; /* Optional: Remove underline */
border-radius: 25px; /* Optional: Add border radius for rounded corners */
Expand Down
6 changes: 3 additions & 3 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<meta name="google-site-verification" content="aGMTsvUStNIejr6z4Ew8Mdme0SpSLKKjPE9uNbrKQzE" />

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content={{ _("UCLouvain Down Detector - Real-time outage reports for UCLouvain services") }}>
<meta name="description" content={{ _("UCLouvain Down Detector - Real-time outage reports for UCLouvain services. Check if moodle, intranet, your mail are down. Report the status of a website easily and see past outages") }}>
<meta name="keywords" content={{ _("UCLouvain, monitoring, outage, status, university services, downtime, downdetector, students") }}>
<meta name="author" content={{ _("EPL Students") }}>
<meta name="robots" content="index, follow">
Expand Down Expand Up @@ -60,8 +60,8 @@

<div class="right-buttons">
<select name="Language" id="language-select">
{% for lang in ["en", "fr"] %}
<option value="{{ lang }}" {% if lang == get_locale %}selected{% endif %}>{{ lang }}</option>
{% for lang in language["list"] %}
<option value="{{ lang }}" {% if lang == language["user"] %}selected{% endif %}>{{ lang }}</option>
{% endfor %}
</select>
<a href="https://github.com/Tfloow/UCLouvainDown"><span class="header-button"> <b>Github</b> </span></a>
Expand Down
2 changes: 2 additions & 0 deletions translations/babel.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
[ignore: venv/**]

[python: **.py]
[jinja2: templates/**.html]
Loading

0 comments on commit 5fc23ef

Please sign in to comment.