1
{% extends "base.html" %}
2
{% block title %}Property list{% endblock %}
4
<h1>List of properties in branch {{ branch }}</h1>
10
function set_property()
12
var value = document.getElementById("set_val_box").value;
13
window.location.href = "{{ url_for('set_property') }}?prop={{ branch }}&"+
4
<script src="{{ url_for('static', filename='codebase/dhtmlx.js') }}"></script>
5
<script src="{{ url_for('static', filename='check_err.js') }}"></script>
18
<table border="1" style="width:100%">
9
function updateProperty(prop) {
10
var pathToGetProperty = "{{ url_for('get_property_json') }}"
11
var completePath = pathToGetProperty + '?prop=' + prop
13
$.getJSON(completePath, function(json){
15
var valFieldId = "#actVal"+prop.split('/').join("_")
16
$(valFieldId).text(json.value)
20
function setProperty(prop)
22
var value = document.getElementById("set_val_" + prop).value;
26
var pathToGetProperty = "{{ url_for('set_property_json') }}"
27
var completePath = pathToGetProperty + '?prop=' + prop +
30
$.getJSON(completePath,
38
<table class="infoTable">
39
<tr class="infoTable">
40
<td class="infoTable">Name</td>
41
<td class="infoTable">Description</td>
42
<td class="infoTable">Value</td>
43
<td class="infoTable">Mode</td>
44
<td class="infoTable">Type</td>
45
<td class="infoTable">Unit</td>
46
<td class="infoTable">Path</td>
23
48
{% for property in properties %}
25
{% if ('childs' in property.flags) or (properties|length != 1) %}
26
<td><a href="{{ url_for('get_property_list', branch = property.path) }}">"{{ property.name }}"</td>
49
<tr class="infoTable">
50
<td class="infoTable">{{ property.name }}</td>
51
<td class="infoTable">
27
52
{% if 'description' in property %}
29
function set_property()
31
var value = document.getElementById("set_val_box").value;
32
window.location.href = "{{ url_for('set_property') }}?prop={{ branch }}&"+
36
<td>{{ property.description }}</td>
41
<td>{{ property.name }}"</td>
43
<table border="1" style="width:100%">
44
{% if 'description' in property %}
46
<th> Description </th>
47
<td> {{ property.description }} </td>
51
<th> Current value </th>
52
<td> {{ value }} </td>
54
{% if 'W' in property.mode %}
58
<input type="text" name="set_val_box" id="set_val_box" value="" />
59
<input type="button" value="set" onclick="set_property()">
67
{% for m in property.mode %}
75
<td> {{ property.type }} </td>
79
<td> {{ property.unit }} </td>
83
<td> {{ property.path }} </td>
53
{{ property.description }}
56
<td class="infoTable">
59
<td id = "actVal{{ property.path.replace('/', '_') }}" class="infoTable">
62
{% if 'R' in property.mode %}
64
<input type="button" value="update" style="width:100%;height:100%" onclick="updateProperty('{{ property.path }}')">
68
{% if 'W' in property.mode %}
71
<input type="text" name="set_val_{{ property.path }}" id="set_val_{{ property.path }}" value="" />
74
<input type="button" value="set" style="width:100%;height:100%" onclick="setProperty('{{ property.path }}')">
80
<td class="infoTable">
82
{% for m in property.mode %}
87
<td class="infoTable"> {{ property.type }} </td>
88
<td class="infoTable"> {{ property.unit }} </td>
89
<td class="infoTable"> {{ property.path }} </td>