Files
IoTManager/data/set.mqtt.json

133 lines
3.6 KiB
JSON
Raw Normal View History

2020-09-02 22:34:49 +03:00
{
"configs": [
"/config.setup.json",
"/lang/lang.ru.json"
],
"class": "col-sm-offset-1 col-sm-10 col-md-offset-2 col-md-8 col-lg-offset-3 col-lg-6",
"content": [
{
"type": "h5",
"title": "{{name}}",
"class": "alert-default"
},
{
"type": "link",
"title": "{{ButMainPage}}",
"action": "/",
"class": "btn btn-block btn-default"
},
{
"type": "hr"
},
{
"type": "h4",
"title": "{{SetMQTTServerName}}",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "mqttServer-arg",
"state": "{{mqttServer}}",
"style": "width:40%;float:right"
},
{
"type": "h4",
"title": "{{SetMQTTPort}}",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "mqttPort-arg",
"state": "{{mqttPort}}",
"style": "width:40%;float:right"
},
{
"type": "h4",
"title": "{{SetMQTTPrefix}}",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "mqttPrefix-arg",
"state": "{{mqttPrefix}}",
"style": "width:40%;float:right"
},
{
"type": "h4",
"title": "{{SetMQTTUserName}}",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "mqttUser-arg",
"state": "{{mqttUser}}",
"style": "width:40%;float:right"
},
{
"type": "h4",
"title": "{{SetMQTTPassword}}",
"style": "width:60%;float:left;"
},
{
"type": "input",
"title": "",
"name": "mqttPass-arg",
"state": "{{mqttPass}}",
"style": "width:40%;float:right"
},
{
"type": "h3",
"name": "my-block",
"style": "position:fixed;top:30%;left:50%;width:400px;margin-left:-200px;text-align:center;",
"class": "hidden"
},
{
"type": "button",
"title": "{{ButSave}}",
"style": "width:100%;float:left;",
"action": "set?mqttServer=[[mqttServer-arg]]&mqttPort=[[mqttPort-arg]]&mqttPrefix=[[mqttPrefix-arg]]&mqttUser=[[mqttUser-arg]]&mqttPass=[[mqttPass-arg]]",
"class": "btn btn-block btn-default"
},
{
"type": "button",
"style": "width:100%;float:left;",
"title": "{{SetMQTTSendSettings}}",
"action": "set?mqttsend",
"class": "btn btn-block btn-default"
},
{
"type": "button",
"style": "width:100%;float:left;",
"title": "Проверить соединение с MQTT",
"action": "set?mqttcheck",
"response": "[[my-block]]",
"class": "btn btn-block btn-default"
},
{
"type": "text",
"style": "width:100%;float:left;",
"title": "<div style='margin-top:10px;margin-bottom:10px;'><font color='black'><p style='border: 1px solid #DCDCDC; border-radius: 3px; background-color: #F5F5F5; padding: 10px;'>{{SetMQTTWarn1}}</p></font></div>"
},
{
"type": "text",
"style": "width:100%;float:left;",
"title": "<div style='margin-top:10px;margin-bottom:10px;'><font color='black'><p style='border: 1px solid #DCDCDC; border-radius: 3px; background-color: #F5F5F5; padding: 10px;'>{{SetMQTTWarn2}}</p></font></div>"
},
{
"type": "link",
"style": "width:100%;float:left;",
"title": "Перезагрузить устройство",
"action": "javascript:if(confirm(renameBlock(jsonResponse,'Перезагрузить?'))){send_request(this,'/restart?device=ok');}",
"class": "btn btn-block btn-danger"
}
]
}