Skip to content

Commit

Permalink
fixing json
Browse files Browse the repository at this point in the history
  • Loading branch information
clemenko committed Apr 17, 2024
1 parent 1b4a3d4 commit 54a35c1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dzver/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def json_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 jsonify({'k3s': k3s_out, 'rke2': rke_out, 'cert-manager': cert_out, 'rancher': rancher_out, 'longhorn': longhorn_out, 'neuvector': neuvector_out, 'harvester': harvester_out, 'hauler': hauler_out}), 200
return jsonify({'k3s': k3s_out, 'rke2 stable': rke_out, 'rke latest': late_rke_out, 'cert-manager': cert_out, 'rancher': rancher_out, 'longhorn': longhorn_out, 'neuvector': neuvector_out, 'harvester': harvester_out, 'hauler': hauler_out}), 200

@app.route('/', methods=['GET'])
def curl_all_the_things():
Expand Down Expand Up @@ -68,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_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)
return render_template('index.html', rancher_ver=rancher_out, rke_ver=rke_out, late_rke_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: 2 additions & 2 deletions dzver/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ <h2>Latest Rancher Stack Versions</h2>
<tbody>
<tr>
<td>Rke2 - Stable</td>
<td>{{rke2_ver}}</td>
<td>{{rke_ver}}</td>
</tr>
<tr>
<td>Rke2 - Latest</td>
<td>{{late_rke2_ver}}</td>
<td>{{late_rke_ver}}</td>
</tr>
<tr>
<td>K3s - Stable</td>
Expand Down

0 comments on commit 54a35c1

Please sign in to comment.