Coder Social home page Coder Social logo

openforis / collect Goto Github PK

View Code? Open in Web Editor NEW
51.0 51.0 145.0 377.25 MB

Flexible tool for creating surveys of any type

Home Page: http://www.openforis.org/tools/collect.html

License: MIT License

Shell 0.01% Java 50.32% XSLT 0.07% CSS 4.09% JavaScript 41.94% Batchfile 0.02% HTML 0.46% TSQL 0.01% SCSS 2.57% Less 0.50% Dockerfile 0.01%

collect's People

Contributors

adeir avatar brianl9995 avatar cdanielw avatar dependabot[bot] avatar gmlewis avatar herrtunante avatar laurivesa avatar minotogna avatar rfontanarosa avatar stericcio avatar swdevbali avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

collect's Issues

export error

I tried to adjust plantations_brazil.cep (http://www.openforis.org/tools/collect-earth.html) to my application based on Open Foris Collect (Version: 3.24.20, the latest version). Then i tried to export the adjusted survey using Collect earth mode. But Export survey failed. And 'Error generating file: null' was appeared.

Create a new survey : Leave the Template empty and show a validation error

Many users create a survey using the blank template when they actually want to create a Collect Earth survey.

If the template field is left empty, with a validation error saying that you should choose a template, then the user will be a lot more conscious about what kind of survey to create.

ALSO: Once the user chooses a template we should show a little text under the select box clarifying what these templates are.

Text :
Blank -> Create a completely new survey from scratch with no pre-loaded attributes
Biophysical -> Base for a National Forest Inventory survey based on a Cluster/Plot sampling approach
Collect Earth -> Basic Collect Earth survey containing all necessary attributes without extras. Collect Earth needs some standard attributes in a survey and this template provides them, you then need to add your own questions.
Collect Earth + IPCC -> Start with a Collect Earth survey already containing the basic IPCC Land Use representation Categories/Conversion/Subdivision. This survey can be used for FREL/GHGi activity data collection. This survey can be extended or modified.

Align the fields

Right now alignment is a bit of a mess....can youi try to align everything equally??
look at the image
image

Installation on Ubuntu

I'm trying to install Collect in my Ubuntu machine but I have found some issues:

  • by default the installation is done on /root/OpenForis, is there a reason for that? I installed CollectEarth and in this case it was on /home/user/OpenForis, so I would expect to have it here as well.
  • the installation window shows the description in white color, which I think is related with the dark theme I'm using:
    image
  • after the installation is done, there no icon created on /usr/shared/applications/ meaning that I have to search the launcher on /home/user/OpenForis/Collect/....

My OS details below:

Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.2 LTS
Release:	22.04
Codename:	jammy

Change CSS to make fonts smaller

I have a 14 inch screen. If I want to work in Collect I need to make the text smaller (Ctr + - ) a few times. Maybe you can reduce the size of the fonts directly on the CSS or use some responsive concepts?? Right now you cannot see almost any fields and there is a lot of scrolling to do anything...
This is how it looks :

image

Failure to export survey, "Error generating file: null" message appears.

Dear Open Foris Collect,

I have been unsuccessful in posting a question on the online community support forum, where I am constantly redirected to a page saying "500 Server Error. Sorry, system error.". Thus, I am contacting you via GitHub instead.

Recently, I updated both Collect and Collect Earth to their latest versions (ver 1.8.2 and ver 3.24.21 respectively). I created a new survey (for Collect Earth) in the Survey Designer. After customizing the "Info", "Code List" and "Schema" tabs in the survey, I saved it, and validated it. A popup message confirmed there were no errors in the survey.

However, when I attempt to export this survey (temporary), it would say "Failed". When I try exporting the survey within the survey itself (via the Settings "gear" symbol), an error message "Error generating file: null" appears. I tried uninstalling-reinstalling Collect and Collect Earth, and also recreated the survey on another computer (where Collect and Collect Earth were never downloaded before), the same error message appears.

Upon further investigation, this newly made survey is not the only one I am unable to export. It turns out that I am unable to export any and all surveys within my List of Surveys. This includes surveys created in previous versions of Collect, as well as template surveys such as the UMD Brazil and Congo example surveys available on the Collect webpage (I could import them into the Survey Designer, but could not export them).

Hoping for your kind advice on the matter. Attached is the log file for Collect. I am able to export it for Collect Desktop and Collect Mobile, but not Collect Earth. I am also able to import the file previously exported for Collect Desktop into the Survey Designer, but am unable to export it to Collect Earth.

Warmest regards,
J Johanness

collect_server-05-17-2019-1.log

docker collect cannot connect to db

Hi,
it seems that ther is a mismatch between docker database and docker collect. maybe we need to fix:

$ docker run -m 4GB -p 8080:8080 --env-file ./collect.env openforis/collect:latest

first error message:
... org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/openforis/collect/application-context-core.xml]: Invocation of init method failed; nested exception is liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Cannot create PoolableConnectionFactory (Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.) ...

Open log files from the Collect window

Since users sometimes have to send log files, make the process easier by including an item on the Help menu to open the log files folder.
Something like "View application logs". This would open the Folder where the logs are located.

image

Improve Home page!

Right now the Home page is useless....

I would include sections on

"How to start" ( workflow on how to create a survey
"How to use on Collect Mobile" ( workflow on loading the survey on Collect Mobile
"After data is collected" -> On how to clean the data and visualize it...

Short explanations but at least saying something about the tool....

Hide "Radibox/Chackbox" option in the code layout for CE surveys

The third option is not supported by CE.
Only selects or buttons are supported.
Can you hide the third option "Radiobox or Checkbox" for CE surveys??

Also, change the name " Text box" with " Multiple buttons" ?? what we have in the form is nothing similar to a text box

image

Species table does not import legitimately hyphenated species, cultivars

I have 2 issues:

  1. I am wondering if hyphens can be allowed into the species table scientific_name in varieties?
    For example Liatris scariosa var. novae-angliae <-- note the hyphen, this is the correct spelling.
    https://www.plants.usda.gov/core/profile?symbol=LISCN2

  2. I am wondering if it is possible to add 'cv.' for cultivar to the list of legitimate categories for the species table scientific_name? As far as I can tell only 'spp.', 'subsp.' and 'var.' are currently allowed
    Cultivar names need to allow for capital letters, numbers and spaces, probably there should be no quality control on cultivar names.

Thanks for your input on these requests. If you could at least point me to the correct areas of the code I can make my own edits.

-Thayer

Code list buttons not visible

When using the 100% (standard zoom) in Chrome.
When clicking on a code list editing button next to a a code attribute selector or available code lists
When the code list is not hierarchical, only one list of codes shown (i.e. the list of years of LU change)
Dialog appears, but the list of codes is not scrollable and the button to add new codes is not visible!

image

HTTP 404 error when runnig the Openforis Collect Docker container

I runned the Postgresql Docker container and the Collect Docker container
and i had the "HTTP 404" error message when trying to load "http://localhost:8080/collect"

when running the Collect Docker container i had this error message "Connection to localhost:5432 refused" . more detail below

2023-06-13 11:09:00,452 WARN [main] support.AbstractApplicationContext (AbstractApplicationContext.java:591) - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/openforis/collect/application-context-core.xml]: Invocation of init method failed; nested exception is liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Cannot create PoolableConnectionFactory (Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)

2023-06-13 11:09:00,456 ERROR [main] context.ContextLoader (ContextLoader.java:299) - Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/openforis/collect/application-context-core.xml]: Invocation of init method failed; nested exception is liquibase.exception.UnexpectedLiquibaseException: java.sql.SQLException: Cannot create PoolableConnectionFactory (Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)

any one had this issue?

this is my collect.env file
COLLECT_DB_DRIVER=org.postgresql.Driver
COLLECT_DB_URL=jdbc:postgresql://localhost:5432/arena
COLLECT_DB_USERNAME=arena
COLLECT_DB_PASSWORD=arena

this was the command to run Postgresql container
docker run -d --name collect-db -p 5432:5432 -e POSTGRES_DB=arena -e POSTGRES_PASSWORD=arena -e POSTGRES_USER=arena postgis/postgis:12-3.0

and this was the command to run the collect container
docker run -m 4GB -p 8080:8080 --env-file ./collect.env openforis/collect:latest

and i tried with diffrent database connexion parameter
database login passwd
collect collect collect123
arena arena arena

jOOQ DataAccesException: when adding plot and importing backup with existing plots

Environment

Steps to reproduce
Add new plot or import backup with existing plots

Exception logged

28-Sep-2021 17:33:32.173 SEVERE [SimpleAsyncTaskExecutor-42] org.openforis.concurrency.Worker.logError Error running worker (status: RUNNING): SQL [select count() from "collect"."ofc_sampling_design" where ("collect"."ofc_sampling_design"."survey_id" = ? and "collect"."ofc_sampling_design"."level1" = ? and "collect"."ofc_sampling_design"."level2" is not null and "collect"."ofc_sampling_design"."level3" is null) order by "collect"."ofc_sampling_design"."id" asc]; ERROR: column "ofc_sampling_design.id" must appear in the GROUP BY clause or be used in an aggregate function
Position: 280
org.jooq.exception.DataAccessException: SQL [select count(
) from "collect"."ofc_sampling_design" where ("collect"."ofc_sampling_design"."survey_id" = ? and "collect"."ofc_sampling_design"."level1" = ? and "collect"."ofc_sampling_design"."level2" is not null and "collect"."ofc_sampling_design"."level3" is null) order by "collect"."ofc_sampling_design"."id" asc]; ERROR: column "ofc_sampling_design.id" must appear in the GROUP BY clause or be used in an aggregate function
Position: 280
at org.jooq.impl.Utils.translate(Utils.java:1645)
at org.jooq.impl.DefaultExecuteContext.sqlException(DefaultExecuteContext.java:661)
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:356)
at org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:319)
at org.jooq.impl.AbstractResultQuery.fetchLazy(AbstractResultQuery.java:306)
at org.jooq.impl.AbstractResultQuery.fetchOne(AbstractResultQuery.java:440)
at org.jooq.impl.AbstractResultQuery.fetchOne(AbstractResultQuery.java:408)
at org.jooq.impl.AbstractResultQuery.fetchOne(AbstractResultQuery.java:414)
at org.openforis.collect.persistence.SamplingDesignDao.countChildItems(SamplingDesignDao.java:203)
at org.openforis.collect.persistence.SamplingDesignDao$$FastClassBySpringCGLIB$$5210c7cb.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:688)
at org.openforis.collect.persistence.SamplingDesignDao$$EnhancerBySpringCGLIB$$9a29e71b.countChildItems()
at org.openforis.collect.persistence.DatabaseExternalCodeListProvider.hasChildItems(DatabaseExternalCodeListProvider.java:227)
at org.openforis.collect.persistence.DatabaseExternalCodeListProvider$$FastClassBySpringCGLIB$$10fc7304.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:779)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692)
at org.openforis.collect.persistence.DatabaseExternalCodeListProvider$$EnhancerBySpringCGLIB$$43b13466.hasChildItems()
at org.openforis.collect.manager.CodeListManager.hasChildItems(CodeListManager.java:498)
at org.openforis.collect.manager.CodeListManager.hasItems(CodeListManager.java:360)
at org.openforis.collect.manager.CodeListManager$$FastClassBySpringCGLIB$$72c1af0e.invoke()
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:779)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:692)
at org.openforis.collect.manager.CodeListManager$$EnhancerBySpringCGLIB$$6439bec4.hasItems()
at org.openforis.collect.service.CollectCodeListService.hasItems(CollectCodeListService.java:52)
at org.openforis.idm.metamodel.validation.MinCountValidator.isAvailableCodeListItems(MinCountValidator.java:79)
at org.openforis.idm.metamodel.validation.MinCountValidator.evaluate(MinCountValidator.java:56)
at org.openforis.collect.model.validation.CollectMinCountValidator.evaluate(CollectMinCountValidator.java:30)
at org.openforis.idm.metamodel.validation.Validator.validateMinCount(Validator.java:59)
at org.openforis.collect.model.validation.CollectValidator.validateMinCount(CollectValidator.java:133)
at org.openforis.collect.model.RecordUpdater.validateCardinality(RecordUpdater.java:537)
at org.openforis.collect.model.RecordUpdater.initializeEntity(RecordUpdater.java:924)
at org.openforis.collect.model.RecordUpdater.addEntity(RecordUpdater.java:202)
at org.openforis.collect.model.RecordUpdater.addNode(RecordUpdater.java:179)
at org.openforis.collect.command.handler.AddNodeCommandHandler.executeForResult(AddNodeCommandHandler.java:16)
at org.openforis.collect.command.handler.AddNodeCommandHandler.executeForResult(AddNodeCommandHandler.java:9)
at org.openforis.collect.command.handler.RecordCommandHandler$1$1.execute(RecordCommandHandler.java:72)
at org.openforis.concurrency.Worker.run(Worker.java:103)
at org.openforis.concurrency.Job.runTask(Job.java:95)
at org.openforis.concurrency.Job.execute(Job.java:80)
at org.openforis.concurrency.Worker.run(Worker.java:103)
at org.openforis.concurrency.SimpleJobManager$2.run(SimpleJobManager.java:120)
at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:280)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.postgresql.util.PSQLException: ERROR: column "ofc_sampling_design.id" must appear in the GROUP BY clause or be used in an aggregate function
Position: 280
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2565)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2297)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:322)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:481)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:401)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:164)
at org.postgresql.jdbc.PgPreparedStatement.execute(PgPreparedStatement.java:153)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at org.jooq.tools.jdbc.DefaultPreparedStatement.execute(DefaultPreparedStatement.java:194)
at org.jooq.impl.AbstractResultQuery.execute(AbstractResultQuery.java:247)
at org.jooq.impl.AbstractQuery.execute(AbstractQuery.java:342)
... 57 more

Make nicer buttons for export preview and advanced

Just use some material-ui icons for the export and preview!
Also, for the save icon maybe you should also use the material-ui theme so the design is consistente everywhere??
https://mui.com/material-ui/material-icons/?query=preview&selected=Preview

The advanced functions icons is way too small...maybe also use a button with icon with the text "Advanced..." and this icon :
https://mui.com/material-ui/material-icons/?query=settings&selected=Settings

image

Migrate data entry UI from Flex (Flash Player) to JavaScript

The migration to the new UI will be progressive, adding support to the following features:

  • Tabs
  • Nested Tabs
  • Multiple entities (Form Layout)
  • Multiple entities (Table Layout)
    • Adjust attributes layout in table
  • Attribute types:
    • Boolean
      • support checkbox mode
      • support text mode (y, n, blank)
    • Code
      • support large code lists
      • hierarchical code lists
      • multiple attributes
      • show item descriptions
      • qualifiable code list items (specify text)
      • enumerated entities
      • multiple code attribute validation
    • Coordinate
    • Date
    • File
    • Number
    • Range
    • Taxon
    • Text
      • Large texts (memo)
      • Automatic uppercase
    • Time
  • Calculated attributes
  • Validations
    • Attribute validations
    • Min/Max count
  • Relevance
    • Hide not relevant fields
    • Show not relevant fields in gray
    • Hide table column when there aren't relevant fields in any rows
    • Hide tabs when there aren't relevant fields
  • Form versions
  • Multiple languages
    • Survey labels
    • Validation messages
  • Promote/demote record
  • Show validation errors in popup
  • Validation feedback
  • System error feedback
  • Export record to CSV/Excel
  • Reason blank (blank on form, illegible, dashed)
  • Remarks
  • Multiple columns in forms

Code List edit icon is not clear

Change the icon to make it as wide as the select.
Add a text to the icon so it is more clear (not a tooltip, but make it a button with icon and text) Something like change/edit codelist

image

Add Help section on the left panel

Add a new section on the left panel :

Help
-> Documentation (open PDF file)
-> Support Forum (open the openforis.support )
-> Materials ( go to the materials page)
-> Expressions (don't we have some documentation on how to write expressions)??
... other ?

Tooltip explaining what required means

For us it is clear, not so much for new users.

Add tooltip saying that , if field if required the survey validation will complain if the user does not fill this field.
Maybe we should also add an asterisk by default to required attributes (this seems to be the standard in most forms)

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.