Skip to content

Commit 02dd69b

Browse files
Add link back to HousePortal
1 parent df5744e commit 02dd69b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

hc_http.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ static const char *hc_http_status (const char *method, const char *uri,
243243
gethostname (hc_hostname, sizeof(hc_hostname));
244244
}
245245
added = snprintf (cursor, size,
246-
"{\"host\":\"%s\",\"timestamp\":%ld,\"clock\":{",
247-
hc_hostname, (long)time(0));
246+
"{\"host\":\"%s\",\"proxy\":\"%s\",\"timestamp\":%ld,\"clock\":{",
247+
hc_hostname, houseportal_server(), (long)time(0));
248248
if (added > 0) {
249249
cursor += added;
250250
size -= added;

public/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
<link rel=stylesheet type="text/css" href="/house.css" title="House">
55
<script>
66
function clockUpdate (response) {
7+
8+
document.getElementById('portal').href = 'http://'+response.proxy+'/index.html';
9+
710
var hasdata = false;
811
if (response.clock.gps) {
912
hasdata = response.clock.gps.fix;
@@ -55,6 +58,7 @@
5558
<tr><td>
5659
<table class="housetop">
5760
<tr>
61+
<td><a id="portal" href="/index.html">Portal</a></td>
5862
<td><span>Clock</span></td>
5963
</tr>
6064
</table>

0 commit comments

Comments
 (0)