void httpServerHandlePage_admin() { httpServerSendHtmlHeadChunked(); httpServer.sendContent_P(html_head_end); httpServer.sendContent_P(html_bodytag); httpServerSendHtmlBodyPageheadChunked(); httpServer.sendContent_P(html_admin_body1); #ifdef FIRMWARE_VARIANT_THERMOSTAT httpServer.sendContent_P(html_admin_body_therm); #elif FIRMWARE_VARIANT_HEATCONTROL httpServer.sendContent_P(html_admin_body_heatc); #endif httpServer.sendContent_P(html_admin_body2); #ifdef ENABLE_FEATURE_HTTP_UPDATER httpServer.sendContent_P(html_admin_body_ota); #endif #ifdef ENABLE_FEATURE_FILESYSTEM_BROWSER if (confWeb.FSbrowser) httpServer.sendContent_P(html_admin_body_fsbrowser); #endif #ifdef ENABLE_FEATURE_WEB_CONSOLE if (confWeb.wConsole) httpServer.sendContent_P(html_admin_body_console); #endif #ifdef ENABLE_FEATURE_WSCONSOLE if (confWeb.wsConsole) httpServer.sendContent_P(html_admin_body_wsconsole); #endif httpServer.sendContent_P(html_admin_body_end); httpServerSendHtmlFooterChunked(); } void httpServerHandlePage_confWeb() { httpServerSendHtmlHeadChunked(); httpServer.sendContent_P(html_js_confpages_start); httpServer.sendContent_P(html_confweb_script); httpServer.sendContent_P(html_js_confpages_end); httpServer.sendContent_P(html_head_end); httpServer.sendContent_P(html_bodytag_jsinit); httpServerSendHtmlBodyPageheadChunked(); httpServer.sendContent_P(html_confweb_body); #ifdef ENABLE_FEATURE_WSCONSOLE httpServer.sendContent_P(html_confweb_body_wsconsole); #endif httpServer.sendContent_P(html_confweb_body2); #ifdef ENABLE_FEATURE_FILESYSTEM_BROWSER httpServer.sendContent_P(html_confweb_body_fsbrowser); #endif httpServer.sendContent_P(html_confweb_body3); httpServerSendHtmlFooterChunked(); } void httpServerHandlePage_confMqtt() { httpServerSendHtmlHeadChunked(); httpServer.sendContent_P(html_js_confpages_start); httpServer.sendContent_P(html_confmqtt_script); httpServer.sendContent_P(html_js_confpages_end); httpServer.sendContent_P(html_head_end); httpServer.sendContent_P(html_bodytag_jsinit); httpServerSendHtmlBodyPageheadChunked(); httpServer.sendContent_P(html_confmqtt_body); httpServerSendHtmlFooterChunked(); } void httpServerHandlePage_confDevWiFi() { httpServerSendHtmlHeadChunked(); httpServer.sendContent_P(html_js_confpages_start); httpServer.sendContent_P(html_confDevWiFi_script); httpServer.sendContent_P(html_js_confpages_end); httpServer.sendContent_P(html_head_end); httpServer.sendContent_P(html_bodytag_jsinit); httpServerSendHtmlBodyPageheadChunked(); httpServer.sendContent_P(html_confDevWiFi_body); httpServerSendHtmlFooterChunked(); } void httpServerHandlePage_confAdd() { httpServerSendHtmlHeadChunked(); httpServer.sendContent_P(html_js_confpages_start); httpServer.sendContent_P(html_confadd_script); httpServer.sendContent_P(html_js_confpages_end); httpServer.sendContent_P(html_head_end); httpServer.sendContent_P(html_bodytag_jsinit); httpServerSendHtmlBodyPageheadChunked(); httpServer.sendContent_P(html_confadd_body); httpServerSendHtmlFooterChunked(); } void httpServerHandlePage_confTime() { httpServerSendHtmlHeadChunked(); httpServer.sendContent_P(html_js_confpages_start); httpServer.sendContent_P(html_conftime_script); httpServer.sendContent_P(html_js_confpages_end); httpServer.sendContent_P(html_head_end); httpServer.sendContent_P(html_bodytag_jsinit); httpServerSendHtmlBodyPageheadChunked(); httpServer.sendContent_P(html_conftime_body); httpServerSendHtmlFooterChunked(); } void httpServerHandlePage_confLog() { httpServerSendHtmlHeadChunked(); httpServer.sendContent_P(html_js_confpages_start); httpServer.sendContent_P(html_conflog_script); httpServer.sendContent_P(html_js_confpages_end); httpServer.sendContent_P(html_head_end); httpServer.sendContent_P(html_bodytag_jsinit); httpServerSendHtmlBodyPageheadChunked(); httpServer.sendContent_P(html_conflog_body); httpServerSendHtmlFooterChunked(); } #ifdef ENABLE_FEATURE_WSCONSOLE void httpServerHandlePage_WSConsole() { httpServerSendHtmlHeadChunked(); httpServer.sendContent_P(html_head_end); httpServer.sendContent_P(html_bodytag); httpServerSendHtmlBodyPageheadChunked(); httpServer.sendContent_P(html_wsconsole_body); httpServer.sendContent_P(html_wsconsole_script); httpServer.sendContent_P(js_wsapp); httpServer.sendContent_P(html_wsconsole_endScript); httpServerSendHtmlFooterChunked(); } #endif #ifdef ENABLE_FEATURE_WEB_CONSOLE void httpServerHandlePage_console() { httpServerSendHtmlHeadChunked(); httpServer.sendContent_P(html_head_end); httpServer.sendContent_P(html_bodytag); httpServerSendHtmlBodyPageheadChunked(); httpServer.sendContent_P(html_console_body); httpServerSendHtmlFooterChunked(); } #endif void httpServerHandlePage_confSaved() { httpServerSendHtmlHeadChunked(); httpServer.sendContent_P(html_head_end); httpServer.sendContent_P(html_bodytag); httpServerSendHtmlBodyPageheadChunked(); httpServer.sendContent_P(html_confsaved_body); httpServerSendHtmlFooterChunked(); } //void httpServerHandlePage_confSavedRestart() { // httpServerSendHtmlHeadChunked(); // httpServer.sendContent_P(html_head_end); // httpServer.sendContent_P(html_bodytag); // httpServerSendHtmlBodyPageheadChunked(); // httpServer.sendContent_P(html_confsavedrestart_body); // httpServerSendHtmlFooterChunked(); //} void httpServerHandlePage_clearConf() { httpServerSendHtmlHeadChunked(); httpServer.sendContent_P(html_head_end); httpServer.sendContent_P(html_bodytag); httpServerSendHtmlBodyPageheadChunked(); httpServer.sendContent_P(html_clearconf_body); httpServerSendHtmlFooterChunked(); } #ifdef ENABLE_FEATURE_FILESYSTEM_BROWSER void httpServerHandlePage_fsbrowser() { httpServerSendHtmlHeadChunked(); httpServer.sendContent_P(html_head_end); httpServerSendHtmlBodyPageheadChunked(); httpServer.sendContent_P(html_fsbrowser_body_1); // output FS file list Dir dir = LittleFS.openDir("/"); char _tmpStr[301]; uint8_t _numFiles=0; while (dir.next()) { _numFiles++; if(_numFiles > 1) { httpServer.sendContent("\n"); } File f = dir.openFile("r"); // filter out some files in file list - i.E: "formatted" should never be deleted by accident as this will clear all config on the next reboot!! if(strcmp(dir.fileName().c_str(), "formatted") != 0) { sprintf_P(_tmpStr, html_fsbrowser_listentry, dir.fileName().c_str(), dir.fileName().c_str(), f.size(), dir.fileName().c_str()); httpServer.sendContent(_tmpStr); } f.close(); } FS_getInfo(); sprintf_P(_tmpStr, html_fsbrowser_listEnd); httpServer.sendContent(_tmpStr); sprintf_P(_tmpStr, html_fsbrowser_stats_total, fs_info.totalBytes); httpServer.sendContent(_tmpStr); sprintf_P(_tmpStr, html_fsbrowser_stats_used, fs_info.usedBytes); httpServer.sendContent(_tmpStr); httpServer.sendContent_P(html_fsbrowser_body_2); httpServerSendHtmlFooterChunked(); } #endif