mirror of
https://github.com/YunoHost/tartiflette.git
synced 2024-09-03 20:06:08 +02:00
Misc fixes / improvement for appci dashboard
This commit is contained in:
parent
ad0b16fc5f
commit
53d22601ae
1 changed files with 12 additions and 7 deletions
|
@ -21,9 +21,10 @@ def main():
|
||||||
data["name"] = app
|
data["name"] = app
|
||||||
data["statuses"] = []
|
data["statuses"] = []
|
||||||
|
|
||||||
if len(appdata.split("\n")) != 2:
|
if len(appdata.split("\n")) != 2 or len(appdata) != 28:
|
||||||
print "Ignoring %s - bad/unavailable data" % app
|
print "Ignoring %s - bad/unavailable data" % app
|
||||||
continue
|
continue
|
||||||
|
|
||||||
applevel = appdata.split("\n")[1][0]
|
applevel = appdata.split("\n")[1][0]
|
||||||
appdata = appdata.split("\n")[0]
|
appdata = appdata.split("\n")[0]
|
||||||
data["level"] = int(applevel)
|
data["level"] = int(applevel)
|
||||||
|
@ -43,20 +44,24 @@ def main():
|
||||||
|
|
||||||
data["statusescore"] = statusescore
|
data["statusescore"] = statusescore
|
||||||
|
|
||||||
|
|
||||||
apps.append(data)
|
apps.append(data)
|
||||||
|
|
||||||
apps.sort(key=lambda a: (a["level"], a["statusescore"], a["name"]), reverse=True)
|
apps.sort(key=lambda a: (a["level"], a["statusescore"], a["name"]), reverse=True)
|
||||||
|
|
||||||
|
for link in glob.glob("../www/integration/*.svg"):
|
||||||
|
os.unlink(link);
|
||||||
|
|
||||||
|
os.symlink("%s/badges/unknown.svg" % os.getcwd(),
|
||||||
|
"../www/integration/unknown.svg")
|
||||||
|
|
||||||
|
for app in apps:
|
||||||
|
os.symlink("%s/badges/level%s.svg" % (os.getcwd(), app["level"]),
|
||||||
|
"../www/integration/%s.svg" % app["name"])
|
||||||
|
|
||||||
with open("apps.json", "w") as f:
|
with open("apps.json", "w") as f:
|
||||||
json.dump(apps, f)
|
json.dump(apps, f)
|
||||||
|
|
||||||
|
|
||||||
for link in glob.glob("../www/integration/*.svg"):
|
|
||||||
os.unlink(link);
|
|
||||||
|
|
||||||
for app in apps:
|
|
||||||
os.symlink("%s/badges/level%s.svg" % (os.getcwd(), app["level"]),
|
|
||||||
"../www/integration/%s.svg" % app["name"])
|
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue