/**
* Define dialogs to operate sketch binary updates operated by the
* AutoConnectUpdate class.
* @file AutoConnectUpdatePage.h
* @author hieromon@gmail.com
* @version 1.0.0
* @date 2019-08-15
* @copyright MIT license.
*/
#ifndef _AUTOCONNECTUPDATEPAGE_H
#define _AUTOCONNECTUPDATEPAGE_H
// Define the AUTOCONNECT_URI_UPDATE page to select the sketch binary
// for update and order update execution.
const AutoConnectUpdateAct::ACElementProp_t AutoConnectUpdateAct::_elmCatalog[] PROGMEM = {
{ AC_Element, "binSty", "", nullptr },
{ AC_Text, "caption", nullptr, nullptr },
{ AC_Element, "c1", "
", nullptr },
{ AC_Radio, "firmwares", nullptr, nullptr },
{ AC_Element, "c1", "
", nullptr },
{ AC_Submit, "update", "UPDATE", AUTOCONNECT_URI_UPDATE_ACT }
};
const AutoConnectUpdateAct::ACPage_t AutoConnectUpdateAct::_pageCatalog PROGMEM = {
AUTOCONNECT_URI_UPDATE, "Update", false, AutoConnectUpdateAct::_elmCatalog
};
// Define the AUTOCONNECT_URI_UPDATE_ACT page to display during the
// update process.
const AutoConnectUpdateAct::ACElementProp_t AutoConnectUpdateAct::_elmProgress[] PROGMEM = {
{ AC_Element, "loader", "", nullptr },
{ AC_Element, "c1", "", nullptr },
{ AC_Element, "binname", nullptr, nullptr },
{ AC_Element, "c2", " from ", nullptr },
{ AC_Element, "url", "", nullptr },
{ AC_Element, "c3", "
Updating...
", nullptr },
{ AC_Element, "progress_meter", "", nullptr },
{ AC_Element, "progress_loader", "", nullptr },
{ AC_Element, "c4", "", nullptr },
{ AC_Text, "status", nullptr, nullptr },
{ AC_Element, "c5", "", nullptr }
};
const AutoConnectUpdateAct::ACPage_t AutoConnectUpdateAct::_pageProgress PROGMEM = {
AUTOCONNECT_URI_UPDATE_ACT, "Update", false, AutoConnectUpdateAct::_elmProgress
};
// Definition of the AUTOCONNECT_URI_UPDATE_RESULT page to notify update results
const AutoConnectUpdateAct::ACElementProp_t AutoConnectUpdateAct::_elmResult[] PROGMEM = {
{ AC_Text, "status", nullptr, nullptr },
{ AC_Element, "restart", "", nullptr }
};
const AutoConnectUpdateAct::ACPage_t AutoConnectUpdateAct::_pageResult PROGMEM = {
AUTOCONNECT_URI_UPDATE_RESULT, "Update", false, AutoConnectUpdateAct::_elmResult
};
#endif // _AUTOCONNECTUPDATEPAGE_H