2016-09-07 20:10:37 +02:00
|
|
|
|
|
|
|
|
2016-10-09 10:23:04 +02:00
|
|
|
var conf_editor = null;
|
2016-09-07 20:10:37 +02:00
|
|
|
$(hyperion).one("cmd-config-getschema", function(event) {
|
|
|
|
parsedConfSchemaJSON = event.response.result;
|
|
|
|
schema = parsedConfSchemaJSON.properties;
|
|
|
|
|
2016-10-09 10:23:04 +02:00
|
|
|
conf_editor = createJsonEditor('editor_container',
|
|
|
|
{
|
2016-09-10 23:30:05 +02:00
|
|
|
title:'',
|
2016-09-07 20:10:37 +02:00
|
|
|
properties: {
|
2016-09-21 22:01:50 +02:00
|
|
|
framegrabber: schema.framegrabber,
|
2016-10-09 10:23:04 +02:00
|
|
|
grabberV4L2 : schema.grabberV4L2
|
2016-09-07 20:10:37 +02:00
|
|
|
}
|
2016-10-09 10:23:04 +02:00
|
|
|
});
|
|
|
|
|
2016-09-10 23:30:05 +02:00
|
|
|
$('#editor_container .well').css("background-color","white");
|
|
|
|
$('#editor_container .well').css("border","none");
|
|
|
|
$('#editor_container .well').css("box-shadow","none");
|
|
|
|
$('#editor_container .btn').addClass("btn-primary");
|
|
|
|
$('#editor_container h3').first().remove();
|
|
|
|
|
2016-09-07 20:10:37 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$(document).ready( function() {
|
|
|
|
requestServerConfigSchema();
|
|
|
|
|
2016-09-10 19:08:08 +02:00
|
|
|
document.getElementById('btn_submit').addEventListener('click',function() {
|
2016-09-07 20:10:37 +02:00
|
|
|
// Get the value from the editor
|
2016-10-09 10:23:04 +02:00
|
|
|
console.log(conf_editor.getValue());
|
2016-09-07 20:10:37 +02:00
|
|
|
});
|
|
|
|
});
|
|
|
|
|