mirror of
https://github.com/cjfranko/NTP-Timeturner.git
synced 2025-11-08 18:32:02 +00:00
fix: Enable std feature for log and remove clock history
Co-authored-by: aider (gemini/gemini-2.5-pro-preview-05-06) <aider@aider.chat>
This commit is contained in:
parent
5a86493824
commit
985ccc6819
4 changed files with 1 additions and 10 deletions
|
|
@ -17,7 +17,7 @@ actix-web = "4"
|
|||
actix-files = "0.6"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
clap = { version = "4.4", features = ["derive"] }
|
||||
log = "0.4"
|
||||
log = { version = "0.4", features = ["std"] }
|
||||
daemonize = "0.5.0"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ struct ApiStatus {
|
|||
ntp_active: bool,
|
||||
interfaces: Vec<String>,
|
||||
hardware_offset_ms: i64,
|
||||
clock_delta_history: Vec<i64>,
|
||||
}
|
||||
|
||||
// AppState to hold shared data
|
||||
|
|
@ -79,8 +78,6 @@ async fn get_status(data: web::Data<AppState>) -> impl Responder {
|
|||
.map(|ifa| ifa.ip().to_string())
|
||||
.collect();
|
||||
|
||||
let clock_delta_history: Vec<i64> = state.clock_delta_history.iter().cloned().collect();
|
||||
|
||||
HttpResponse::Ok().json(ApiStatus {
|
||||
ltc_status,
|
||||
ltc_timecode,
|
||||
|
|
@ -94,7 +91,6 @@ async fn get_status(data: web::Data<AppState>) -> impl Responder {
|
|||
ntp_active,
|
||||
interfaces,
|
||||
hardware_offset_ms: hw_offset_ms,
|
||||
clock_delta_history,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -233,7 +229,6 @@ mod tests {
|
|||
assert_eq!(resp.ltc_timecode, "01:02:03:04");
|
||||
assert_eq!(resp.frame_rate, "25.00fps");
|
||||
assert_eq!(resp.hardware_offset_ms, 10);
|
||||
assert_eq!(resp.clock_delta_history, vec![4, 5, 6]);
|
||||
}
|
||||
|
||||
#[actix_web::test]
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@
|
|||
<h2>Clock Offset</h2>
|
||||
<p>Delta: <span id="delta-ms">--</span> ms (<span id="delta-frames">--</span> frames)</p>
|
||||
<p>Jitter: <span id="jitter-status">--</span></p>
|
||||
<p>History (ms): <span id="delta-history">--</span></p>
|
||||
</div>
|
||||
|
||||
<!-- Network Interfaces -->
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
deltaMs: document.getElementById('delta-ms'),
|
||||
deltaFrames: document.getElementById('delta-frames'),
|
||||
jitterStatus: document.getElementById('jitter-status'),
|
||||
deltaHistory: document.getElementById('delta-history'),
|
||||
interfaces: document.getElementById('interfaces'),
|
||||
logs: document.getElementById('logs'),
|
||||
};
|
||||
|
|
@ -45,8 +44,6 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
statusElements.jitterStatus.textContent = data.jitter_status;
|
||||
statusElements.jitterStatus.className = data.jitter_status.toLowerCase();
|
||||
|
||||
statusElements.deltaHistory.textContent = data.clock_delta_history.join(', ');
|
||||
|
||||
statusElements.interfaces.innerHTML = '';
|
||||
if (data.interfaces.length > 0) {
|
||||
data.interfaces.forEach(ip => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue