diff --git a/frontend/src/Dashboard.jsx b/frontend/src/Dashboard.jsx index 8135843..ad029a8 100644 --- a/frontend/src/Dashboard.jsx +++ b/frontend/src/Dashboard.jsx @@ -157,6 +157,15 @@ function PingServiceCard({ config, ms, previousMs, history = [], loading, isExpa /> )} + {history.length > 0 && (() => { + const sum = history.reduce((a, b) => a + b, 0); + const avg = Math.round(sum / history.length); + return ( +
+ Среднее за период: {avg} мс +
+ ); + })()} {history.length > 0 ? ( ) : (