diff --git a/grails-app/assets/images/deviceType/linky.png b/grails-app/assets/images/deviceType/linky.png new file mode 100644 index 00000000..724e07a0 Binary files /dev/null and b/grails-app/assets/images/deviceType/linky.png differ diff --git a/grails-app/assets/images/deviceType/manualCounter.png b/grails-app/assets/images/deviceType/manualCounter.png new file mode 100644 index 00000000..ac2d04e6 Binary files /dev/null and b/grails-app/assets/images/deviceType/manualCounter.png differ diff --git a/grails-app/services/smarthome/automation/ChartService.groovy b/grails-app/services/smarthome/automation/ChartService.groovy index 5a0ea939..8b6013cc 100644 --- a/grails-app/services/smarthome/automation/ChartService.groovy +++ b/grails-app/services/smarthome/automation/ChartService.groovy @@ -1,28 +1,13 @@ package smarthome.automation -import java.util.Date; -import java.util.List; - -import grails.converters.JSON; -import grails.plugin.cache.CachePut; -import grails.plugin.cache.Cacheable; - -import org.apache.commons.lang.StringUtils; -import grails.web.mapping.LinkGenerator; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.transaction.annotation.Propagation; -import grails.gorm.transactions.Transactional; - -import smarthome.core.AbstractService; -import smarthome.core.AsynchronousMessage; -import smarthome.core.ClassUtils; -import smarthome.core.QueryUtils; -import smarthome.automation.Chart; -import smarthome.core.ExchangeType; -import smarthome.core.SmartHomeException; -import smarthome.core.chart.ChartTransformer; -import smarthome.security.User; - +import grails.gorm.transactions.Transactional +import org.apache.commons.lang.StringUtils +import org.springframework.security.access.prepost.PreAuthorize +import smarthome.automation.Chart +import smarthome.core.AbstractService +import smarthome.core.ClassUtils +import smarthome.core.SmartHomeException +import smarthome.core.chart.ChartTransformer class ChartService extends AbstractService { diff --git a/grails-app/services/smarthome/automation/HouseService.groovy b/grails-app/services/smarthome/automation/HouseService.groovy index a82f5f2d..b594afc7 100644 --- a/grails-app/services/smarthome/automation/HouseService.groovy +++ b/grails-app/services/smarthome/automation/HouseService.groovy @@ -127,8 +127,10 @@ group by chauffage.libelle house.defaut = true house.name = "Maison principale" } - - return super.save(house) + + house.save(); + // grails 3, StackOverflow infinite recursion loop with super AbstractService + // return super.save(house) } diff --git a/grails-app/services/smarthome/security/UserService.groovy b/grails-app/services/smarthome/security/UserService.groovy index 952b8449..0b4c512c 100644 --- a/grails-app/services/smarthome/security/UserService.groovy +++ b/grails-app/services/smarthome/security/UserService.groovy @@ -104,6 +104,10 @@ class UserService extends AbstractService { user.lastActivation = new Date() user.passwordExpired = true user.password = UUID.randomUUID() // création d'un password fictif en attente du déblocage par l'utilisateur + // never save a User without an applicationKey and generate it only on server side. + if ( user.applicationKey == null ) { + user.applicationKey = UUID.randomUUID() + } } diff --git a/grails-app/views/deviceType/linky/_linkyForm.gsp b/grails-app/views/deviceType/linky/_linkyForm.gsp new file mode 100644 index 00000000..80d12ddd --- /dev/null +++ b/grails-app/views/deviceType/linky/_linkyForm.gsp @@ -0,0 +1,49 @@ + + + + + + + + +
+ + +
+ + + + + + + + + + +
+ + +
+ + + + + + + + + + +
+ + +
Ce coefficient sera appliqué sur la consommation intermédiaire et non pas sur l'index total qui lui ne change pas
+
\ No newline at end of file diff --git a/grails-app/views/deviceType/manualCounter/_manualCounterForm.gsp b/grails-app/views/deviceType/manualCounter/_manualCounterForm.gsp new file mode 100644 index 00000000..30fbd555 --- /dev/null +++ b/grails-app/views/deviceType/manualCounter/_manualCounterForm.gsp @@ -0,0 +1,35 @@ + + + + + + + + +
+ + +
+ + + + + + + + + + +
+ + +
+ + +

Configuration périphérique

+ \ No newline at end of file diff --git a/grails-app/views/house/_form.gsp b/grails-app/views/house/_form.gsp index 05a805ef..83808a67 100644 --- a/grails-app/views/house/_form.gsp +++ b/grails-app/views/house/_form.gsp @@ -7,10 +7,13 @@
Utilisé pour les prévisions météo sous la forme "ville et/ou code postal, pays". Ex : Lorient, France. Calculé tous les jours à minuit. + Calcul manuel +
+