Merge branch 'main' into module/timetracking

This commit is contained in:
2025-08-17 22:44:03 +02:00
5 changed files with 29 additions and 9 deletions

View File

@@ -40,4 +40,22 @@ tasks.jar {
.get() .get()
.map(::zipTree) // OR .map { zipTree(it) } .map(::zipTree) // OR .map { zipTree(it) }
from(dependencies) from(dependencies)
dependsOn(
":bookmark:jar",
":company:jar",
":contact:jar",
":core:jar",
":documents:jar",
":items:jar",
":legacy:jar",
":markdown:jar",
":messages:jar",
":notes:jar",
":project:jar",
":tags:jar",
":task:jar",
":time:jar",
":translations:jar",
":user:jar",
":web:jar")
} }

View File

@@ -84,6 +84,6 @@ public class Application {
server.setExecutor(Executors.newFixedThreadPool(threads)); server.setExecutor(Executors.newFixedThreadPool(threads));
server.start(); server.start();
LOG.log(INFO,"Started web server at {0}",port); LOG.log(INFO,"Started web server at port {0}",port);
} }
} }

View File

@@ -72,7 +72,7 @@ public class Util {
public static String markdown(String source){ public static String markdown(String source){
if (source == null) return source; if (source == null) return source;
try { try {
if (plantumlJar.exists()) { if (plantumlJar != null && plantumlJar.exists()) {
var matcher = UML_PATTERN.matcher(source); var matcher = UML_PATTERN.matcher(source);
if (matcher.find()) { if (matcher.find()) {
var uml = matcher.group(0).trim(); var uml = matcher.group(0).trim();
@@ -98,7 +98,7 @@ public class Util {
return MARKDOWN.text(source); return MARKDOWN.text(source);
} catch (Exception e){ } catch (Exception e){
if (LOG.isLoggable(TRACE)){ if (LOG.isLoggable(TRACE)){
LOG.log(TRACE,"Failed to render markdown, input was: \n{0}",source); LOG.log(TRACE,"Failed to render markdown, input was: \n{0}",source,e);
} else LOG.log(WARNING,"Failed to render markdown. Enable TRACE log level for details."); } else LOG.log(WARNING,"Failed to render markdown. Enable TRACE log level for details.");
return source; return source;
} }
@@ -136,12 +136,12 @@ public class Util {
} }
var method = query == null ? GET : POST; var method = query == null ? GET : POST;
try { try {
LOG.log(DEBUG,"sending {0} request ({1}) to {2}",method,postMime == null ? "empty" : postMime,target); LOG.log(DEBUG, "sending {0} request ({1}) to {2}", method, postMime == null ? "empty" : postMime, target);
LOG.log(TRACE,"postData = {0}",query); LOG.log(TRACE, "postData = {0}", query);
var conn = open(target); var conn = open(target);
conn.setRequestMethod(method); conn.setRequestMethod(method);
conn.setRequestProperty(CONTENT_TYPE, postMime); conn.setRequestProperty(CONTENT_TYPE, postMime);
if (auth != null) conn.setRequestProperty(AUTHORIZATION,auth); if (auth != null) conn.setRequestProperty(AUTHORIZATION, auth);
if (query != null) { if (query != null) {
conn.setDoOutput(true); conn.setDoOutput(true);
var out = conn.getOutputStream(); var out = conn.getOutputStream();
@@ -161,8 +161,10 @@ public class Util {
var is = conn.getErrorStream(); var is = conn.getErrorStream();
is.transferTo(bos); is.transferTo(bos);
is.close(); is.close();
throw new UmbrellaException(500,bos.toString(UTF_8)); throw new UmbrellaException(500, bos.toString(UTF_8));
} }
} catch (UmbrellaException e){
throw e;
} catch (Exception e) { } catch (Exception e) {
LOG.log(WARNING,"Request to {0} failed: {1}",target,e.getMessage()); LOG.log(WARNING,"Request to {0} failed: {1}",target,e.getMessage());
throw new UmbrellaException(500,"Request to {0} failed!",target).causedBy(e); throw new UmbrellaException(500,"Request to {0} failed!",target).causedBy(e);

View File

@@ -14,7 +14,7 @@
let types = $state(null); let types = $state(null);
async function loadTypes(){ async function loadTypes(){
const url = api('api/document/types'); const url = api('document/types');
var resp = await fetch(url,{credentials: 'include'}); var resp = await fetch(url,{credentials: 'include'});
if (resp.ok){ if (resp.ok){
types = await resp.json(); types = await resp.json();

View File

@@ -242,5 +242,5 @@
{/if} {/if}
</tbody> </tbody>
</table> </table>
<button onclick={saveTask}>{t('save_task')}</button> <button onclick={saveTask}>{t('save_object',{object:t('task')})}</button>
</fieldset> </fieldset>