Improved Virtual Meter Editor
parent
23412c2817
commit
3f096b592d
|
@ -84,7 +84,7 @@
|
|||
</form>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<table id="variablesTable" class="footable table table-bordered table-hover" data-sort="false" data-page-size="7" >
|
||||
<table id="variablesTable" class="footable table table-bordered table-hover" data-sort="false" data-page-size="20" >
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">{{'SETTING.VARIABLE_NAME' | translate}}</th>
|
||||
|
|
|
@ -86,10 +86,10 @@ class VirtualMeterCollection:
|
|||
if meta_result["equation"] is not None:
|
||||
expression = {'equation': meta_result["equation"], 'variables': []}
|
||||
|
||||
query_variables = (" SELECT v.id, v.name, v.meter_type, v.meter_id "
|
||||
query_variables = (" SELECT v.id, v.name, v.meter_type, v.meter_id, SUBSTRING(v.name,2) as name2"
|
||||
" FROM tbl_virtual_meters vm, tbl_variables v "
|
||||
" WHERE vm.id = %s AND v.virtual_meter_id = vm.id "
|
||||
" ORDER BY v.name ")
|
||||
" ORDER BY name2+0 ")
|
||||
cursor.execute(query_variables, (meta_result['id'],))
|
||||
rows_variables = cursor.fetchall()
|
||||
if rows_variables is not None:
|
||||
|
|
Loading…
Reference in New Issue