Move logic from view.

Signed-off-by: Horváth Balázs <q@qroa.ch>
const a def configban is.

Signed-off-by: Horváth Balázs <q@qroa.ch>