Added OTA from gravmon.com
This commit is contained in:
parent
8ca51a2888
commit
3505673652
@ -474,6 +474,30 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row mb-3">
|
||||||
|
<div class="col-sm-4 offset-sm-2">
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" name="gravitymon-com" id="gravitymon-com" data-bs-toggle="tooltip" title="If enabled gravitymon.com will be checked for new versions.">
|
||||||
|
<label class="form-check-label" for="gravitymon-com">OTA from gravitymon.com</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var gravitymonUrl = "https://www.gravitymon.com/firmware/";
|
||||||
|
|
||||||
|
$("#gravitymon-com").click(function(e){
|
||||||
|
var b = $("#gravitymon-com").is(":checked");
|
||||||
|
|
||||||
|
if ( b ) {
|
||||||
|
$("#ota-url").val(gravitymonUrl);
|
||||||
|
$("#ota-url").prop("disabled", true);
|
||||||
|
} else {
|
||||||
|
$("#ota-url").prop("disabled", false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<div class="row mb-3">
|
<div class="row mb-3">
|
||||||
<div class="col-sm-8 offset-sm-2">
|
<div class="col-sm-8 offset-sm-2">
|
||||||
<button type="submit" class="btn btn-primary" id="hardware-btn" data-bs-toggle="tooltip" title="Save changes in this section">Save</button>
|
<button type="submit" class="btn btn-primary" id="hardware-btn" data-bs-toggle="tooltip" title="Save changes in this section">Save</button>
|
||||||
@ -804,14 +828,14 @@
|
|||||||
$("#test-btn2").prop("disabled", b);
|
$("#test-btn2").prop("disabled", b);
|
||||||
$("#advanced-btn").prop("disabled", b);
|
$("#advanced-btn").prop("disabled", b);
|
||||||
|
|
||||||
checkAdvancedSection( b );
|
checkAdvancedSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#adv-config").click(function(e){
|
$("#adv-config").click(function(e){
|
||||||
checkAdvancedSection();
|
checkAdvancedSection();
|
||||||
});
|
});
|
||||||
|
|
||||||
function checkAdvancedSection( b ) {
|
function checkAdvancedSection() {
|
||||||
var b = $("#adv-config").is(":checked");
|
var b = $("#adv-config").is(":checked");
|
||||||
|
|
||||||
$("#advanced-btn").prop("disabled", b);
|
$("#advanced-btn").prop("disabled", b);
|
||||||
@ -899,6 +923,12 @@
|
|||||||
if( cfg["gravity-format"] == "G" ) $("#gravity-format-g").click();
|
if( cfg["gravity-format"] == "G" ) $("#gravity-format-g").click();
|
||||||
else $("#gravity-format-p").click();
|
else $("#gravity-format-p").click();
|
||||||
$("#ota-url").val(cfg["ota-url"]);
|
$("#ota-url").val(cfg["ota-url"]);
|
||||||
|
|
||||||
|
if( cfg["ota-url"] == gravitymonUrl) {
|
||||||
|
$("#gravitymon-com").prop( "checked", true );
|
||||||
|
$("#ota-url").prop("disabled", true);
|
||||||
|
}
|
||||||
|
|
||||||
$("#token").val(cfg["token"]);
|
$("#token").val(cfg["token"]);
|
||||||
$("#token2").val(cfg["token2"]);
|
$("#token2").val(cfg["token2"]);
|
||||||
$("#http-push").val(cfg["http-push"]);
|
$("#http-push").val(cfg["http-push"]);
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user