diff --git a/.gitignore b/.gitignore index cb6708344..7d8381853 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .vscode .DS_Store src/python/.loglogin +.loglogin # Compiled files *.pyc diff --git a/src/java/LogrPortal/lib/flexmark-ext-tables-0.64.8.jar b/src/java/LogrPortal/lib/flexmark-ext-tables-0.64.8.jar new file mode 100644 index 000000000..9201e31bf Binary files /dev/null and b/src/java/LogrPortal/lib/flexmark-ext-tables-0.64.8.jar differ diff --git a/src/java/LogrPortal/nbproject/build-impl.xml b/src/java/LogrPortal/nbproject/build-impl.xml index f7b8a2414..4b99885de 100644 --- a/src/java/LogrPortal/nbproject/build-impl.xml +++ b/src/java/LogrPortal/nbproject/build-impl.xml @@ -17,7 +17,7 @@ - cleanup --> - + @@ -470,7 +470,7 @@ or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties f - + @@ -618,7 +618,7 @@ or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties f - + @@ -1041,6 +1041,7 @@ exists or setup the property manually. For example like this: + @@ -1104,6 +1105,7 @@ exists or setup the property manually. For example like this: + diff --git a/src/java/LogrPortal/nbproject/build-impl.xml~ b/src/java/LogrPortal/nbproject/build-impl.xml~ index f144c2662..f7b8a2414 100644 --- a/src/java/LogrPortal/nbproject/build-impl.xml~ +++ b/src/java/LogrPortal/nbproject/build-impl.xml~ @@ -17,7 +17,7 @@ - cleanup --> - + @@ -49,36 +49,6 @@ - - - - - - - - - - - - - - - - - - - Must set platform.home - Must set platform.bootcp - Must set platform.java - Must set platform.javac - - The J2SE Platform is not correctly set up. - Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files. - Either open the project in the IDE and setup the Platform with the same name or add it manually. - For example like this: - ant -Duser.properties.file=<path_to_property_file> jar (where you put the property "platforms.${platform.active}.home" in a .properties file) - or ant -Dplatforms.${platform.active}.home=<path_to_JDK_home> jar (where no properties file is used) - @@ -220,6 +190,15 @@ + + + + + + + + + @@ -314,7 +293,7 @@ or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties f - + @@ -351,7 +330,7 @@ or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties f - + @@ -428,7 +407,7 @@ or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties f - + @@ -451,7 +430,7 @@ or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties f - + @@ -491,7 +470,7 @@ or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties f - + @@ -569,7 +548,7 @@ or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties f - + @@ -593,7 +572,7 @@ or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties f - + @@ -639,7 +618,7 @@ or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties f - + @@ -716,7 +695,7 @@ or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties f - + @@ -748,9 +727,6 @@ or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties f - - - @@ -785,7 +761,7 @@ or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties f - + @@ -1293,9 +1269,6 @@ exists or setup the property manually. For example like this: - - - @@ -1418,7 +1391,7 @@ exists or setup the property manually. For example like this: --> - + diff --git a/src/java/LogrPortal/nbproject/genfiles.properties b/src/java/LogrPortal/nbproject/genfiles.properties index 1a378891c..3fef2f796 100644 --- a/src/java/LogrPortal/nbproject/genfiles.properties +++ b/src/java/LogrPortal/nbproject/genfiles.properties @@ -3,9 +3,9 @@ build.xml.script.CRC32=67492cbd build.xml.stylesheet.CRC32=1707db4f@1.94.0.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=69e278e8 -nbproject/build-impl.xml.script.CRC32=709f92a3 -nbproject/build-impl.xml.stylesheet.CRC32=334708a0@1.91.0.1 +nbproject/build-impl.xml.data.CRC32=6bee4305 +nbproject/build-impl.xml.script.CRC32=2ae95b31 +nbproject/build-impl.xml.stylesheet.CRC32=334708a0@1.94.0.1 nbproject/rest-build.xml.data.CRC32=83e13ee9 nbproject/rest-build.xml.script.CRC32=0d1fb1b4 nbproject/rest-build.xml.stylesheet.CRC32=0cfeebcc@1.31.1 diff --git a/src/java/LogrPortal/nbproject/project.properties b/src/java/LogrPortal/nbproject/project.properties index 853ccb196..b97d8bd5c 100644 --- a/src/java/LogrPortal/nbproject/project.properties +++ b/src/java/LogrPortal/nbproject/project.properties @@ -48,6 +48,7 @@ file.reference.dm-api-3.3.1.jar=lib/dm-api-3.3.1.jar file.reference.dm-base-3.3.1.jar=lib/dm-base-3.3.1.jar file.reference.ejb-api-3.0.jar=lib/ejb-api-3.0.jar file.reference.flexmark-0.64.8.jar=lib/flexmark-0.64.8.jar +file.reference.flexmark-ext-tables-0.64.8.jar=lib/flexmark-ext-tables-0.64.8.jar file.reference.flexmark-util-ast-0.64.8.jar=lib/flexmark-util-ast-0.64.8.jar file.reference.flexmark-util-builder-0.64.8.jar=lib/flexmark-util-builder-0.64.8.jar file.reference.flexmark-util-collection-0.64.8.jar=lib/flexmark-util-collection-0.64.8.jar @@ -169,7 +170,8 @@ javac.classpath=\ ${file.reference.flexmark-util-collection-0.64.8.jar}:\ ${file.reference.flexmark-util-format-0.64.8.jar}:\ ${file.reference.flexmark-util-visitor-0.64.8.jar}:\ - ${file.reference.flexmark-util-html-0.64.8.jar} + ${file.reference.flexmark-util-html-0.64.8.jar}:\ + ${file.reference.flexmark-ext-tables-0.64.8.jar} # Space-separated list of extra javac options javac.compilerargs= javac.debug=true diff --git a/src/java/LogrPortal/nbproject/project.xml b/src/java/LogrPortal/nbproject/project.xml index b5acfa92b..f168bb06d 100644 --- a/src/java/LogrPortal/nbproject/project.xml +++ b/src/java/LogrPortal/nbproject/project.xml @@ -5,7 +5,6 @@ LogrPortal 1.6.5 - ${file.reference.pdfbox-2.0.24.jar} @@ -243,6 +242,10 @@ ${file.reference.flexmark-util-html-0.64.8.jar} WEB-INF/lib + + ${file.reference.flexmark-ext-tables-0.64.8.jar} + WEB-INF/lib + diff --git a/src/java/LogrPortal/src/java/gov/anl/aps/logr/portal/utilities/MarkdownParser.java b/src/java/LogrPortal/src/java/gov/anl/aps/logr/portal/utilities/MarkdownParser.java index 5e8a81081..ff4d9526d 100644 --- a/src/java/LogrPortal/src/java/gov/anl/aps/logr/portal/utilities/MarkdownParser.java +++ b/src/java/LogrPortal/src/java/gov/anl/aps/logr/portal/utilities/MarkdownParser.java @@ -21,6 +21,7 @@ import com.vladsch.flexmark.util.misc.Extension; import com.vladsch.flexmark.util.sequence.BasedSequence; import com.vladsch.flexmark.util.sequence.Escaping; +import com.vladsch.flexmark.ext.tables.TablesExtension; import gov.anl.aps.logr.common.constants.CdbPropertyValue; import java.util.HashSet; @@ -79,7 +80,8 @@ public class MarkdownParser { private static MutableDataHolder options = new MutableDataSet() .set(Parser.EXTENSIONS, Arrays.asList( new Extension[]{ - LogrFlexmarkExtension.create() + LogrFlexmarkExtension.create(), + TablesExtension.create() } )); diff --git a/src/java/LogrPortal/web/resources/css/logbook.css b/src/java/LogrPortal/web/resources/css/logbook.css index 4cd29136d..68638bb77 100644 --- a/src/java/LogrPortal/web/resources/css/logbook.css +++ b/src/java/LogrPortal/web/resources/css/logbook.css @@ -133,7 +133,30 @@ pre:has([class^="language-"]) { } .logEntry img { - max-width: 450px; + max-width: 450px; +} + +/* Markdown table styles */ +.logEntry table { + border-collapse: collapse; + width: 100%; + margin: 1em 0; +} + +.logEntry th, +.logEntry td { + border: 1px solid #ddd; + padding: 8px; + text-align: left; +} + +.logEntry th { + background-color: #f2f2f2; + font-weight: bold; +} + +.logEntry tr:nth-child(even) { + background-color: #f9f9f9; } .activeLogEntry {