From 612d82b52aa417085829be37d233c6b99896ea88 Mon Sep 17 00:00:00 2001 From: Robert Stein Date: Tue, 22 Dec 2020 18:03:02 +0100 Subject: [PATCH] Start dashboard site --- src/Network/WebServer.cpp | 6 +- templates/html-ui/configureprinter.html | 470 +++++++++++++++++---- templates/html-ui/configurestation.html | 517 +++++++++++++++--------- templates/html-ui/configureweather.html | 487 ++++++++++++++-------- templates/html-ui/index.html | 337 ++++++++++----- templates/html-ui/upload.html | 371 ++++++++++++----- 6 files changed, 1561 insertions(+), 627 deletions(-) diff --git a/src/Network/WebServer.cpp b/src/Network/WebServer.cpp index 2f9bb52..8985be5 100644 --- a/src/Network/WebServer.cpp +++ b/src/Network/WebServer.cpp @@ -424,7 +424,6 @@ void WebServer::handleConfigurePrinter() { WebserverMemoryVariables::sendFooter(this->server, this->globalDataController); } - /** * @brief Update configuration for Printer */ @@ -465,6 +464,11 @@ void WebServer::handleUpdatePrinter() { MemoryHelper::stringToChar(this->server->arg("e-tapiuser"), targetPrinter->basicAuthUsername, 30); MemoryHelper::stringToChar(this->server->arg("e-tapipass"), targetPrinter->basicAuthPassword, 60); + // Reset error data + MemoryHelper::stringToChar("", targetPrinter->error, 120); + targetPrinter->state = PRINTER_STATE_OFFLINE; + + // Save this->globalDataController->getSystemSettings()->lastOk = FPSTR(OK_MESSAGES_SAVE1); this->globalDataController->writeSettings(); this->redirectTarget("/configureprinter/show"); diff --git a/templates/html-ui/configureprinter.html b/templates/html-ui/configureprinter.html index e765d3b..d3fe369 100644 --- a/templates/html-ui/configureprinter.html +++ b/templates/html-ui/configureprinter.html @@ -1,5 +1,6 @@ - + + PrintBuddy @@ -39,9 +40,7 @@ - - - + @@ -169,7 +168,7 @@
WiFi Signal Strength: 100%
ESP ChipID: 1152840
ESP CoreVersion: 2_7_4
-
Heap (frag/free/max): 3% |28536 b|27696 b
+
Heap (frag/free/max): 3% |26360 b|25784 b
@@ -181,6 +180,18 @@

Configure

Printers

+
@@ -238,7 +249,104 @@ Edit
  • + +
    + + + + Other Duet + Duet + +
    Error
    + + + + + + + Other Octo + OctoPrint + +
    Offline
    + + +
    -
    -
    -
    +
    -
    -
    +
    +
    -
    +
    + class='bx--text-input' placeholder='Username for basic auth' + name='isBasicAuth' value='' maxlength='30'>


    + id='userid-1' type='password' class='bx--text-input' + placeholder='Password for basic auth' name='userid' value='' + maxlength='120'>


    - + + + + + + + - - - - + \ No newline at end of file diff --git a/templates/html-ui/configurestation.html b/templates/html-ui/configurestation.html index 1fba4f3..1babda6 100644 --- a/templates/html-ui/configurestation.html +++ b/templates/html-ui/configurestation.html @@ -1,201 +1,334 @@ + - - - - - - -
    - - Printer Buddy  - V4.0 - - -
    - - -
    - - -
    - -
    - - -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - - -
    -
    -
    -
    - -
    - - -
    -
    -
    -
    -
    - - -
    -
    - + + PrintBuddy + + + + + + + + + + + + + + + - - - - -
    -
    - -
    -
    -
    - -


    - -
    - + +
    PrintBuddy V1.0 + +
    + + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + +


    +
    + + + + - - - - - \ No newline at end of file diff --git a/templates/html-ui/configureweather.html b/templates/html-ui/configureweather.html index 31bb63d..4b76b10 100644 --- a/templates/html-ui/configureweather.html +++ b/templates/html-ui/configureweather.html @@ -1,170 +1,329 @@ + + - - - - - - -
    - - Printer Buddy  - V4.0 - - -
    - - -
    - -
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +


    +
    + + + + - - - - - \ No newline at end of file diff --git a/templates/html-ui/index.html b/templates/html-ui/index.html index fe89e03..46e85be 100644 --- a/templates/html-ui/index.html +++ b/templates/html-ui/index.html @@ -1,105 +1,244 @@ + - - - - - - -
    - - Printer Buddy  - V4.0 - - -
    - - -
    - - -
    - -
    -
    -
    -
    -
    - Update Firmware -

    Select the firmware you want to upload

    -
    - -
    -
    -
    - -
    -
    + + PrintBuddy + + + + + + + + + + + + + + + + + +
    PrintBuddy V1.0 + +
    + + +
    + +
    +
    + + +


    +
    + + + + - - - - - \ No newline at end of file diff --git a/templates/html-ui/upload.html b/templates/html-ui/upload.html index 30cb3bc..ef1d8a5 100644 --- a/templates/html-ui/upload.html +++ b/templates/html-ui/upload.html @@ -1,105 +1,280 @@ + - - - - - - -
    - - Printer Buddy  - V4.0 - - -
    - - -
    - - -
    - -
    - -
    -
    -
    -
    - Update Firmware -

    Select the firmware you want to upload

    -
    - -
    -
    -
    - -
    -
    + + PrintBuddy + + + + + + + + + + + + + + + + + +
    PrintBuddy V1.0 + +
    + + +
    + +
    +
    + +
    +
    +
    +
    Update + Firmware +

    Select the firmware you want to upload

    +
    +
    +
    +
    +
    +
    +
    +
    +
    Update + FileSystem +

    Select the filesystem you want to upload

    +
    +
    +
    +
    +
    +
    +
    + +


    +
    + + + + - - - - - \ No newline at end of file