diff --git a/web-ng/src/routes/+page.svelte b/web-ng/src/routes/+page.svelte deleted file mode 100644 index 5982b0a..0000000 --- a/web-ng/src/routes/+page.svelte +++ /dev/null @@ -1,2 +0,0 @@ -
Visit kit.svelte.dev to read the documentation
diff --git a/web-ng/.eslintignore b/webif/.eslintignore similarity index 100% rename from web-ng/.eslintignore rename to webif/.eslintignore diff --git a/web-ng/.eslintrc.cjs b/webif/.eslintrc.cjs similarity index 100% rename from web-ng/.eslintrc.cjs rename to webif/.eslintrc.cjs diff --git a/web-ng/.gitignore b/webif/.gitignore similarity index 100% rename from web-ng/.gitignore rename to webif/.gitignore diff --git a/web-ng/.npmrc b/webif/.npmrc similarity index 100% rename from web-ng/.npmrc rename to webif/.npmrc diff --git a/web-ng/.prettierignore b/webif/.prettierignore similarity index 100% rename from web-ng/.prettierignore rename to webif/.prettierignore diff --git a/web-ng/.prettierrc b/webif/.prettierrc similarity index 100% rename from web-ng/.prettierrc rename to webif/.prettierrc diff --git a/web-ng/README.md b/webif/README.md similarity index 100% rename from web-ng/README.md rename to webif/README.md diff --git a/webif/eachwatt.css b/webif/eachwatt.css deleted file mode 100644 index 36267ee..0000000 --- a/webif/eachwatt.css +++ /dev/null @@ -1,83 +0,0 @@ -*, -html { - margin: 0; - padding: 0; - border: 0; -} - -html { - width: 100%; - height: 100%; -} - -body { - width: 100%; - height: 100%; - position: relative; -} - -div#container { - max-width: 1200px; - margin: 0 auto; - clear: both; -} - -div#container-left, -div#container-right, -div#mains-power, -div.mains-power-card, -pre#configuration { - padding: 0.8em; - box-sizing: border-box; -} - -h1, h2, p, table, img#logo, div#mains-power { - margin-bottom: 1em; -} - -table { - width: 100%; -} - -th, td { - text-align: left; - padding: 0 0.4em 0.4em 0; -} - -th { - border-bottom: 1px solid #000; -} - -.cell-right-align { - text-align: right; -} - -div#container-left { - width: 30%; - float: left; -} - -div#container-right { - width: 70%; - float: right; -} - -pre#configuration { - background-color: #DDD; - overflow: hidden; -} - -div#mains-power { - background-color: #DDD; -} - -div.mains-power-card { - float: left; - width: 25%; - padding: 2em; - text-align: center; -} - -div.mains-power-card span { - display: block; -} diff --git a/webif/eachwatt.js b/webif/eachwatt.js deleted file mode 100644 index 99612e3..0000000 --- a/webif/eachwatt.js +++ /dev/null @@ -1,134 +0,0 @@ -const updateCharacteristicsSensorDataTable = (sensorData) => { - const table = document.querySelector('#characteristics-sensor-data') - - let tableData = ` -Name | +Phase | +Voltage | +Frequency | +
---|---|---|---|
{data.characteristics.name} | +{data.characteristics.phase} | +{data.voltage}V | +{data.frequency}Hz | +
Circuit | +Group | +Circuit type | +Sensor type | +Power | +
---|---|---|---|---|
{data.circuit.name} | +{data.circuit.group ?? ''} | +{data.circuit.type} | +{data.circuit.sensor.type} | +{data.watts}W | +
+ {configuration} +diff --git a/webif/src/routes/LastUpdate.svelte b/webif/src/routes/LastUpdate.svelte new file mode 100644 index 0000000..abc5a14 --- /dev/null +++ b/webif/src/routes/LastUpdate.svelte @@ -0,0 +1,6 @@ + +
+ Last update: {lastUpdateTimestamp?.toISOString()}, connected to {webSocketUrl} +
diff --git a/webif/src/routes/Logo.svelte b/webif/src/routes/Logo.svelte new file mode 100644 index 0000000..0da9970 --- /dev/null +++ b/webif/src/routes/Logo.svelte @@ -0,0 +1,9 @@ + + + diff --git a/webif/src/routes/MainsPower.svelte b/webif/src/routes/MainsPower.svelte new file mode 100644 index 0000000..b4d6969 --- /dev/null +++ b/webif/src/routes/MainsPower.svelte @@ -0,0 +1,33 @@ + + +