mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-26 01:05:38 +00:00
Merge branch 'main' into #100_Make_createReport_optional
# Conflicts: # CHANGELOG.md
This commit is contained in:
commit
9a3e48ced4
101 changed files with 27373 additions and 1083 deletions
|
|
@ -84,7 +84,7 @@ public class CommandLineApplication {
|
|||
resultStatus = ReturnValue.HELP_REQUEST;
|
||||
} else {
|
||||
resultStatus = ObjectUtils.defaultIfNull(commandLine.getExecutionResult(), ReturnValue.PARSING_ERROR);
|
||||
if (resultStatus.getCode() < 0) {
|
||||
if (resultStatus.isError()) {
|
||||
commandLine.usage(System.out);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public class ReturnValue {
|
|||
|
||||
public static final ReturnValue DAEMON_MODE = new ReturnValue(-100);
|
||||
|
||||
public static final ReturnValue PARSING_ERROR = new ReturnValue(-1);;
|
||||
public static final ReturnValue PARSING_ERROR = new ReturnValue(-1);
|
||||
|
||||
private final int code;
|
||||
|
||||
|
|
@ -45,4 +45,7 @@ public class ReturnValue {
|
|||
return new ReturnValue(count);
|
||||
}
|
||||
|
||||
public boolean isError() {
|
||||
return this.code < 0 && this.code != DAEMON_MODE.code;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ import lombok.RequiredArgsConstructor;
|
|||
|
||||
public class GuiHandler extends BaseHandler {
|
||||
|
||||
private static final URL INDEX_HTML = GuiHandler.class.getClassLoader().getResource("gui/index.html");
|
||||
private static final URL INDEX_HTML = GuiHandler.class.getClassLoader().getResource("ui/index.html");
|
||||
|
||||
public GuiHandler() {
|
||||
if (INDEX_HTML == null) {
|
||||
|
|
@ -45,7 +45,7 @@ public class GuiHandler extends BaseHandler {
|
|||
if (path.equals("/")) {
|
||||
write(exchange, IOUtils.toString(INDEX_HTML, Charset.defaultCharset()).getBytes(), "text/html");
|
||||
} else {
|
||||
final URL resource = GuiHandler.class.getClassLoader().getResource("gui" + path);
|
||||
final URL resource = GuiHandler.class.getClassLoader().getResource("ui" + path);
|
||||
if (resource != null) {
|
||||
write(exchange, IOUtils.toString(resource, Charset.defaultCharset()).getBytes(),
|
||||
Mediatype.resolveBySuffix(resource.getPath()).getMimeType());
|
||||
|
|
@ -59,7 +59,7 @@ public class GuiHandler extends BaseHandler {
|
|||
@Getter
|
||||
protected enum Mediatype {
|
||||
|
||||
JS("application/javascript"), MD("text/markdown"), CSS("text/css");
|
||||
JS("application/javascript"), MD("text/markdown"), CSS("text/css"), SVG("image/svg+xml"), HTML("text/html"), PNG("image/png");
|
||||
|
||||
private final String mimeType;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue