Merge branch 'PR' into develop
commit
cc5269fd18
|
@ -84,7 +84,7 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-8">
|
<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>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-center">{{'SETTING.VARIABLE_NAME' | translate}}</th>
|
<th class="text-center">{{'SETTING.VARIABLE_NAME' | translate}}</th>
|
||||||
|
|
|
@ -86,10 +86,10 @@ class VirtualMeterCollection:
|
||||||
if meta_result["equation"] is not None:
|
if meta_result["equation"] is not None:
|
||||||
expression = {'equation': meta_result["equation"], 'variables': []}
|
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 "
|
" FROM tbl_virtual_meters vm, tbl_variables v "
|
||||||
" WHERE vm.id = %s AND v.virtual_meter_id = vm.id "
|
" 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'],))
|
cursor.execute(query_variables, (meta_result['id'],))
|
||||||
rows_variables = cursor.fetchall()
|
rows_variables = cursor.fetchall()
|
||||||
if rows_variables is not None:
|
if rows_variables is not None:
|
||||||
|
|
Loading…
Reference in New Issue