Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
a42254cf95
|
|||
3d05ea5d28
|
|||
52217c5251
|
|||
022d7a8926 | |||
698f926376 | |||
f74ad50b94 | |||
0c03d9f94e
|
|||
eca5affd53
|
|||
6236673d28
|
|||
4213dc7329
|
|||
2d3eab0db8
|
@ -13,12 +13,6 @@ steps:
|
||||
dockerfile: Dockerfile
|
||||
when:
|
||||
- event: [push, tag]
|
||||
scan_image:
|
||||
image: aquasec/trivy
|
||||
commands:
|
||||
- TRIVY_DISABLE_VEX_NOTICE=1 trivy image $FORGE_NAME/$CI_REPO:$CI_COMMIT_SHA --quiet --exit-code 1
|
||||
when:
|
||||
- event: [push, tag]
|
||||
deploy:
|
||||
image: quay.io/wollud1969/k8s-admin-helper:0.2.1
|
||||
environment:
|
||||
|
@ -16,6 +16,7 @@ idna==3.10
|
||||
importlib_metadata==8.6.1
|
||||
itsdangerous==2.2.0
|
||||
Jinja2==3.1.5
|
||||
kaleido==1.0.0rc0
|
||||
loguru==0.7.3
|
||||
MarkupSafe==3.0.2
|
||||
msgspec==0.19.0
|
||||
|
21
src/run.py
21
src/run.py
@ -1,6 +1,7 @@
|
||||
from flask import Flask, session, g, render_template_string
|
||||
from flask import Flask, session, g, render_template_string, Response
|
||||
from flask_session import Session
|
||||
from flask_oidc import OpenIDConnect
|
||||
import kaleido
|
||||
from werkzeug.middleware.proxy_fix import ProxyFix
|
||||
from loguru import logger
|
||||
import redis
|
||||
@ -8,6 +9,8 @@ import json
|
||||
import os
|
||||
import plotly.express as px
|
||||
import plotly.graph_objects as po
|
||||
import plotly.io as pio
|
||||
import io
|
||||
import pandas as pd
|
||||
import psycopg
|
||||
import sqlalchemy
|
||||
@ -174,8 +177,6 @@ def ntpserver():
|
||||
fig.add_trace(po.Scatter(x=df['bucket'], y=df['stratum'], mode='lines', name='Stratum', yaxis='y2', line=dict(color='blue')))
|
||||
|
||||
fig.update_layout(
|
||||
title='NTP Server Numbers',
|
||||
|
||||
# Linke Y-Achse
|
||||
yaxis=dict(
|
||||
title='Root Dispersion'
|
||||
@ -193,19 +194,9 @@ def ntpserver():
|
||||
legend=dict(x=0.05, y=1) # Position der Legende
|
||||
)
|
||||
|
||||
img = fig.to_image(format='png')
|
||||
return Response(img, mimetype='image/png')
|
||||
|
||||
graph_html = fig.to_html(full_html=False, default_height='30%')
|
||||
|
||||
return render_template_string(f"""
|
||||
<html>
|
||||
<head>
|
||||
<title>NTP Server Numbers</title>
|
||||
</head>
|
||||
<body>
|
||||
{graph_html}
|
||||
</body>
|
||||
</html>
|
||||
""")
|
||||
except Exception as e:
|
||||
raise Exception(f"Error when querying NTP server values: {e}")
|
||||
finally:
|
||||
|
Reference in New Issue
Block a user