Skip to content

Commit

Permalink
Merge pull request #730 from /issues/698-version-admin
Browse files Browse the repository at this point in the history
  • Loading branch information
petrdvorak authored Jun 14, 2022
2 parents 394ee48 + 8468d76 commit 47b51d3
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,14 @@
</jsp:include>
</span>
</p>
<c:if test="${not empty item.version}">
<p>
Version<br>
<span class="black">
<c:out value="${item.version}"/>
</span>
</p>
</c:if>
</td>
<c:choose>
<c:when test="${not empty item.eventReason}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,46 +32,46 @@ public class OperationTemplateCreateRequestValidator {

public static String validate(OperationTemplateCreateRequest source) {
if (source == null) {
return "Operation template create request must not be null";
return "Operation template create request must not be null.";
}
if (source.getTemplateName() == null) {
return "Template name must not be null when creating operation template";
return "Template name must not be null when creating operation template.";
}
if (source.getTemplateName().isEmpty()) {
return "Template name must not be empty when creating operation template";
return "Template name must not be empty when creating operation template.";
}
if (source.getOperationType() == null) {
return "Template operation type must not be null when creating operation template";
return "Template operation type must not be null when creating operation template.";
}
if (source.getOperationType().isEmpty()) {
return "Template operation type must not be empty when creating operation template";
return "Template operation type must not be empty when creating operation template.";
}
if (source.getSignatureType() == null) {
return "Template signature types must not be null when creating operation template";
return "Template signature types must not be null when creating operation template.";
}
if (source.getSignatureType().isEmpty()) {
return "Template signature types must contain at least one value";
return "Template signature types must contain at least one value.";
}
if (hasDuplicate(source.getSignatureType())) {
return "Template signature types must be unique.";
}
if (source.getDataTemplate() == null) {
return "Template data must not be null when creating operation template";
return "Template data must not be null when creating operation template.";
}
if (source.getDataTemplate().isEmpty()) {
return "Template data must not be empty when creating operation template";
return "Template data must not be empty when creating operation template.";
}
if (source.getExpiration() == null) {
return "Template expiration value must not be null when creating operation template";
return "Template expiration value must not be null when creating operation template.";
}
if (source.getExpiration() <= 0) {
return "Template expiration value must not be greater than zero";
return "Template expiration value must not be greater than zero.";
}
if (source.getMaxFailureCount() == null) {
return "Template maximum allowed failure count must not be null";
return "Template maximum allowed failure count must not be null.";
}
if (source.getMaxFailureCount() <= 0) {
return "Template maximum allowed failure count must be greater than zero";
return "Template maximum allowed failure count must be greater than zero.";
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import net.javacrumbs.shedlock.core.LockProvider;
import net.javacrumbs.shedlock.provider.jdbctemplate.JdbcTemplateLockProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.JdbcTemplate;

Expand Down

0 comments on commit 47b51d3

Please sign in to comment.