Skip to content

Commit

Permalink
Quick fix for user plot and added element to roadmap
Browse files Browse the repository at this point in the history
  • Loading branch information
Tfloow committed Jan 24, 2024
1 parent 1bec47c commit b38317e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [How to run it ?](#how-to-run-it-)
- [Explanation of the steps](#explanation-of-the-steps)
- [Roadmap](#roadmap)
- [API](#api)
- [Documentation](#documentation)
- [License](#license)

Expand Down Expand Up @@ -54,6 +55,12 @@ First, make sure to get the latest version of python (I am using 3.12). then fol
- [x] User button to report if a website is down
- [x] Database that collect persistent data about outage
- [ ] Proper database

### API

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

## Documentation

Expand Down
4 changes: 3 additions & 1 deletion dataReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ def addBlankCSV():
def plot(service, onlyOutageReport=False):
if not onlyOutageReport:
print("[LOG]: also plotting for user Report")
toPlot = dict(userReport = filepath + service + "/outageReport.csv")
toPlot = dict(userReport = filepath + service + "/log.csv")
else:
toPlot = dict(outageReport = filepath + service + "/outageReport.csv")

print(toPlot)

for report in toPlot:
path = toPlot[report]
Expand Down Expand Up @@ -123,6 +124,7 @@ def dataExtraction():

for service in serviceList:
os.system(f'cmd /c "curl {url}/extract?get={service} -o data/{service}/log.csv"')
os.system(f'cmd /c "curl {url}/extract?get={service}_outage -o data/{service}/outageReport.csv"')

def getLastReport(service):
with open("data/" + service + "/log.csv", "r") as file:
Expand Down

0 comments on commit b38317e

Please sign in to comment.