forked from consometers/consoherozh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Grails 3 some fixes ( including issue consometers#6 )
- Fix create of a user from an administrator - consometers#6 - create applicationKey on server side on the fly in UserService - When slecting device and deviceType some icons are missing - linky & manual counter icon ( to improve ) - Creating a House within USer profile - display profile without error if house is missing - Workaround a stackoverflow infinite recursion when saving a profile with a house. - cleanup some unused imports
- Loading branch information
Showing
8 changed files
with
103 additions
and
25 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 8 additions & 23 deletions
31
grails-app/services/smarthome/automation/ChartService.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<g:set var="fournisseur" value="${ device?.metadata('fournisseur') }"/> | ||
|
||
<g:if test="${ fournisseur?.id }"> | ||
<g:hiddenField name="metadatas[0].id" value="${ fournisseur.id }"/> | ||
</g:if> | ||
|
||
<g:hiddenField name="metadatas[0].name" value="fournisseur"/> | ||
|
||
<div class="field-group"> | ||
<label title="API : device.metadata('fournisseur')?.value"> | ||
Fournisseur | ||
</label> | ||
<g:select name="metadatas[0].value" value="${ fournisseur?.value }" class="select" optionKey="libelle" optionValue="libelle" | ||
from="${smarthome.automation.DeviceTypeProvider.findAllByDeviceType(device?.deviceType)}" | ||
noSelection="['': '']"/> | ||
</div> | ||
|
||
|
||
<g:set var="unite" value="${ device?.metadata('unite') }"/> | ||
|
||
<g:if test="${ unite?.id }"> | ||
<g:hiddenField name="metadatas[1].id" value="${ unite.id }"/> | ||
</g:if> | ||
|
||
<g:hiddenField name="metadatas[1].name" value="unite"/> | ||
|
||
<div class="field-group"> | ||
<label title="API : device.metadata('unite')?.value"> | ||
Unité | ||
</label> | ||
<g:field type="text" name="metadatas[1].value" value="${unite?.value}" class="text medium-field"/> | ||
</div> | ||
|
||
|
||
<g:set var="coefConversion" value="${ device?.metadata('coefConversion') }"/> | ||
|
||
<g:if test="${ coefConversion?.id }"> | ||
<g:hiddenField name="metadatas[2].id" value="${ coefConversion.id }"/> | ||
</g:if> | ||
|
||
<g:hiddenField name="metadatas[2].name" value="coefConversion"/> | ||
|
||
<div class="field-group"> | ||
<label title="API : device.metadata('coefConversion')?.value"> | ||
Coefficient de conversion | ||
</label> | ||
<g:field type="number decimal" name="metadatas[2].value" value="${coefConversion?.value}" class="text medium-field"/> | ||
<div class="description">Ce coefficient sera appliqué sur la consommation intermédiaire et non pas sur l'index total qui lui ne change pas</div> | ||
</div> |
35 changes: 35 additions & 0 deletions
35
grails-app/views/deviceType/manualCounter/_manualCounterForm.gsp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<g:set var="timeout" value="${ device?.metadata('timeout') }"/> | ||
|
||
<g:if test="${ timeout?.id }"> | ||
<g:hiddenField name="metadatas[0].id" value="${ timeout.id }"/> | ||
</g:if> | ||
|
||
<g:hiddenField name="metadatas[0].name" value="timeout"/> | ||
|
||
<div class="field-group"> | ||
<label title="API : device.metadata('timeout')?.value"> | ||
Timeout bouton poussoir (en millisecondes) | ||
</label> | ||
<g:field type="number" name="metadatas[0].value" value="${timeout?.value}" class="text medium-field"/> | ||
</div> | ||
|
||
|
||
<g:set var="defaulttimer" value="${ device?.metadata('defaulttimer') }"/> | ||
|
||
<g:if test="${ defaulttimer?.id }"> | ||
<g:hiddenField name="metadatas[1].id" value="${ defaulttimer.id }"/> | ||
</g:if> | ||
|
||
<g:hiddenField name="metadatas[1].name" value="defaulttimer"/> | ||
|
||
<div class="field-group"> | ||
<label title="API : device.metadata('defaulttimer')?.value"> | ||
Minuterie par défaut (en minutes) | ||
</label> | ||
<g:field type="text" name="metadatas[1].value" value="${defaulttimer?.value}" class="text medium-field"/> | ||
</div> | ||
|
||
|
||
<h4>Configuration périphérique</h4> | ||
<g:render template="/deviceType/generic/metadatasForm" | ||
model="[device: device, exclude: ['timeout', 'defaulttimer'], startStatus: 2, commitButton: true]"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters