Skip to content

Commit 7f3da6b

Browse files
itsDNNSclaude
andcommitted
Fix clipboard copy on HTTP and add ISP name field
Clipboard copy now falls back to execCommand when navigator.clipboard is unavailable (non-HTTPS). ISP name configurable in setup/settings and included in LLM export report. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4cf3fba commit 7f3da6b

File tree

7 files changed

+51
-4
lines changed

7 files changed

+51
-4
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
44

55
Versioning: `YYYY-MM-DD.N` (date + sequential build number per day)
66

7+
## [2026-02-09.7]
8+
9+
### Added
10+
- **ISP name field**: Configurable in Setup and Settings, included in LLM export report
11+
12+
### Fixed
13+
- **Clipboard copy**: Fixed copy-to-clipboard on non-HTTPS connections (fallback to `execCommand`)
14+
715
## [2026-02-09.6]
816

917
### Added

app/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"snapshot_time": "06:00",
3131
"theme": "dark",
3232
"language": "en",
33+
"isp_name": "",
3334
}
3435

3536
ENV_MAP = {

app/i18n.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@
119119
# Language
120120
"language": "Language",
121121

122+
# ISP
123+
"isp_name": "Internet Provider",
124+
"isp_hint": "e.g. Vodafone, Telekom, O2 (shown in export)",
125+
122126
# Export
123127
"export_llm": "Export for LLM",
124128
"export_title": "LLM Analysis Export",
@@ -234,6 +238,9 @@
234238

235239
"language": "Sprache",
236240

241+
"isp_name": "Internetanbieter",
242+
"isp_hint": "z.B. Vodafone, Telekom, O2 (wird im Export angezeigt)",
243+
237244
"export_llm": "Export fuer LLM",
238245
"export_title": "LLM-Analyse Export",
239246
"export_hint": "Kopiere diesen Text und fuege ihn in dein bevorzugtes LLM (ChatGPT, Claude, Gemini, ...) ein, um Insights zu deiner Verbindung zu erhalten.",

app/templates/index.html

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -930,10 +930,28 @@ <h2>{{ t.export_title }}</h2>
930930
var textarea = document.getElementById('export-text');
931931
var btn = document.getElementById('export-copy-btn');
932932
textarea.select();
933-
navigator.clipboard.writeText(textarea.value).then(function() {
933+
textarea.setSelectionRange(0, textarea.value.length);
934+
var ok = false;
935+
if (navigator.clipboard && navigator.clipboard.writeText) {
936+
navigator.clipboard.writeText(textarea.value).then(function() {
937+
btn.textContent = T.copied;
938+
setTimeout(function() { btn.textContent = T.copy_clipboard; }, 2000);
939+
}).catch(function() {
940+
fallbackCopy(textarea, btn, T);
941+
});
942+
} else {
943+
fallbackCopy(textarea, btn, T);
944+
}
945+
}
946+
function fallbackCopy(textarea, btn, T) {
947+
try {
948+
document.execCommand('copy');
934949
btn.textContent = T.copied;
935950
setTimeout(function() { btn.textContent = T.copy_clipboard; }, 2000);
936-
});
951+
} catch(e) {
952+
btn.textContent = 'Select All + Ctrl+C';
953+
setTimeout(function() { btn.textContent = T.copy_clipboard; }, 3000);
954+
}
937955
}
938956
</script>
939957

app/templates/settings.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,11 @@ <h2>{{ t.mqtt_broker }} <span style="font-size:0.75em; font-weight:normal; color
209209
<div class="section">
210210
<h2>{{ t.general }}</h2>
211211
<div class="form-grid">
212+
<div class="form-row full">
213+
<label for="isp_name">{{ t.isp_name }}</label>
214+
<input type="text" id="isp_name" name="isp_name" value="{{ config.isp_name }}">
215+
<span class="hint">{{ t.isp_hint }}</span>
216+
</div>
212217
<div class="form-row">
213218
<label for="poll_interval">{{ t.interval_sec }}</label>
214219
<input type="number" id="poll_interval" name="poll_interval" value="{{ config.poll_interval }}" min="{{ poll_min }}" max="{{ poll_max }}">

app/templates/setup.html

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,13 @@ <h2><span class="step-num">1</span>{{ t.fritz_connection }}</h2>
217217
</div>
218218

219219
<div class="section">
220-
<h2><span class="step-num">2</span>{{ t.poll_interval }}</h2>
220+
<h2><span class="step-num">2</span>{{ t.general }}</h2>
221221
<div class="form-grid">
222+
<div class="form-row full">
223+
<label for="isp_name">{{ t.isp_name }}</label>
224+
<input type="text" id="isp_name" name="isp_name" value="{{ config.isp_name }}" placeholder="e.g. Vodafone, Telekom, O2">
225+
<span class="hint">{{ t.isp_hint }}</span>
226+
</div>
222227
<div class="form-row">
223228
<label for="poll_interval">{{ t.interval_sec }}</label>
224229
<input type="number" id="poll_interval" name="poll_interval" value="{{ config.poll_interval }}" min="{{ poll_min }}" max="{{ poll_max }}">

app/web.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ def api_export():
266266
us = analysis["us_channels"]
267267
ts = _state.get("last_update", "unknown")
268268

269+
isp = _config_manager.get("isp_name", "") if _config_manager else ""
270+
269271
lines = [
270272
"# DOCSIS Cable Connection – Status Report",
271273
"",
@@ -275,6 +277,7 @@ def api_export():
275277
"Analyze this data and provide insights about connection health, problematic channels, and recommendations.",
276278
"",
277279
"## Overview",
280+
f"- **ISP**: {isp}" if isp else None,
278281
f"- **Health**: {s.get('health', 'Unknown')}",
279282
f"- **Details**: {s.get('health_details', '')}",
280283
f"- **Timestamp**: {ts}",
@@ -330,7 +333,7 @@ def api_export():
330333
"3. Error rate analysis and whether it indicates a problem",
331334
"4. Specific recommendations to improve connection quality",
332335
]
333-
return jsonify({"text": "\n".join(lines)})
336+
return jsonify({"text": "\n".join(l for l in lines if l is not None)})
334337

335338

336339
@app.route("/api/snapshots")

0 commit comments

Comments
 (0)