Skip to content

Commit

Permalink
readability adjustments to wake controller
Browse files Browse the repository at this point in the history
  • Loading branch information
NickBorgers committed Apr 11, 2024
1 parent e1714d9 commit 83709d7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 34 deletions.
27 changes: 0 additions & 27 deletions .devcontainer/devcontainer.json

This file was deleted.

4 changes: 4 additions & 0 deletions wake-controller/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,7 @@ help:
#build: @ Build this container image
build:
docker build -t node-red-wake-controller .

#run: @ Run the wake controller
run: build
docker run --name wake-controller --rm -p 8080:80 node-red-wake-controller
8 changes: 4 additions & 4 deletions wake-controller/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pyyaml
GitPython
flask
requests
pyyaml==6.0.1
GitPython==3.1.43
flask==3.0.3
requests==2.31.0
16 changes: 13 additions & 3 deletions wake-controller/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,25 @@
border: 1px solid #ccc;
border-radius: 4px;
resize: vertical;
font-size: 20px;
}

label {
padding: 12px 12px 12px 0;
display: inline-block;
display: block;
font-size: 35px;
text-align: right;
}

.submit {
background-color: #04AA6D;
color: white;
padding: 12px 20px;
padding: 12px 60px;
border: none;
border-radius: 4px;
cursor: pointer;
float: right;
font-size: 20px;
}

.submit:hover {
Expand Down Expand Up @@ -56,14 +60,15 @@
</head>
<body>

<h2>Set Wakeup Time</h2>
<h2 id="title">Set Wakeup Time</h2>
<p>This is when the wakeup cycle will begin, expect to wake up about 35 minutes after the set time.</p>

<div id="container" class="container">
<form>
<div class="row">
<div class="submit" onclick="submitConfig()">Submit</div>
</div>
<br>
<div class="row">
<div class="col-50">
<label for="fname">Monday</label>
Expand Down Expand Up @@ -159,6 +164,11 @@ <h2>Set Wakeup Time</h2>
} else {
document.getElementById("container").innerHTML = "Failed to update schedule"
}
window.scrollTo({
top: 0,
left: 0,
behavior: "smooth",
});
}

function readNewConfig() {
Expand Down

0 comments on commit 83709d7

Please sign in to comment.