- Java 85.7%
- HTML 14%
- CSS 0.3%
| gradle | ||
| src/main | ||
| .gitignore | ||
| build.gradle | ||
| changerequests.md | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| index.html | ||
| package-lock.json | ||
| readme.md | ||
| settings.gradle | ||
| Timesheets.code-workspace | ||
Technical requirements:
- Java 7
- Tomcat 7
- MySQL Database 5.5
- LDAP Server for user authentication (OpenLDAP, Active Directory)
Installation instructions:
MySQL
- Create a database in mysql create database timesheets default charset utf8;
- Create a user and grant privileges grant all on timesheets.* to 'tsuser'@'%' identified by 'tspwd';
- Log in to MySQL with the user just defined and run the script timesheets.sql found under scripts (make sure triggers get created, this may require running the script as root)
Tomcat
- Copy MySQL Connector/J + java mail + java activation framework jar files to the lib directory under tomcat installation
- Edit conf/server.xml to add the following to the GlobalNamingResources element (of course adapt to the settings defined at previous step)
Customize, compile, package and deploy app
-
Copy seetings_sample.xml to settings.xml
-
Update settings.xml to reflect your local installation
- in servers section, update the server definition by specifying the admin username and password, or alternatively create a new server entry
- in the profile section, define the following properties:
- settings.security_template: should be AD if you use Active Directory or LDAP if you use a LDAP server
- settings.ldap_url: url of the LDAP or AD server incl. root dn
- settings.ldap_search_node: LDAP node under which users can be found
- settings.ldap_bind_dn: DN to use to bind to LDAP for search operations
- settings.ldap_bind_password: password to bind to LDAP for search operations
- settings.ldap_search_attr: attribute used to search for users. Can be mail, sAMAccountName, uid...
- settings.logo_file: filename of your logo, which should be found under src/main/config/config_name where config_name is defined in your settings.xml
- settings.as_url: URL of the tomcat server to deploy the app
- settings.as_name: name of the tomcat server defined in the servers section
- settings.as_context: context to which the application should be deployed
-
Compile, package and deploy (assuming that you kept the profile name to dev) mvn -s settings.xml -P dev clean package tomcat7:redeploy
-
Users are created upon their first login, so there is no need to create users before
-
For the first user to get SUPER admin rights, update has to be done manually in the database update users set level='SUPER' where userid = xxxx;
From then on, the user has the privileges to grant ADMIN and SUPER privileges to others
There is a (very) limited documentation available under doc/doc.html## 20200501
Added the possibility to add a report on the logo
- add a configuration field (+ database table) to ask and store the logo
- modify the jasper servlet to add the logo to the request
- update the jasper templates to include the logo
Due to changes to java11, many things break; jaxb no longer exists, so I need to include the libraries (api + impl) in the pom I have upgraded to PrimeFaces 7.0 I have upgraded to JasperReport 6.12 and jasper report maven plugin 2.7
Also dependency injection no longer works; I have to include libraries in tomcat
Java 11 Tomcat8 MySQL