Skip to content

Commit

Permalink
best ever
Browse files Browse the repository at this point in the history
  • Loading branch information
clemenko committed Apr 17, 2024
1 parent 58a3004 commit 1b4a3d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
18 changes: 5 additions & 13 deletions dzver/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@ def json_all_the_things():
rke_data = json.loads(requests.get("https://update.rke2.io/v1-release/channels").text)
rke_out = json.dumps(rke_data["data"][0]["latest"]).replace('"', '')

late_rke_out = json.dumps(rke_data["data"][1]["latest"]).replace('"', '')

k3s_data = json.loads(requests.get("https://update.k3s.io/v1-release/channels").text)
k3s_out = json.dumps(k3s_data["data"][0]["latest"]).replace('"', '')

late_rke_data = json.loads(requests.get("https://update.rke2.io/v1-release/channels").text)
late_rke_out = json.dumps(late_rke_data["data"][1]["latest"]).replace('"', '')

late_k3s_data = json.loads(requests.get("https://update.k3s.io/v1-release/channels").text)
late_k3s_out = json.dumps(late_k3s_data["data"][1]["latest"]).replace('"', '')

cert_data = json.loads(requests.get("https://api.github.com/repos/cert-manager/cert-manager/releases/latest", headers=headers).text)
cert_out = json.dumps(cert_data["tag_name"]).replace('"', '')
Expand All @@ -49,14 +45,10 @@ def curl_all_the_things():
rke_data = json.loads(requests.get("https://update.rke2.io/v1-release/channels").text)
rke_out = json.dumps(rke_data["data"][0]["latest"]).replace('"', '')

late_rke_out = json.dumps(rke_data["data"][1]["latest"]).replace('"', '')

k3s_data = json.loads(requests.get("https://update.k3s.io/v1-release/channels").text)
k3s_out = json.dumps(k3s_data["data"][0]["latest"]).replace('"', '')

late_rke_data = json.loads(requests.get("https://update.rke2.io/v1-release/channels").text)
late_rke_out = json.dumps(late_rke_data["data"][1]["latest"]).replace('"', '')

late_k3s_data = json.loads(requests.get("https://update.k3s.io/v1-release/channels").text)
late_k3s_out = json.dumps(late_k3s_data["data"][1]["latest"]).replace('"', '')

cert_data = json.loads(requests.get("https://api.github.com/repos/cert-manager/cert-manager/releases/latest", headers=headers).text)
cert_out = json.dumps(cert_data["tag_name"]).replace('"', '')
Expand All @@ -76,7 +68,7 @@ def curl_all_the_things():
hauler_data = json.loads(requests.get("https://api.github.com/repos/rancherfederal/hauler/releases/latest", headers=headers).text)
hauler_out = json.dumps(hauler_data["tag_name"]).replace('"', '')

return render_template('index.html', rancher_ver=rancher_out, rke2_ver=rke_out, late_rke_ver=late_rke_out, late_k3s_ver=late_k3s_out, k3s_ver=k3s_out, longhorn_ver=longhorn_out, neu_ver=neuvector_out, cert_ver=cert_out, harv_ver=harvester_out, hauler_ver=hauler_out)
return render_template('index.html', rancher_ver=rancher_out, rke2_ver=rke_out, late_rke2_ver=late_rke_out, k3s_ver=k3s_out, longhorn_ver=longhorn_out, neu_ver=neuvector_out, cert_ver=cert_out, harv_ver=harvester_out, hauler_ver=hauler_out)

if __name__ == '__main__':
app.run(host='0.0.0.0',debug=False)
4 changes: 0 additions & 4 deletions dzver/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@ <h2>Latest Rancher Stack Versions</h2>
<td>K3s - Stable</td>
<td>{{k3s_ver}}</td>
</tr>
<tr>
<td>K3s - Latest</td>
<td>{{late_k3s_ver}}</td>
</tr>
<tr>
<td>Rancher</td>
<td>{{rancher_ver}}</td>
Expand Down

0 comments on commit 1b4a3d4

Please sign in to comment.