Este commit está contenido en:
manalejandro
2018-07-15 03:45:44 +02:00
padre bb3ccad495
commit 236e3b4047
Se han modificado 13 ficheros con 446 adiciones y 98 borrados

Ver fichero

@@ -12,5 +12,5 @@ spring.thymeleaf.enabled=true
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.html
spring.thymeleaf.cache=false
spring.servlet.multipart.max-file-size=10MB
spring.servlet.multipart.max-request-size=20MB
spring.servlet.multipart.max-file-size=20MB
spring.servlet.multipart.max-request-size=100MB

Ver fichero

@@ -1,16 +1,28 @@
{
"documento": {
"properties": {
"@timestamp": {
"type": "date",
"format": "strict_date_optional_time||epoch_millis"
},
"@version": {
"type": "keyword"
},
"id": {
"type": "long"
}
}
}
"documento": {
"properties": {
"@timestamp": {
"type": "date",
"format": "strict_date_optional_time||epoch_millis"
},
"@version": {
"type": "keyword"
},
"nombre": {
"type": "text"
},
"tamano": {
"type": "long"
},
"metadata": {
"type": "text"
},
"contenido": {
"type": "text"
},
"lenguaje": {
"type": "keyword"
}
}
}
}

Ver fichero

@@ -0,0 +1,4 @@
hr {
width: 100%;
text-align: center;
}

Ver fichero

@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Arjion</title>
<link rel="stylesheet" th:href="@{/webjars/bootstrap/3.3.7-1/css/bootstrap.min.css}">
<link rel="stylesheet" th:href="@{/css/main.css}">
<script th:src="@{/webjars/jquery/3.1.1-1/jquery.min.js}"></script>
<script th:src="@{/webjars/bootstrap/3.3.7-1/js/bootstrap.min.js}"></script>
<script th:src="@{/js/main.js}"></script>
</head>
<body>
<header class="text-center">
<a th:href="@{/}">
<h1 class="text-primary">Arjion</h1>
</a>
<h3 class="text-warning">[[${detailVO.documento.nombre}]]</h3>
</header>
<section class="col-md-12">
<hr>
</section>
<section>
<span class="col-md-1 text-muted">Tamaño</span>
<span class="col-md-11 text-muted">[[${detailVO.documento.tamano}]] bytes</span>
<span class="col-md-1 text-muted">Lenguaje</span>
<span class="col-md-11 text-muted">[[${detailVO.documento.lenguaje}]]</span>
<span class="col-md-1 text-success">Metadatos</span>
<span class="col-md-11 text-success">[[${detailVO.documento.metadata}]]</span>
<span class="col-md-1 text-warning">Contenido</span>
<pre class="col-md-11 text-warning">[[${detailVO.documento.contenido}]]</pre>
</div>
</section>
<section class="col-md-12">
<hr>
</section>
<footer class="col-md-12 text-center">
<span class="col-md-12">
<button class="btn btn-primary" th:onclick="'window.location.pathname=\'' + @{/} + '\''">Volver</button>
</span>
<span>2018</span>
</footer>
</body>
</html>

Ver fichero

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Error</title>
<link rel="stylesheet" th:href="@{/webjars/bootstrap/3.3.7-1/css/bootstrap.min.css}">
<script th:src="@{/webjars/jquery/3.1.1-1/jquery.min.js}"></script>
<script th:src="@{/webjars/bootstrap/3.3.7-1/js/bootstrap.min.js}"></script>
</head>
<body class="text-center text-danger">
<h2>Error</h2>
<h4>El archivo ya existe o hubo un error</h4>
<button class="btn btn-primary" th:onclick="'window.location.pathname=\'' + @{/} + '\''">Volver</button>
</body>
</html>

Ver fichero

@@ -2,57 +2,83 @@
<html>
<head>
<meta charset="UTF-8">
<title>Arjion</title>
<link rel="stylesheet" th:href="@{/webjars/bootstrap/3.3.7-1/css/bootstrap.min.css}">
<link rel="stylesheet" th:href="@{/css/main.css}">
<script th:src="@{/webjars/jquery/3.1.1-1/jquery.min.js}"></script>
<script th:src="@{/webjars/bootstrap/3.3.7-1/js/bootstrap.min.js}"></script>
<script th:src="@{/js/main.js}"></script>
<meta charset="UTF-8">
<title>Arjion</title>
<link rel="stylesheet" th:href="@{/webjars/bootstrap/3.3.7-1/css/bootstrap.min.css}">
<link rel="stylesheet" th:href="@{/css/main.css}">
<script th:src="@{/webjars/jquery/3.1.1-1/jquery.min.js}"></script>
<script th:src="@{/webjars/bootstrap/3.3.7-1/js/bootstrap.min.js}"></script>
<script th:src="@{/js/main.js}"></script>
</head>
<body>
<header class="text-center">
<a th:href="@{/}"><h1 class="text-primary">Arjion</h1></a>
</header>
<section class="text-center col-md-4 col-md-offset-4">
<form class="form-horizontal form-label-left" method="post" enctype="multipart/form-data" novalidate="novalidate" th:action="@{/upload}"
th:object="${documentForm}">
<div class="input-group">
<span class="input-group-addon">
<span class="glyphicon glyphicon-file"></span>
</span>
<label class="input-group-addon custom-file">
<input type="file" name="archivos" class="custom-file-input" multiple="multiple" />
<span class="custom-file-control"></span>
</label>
<span class="input-group-addon">
<button class="btn btn-primary" type="submit">
<span class="glyphicon glyphicon-level-up"></span>
</button>
</span>
</div>
</form>
</section>
<hr class="col-md-12">
<section>
<div th:each="doc : ${documentoVO.archivos}" class="col-md-12">
<span class="col-md-1 text-primary lead">Nombre</span>
<span class="col-md-11 text-primary lead">[[${doc.nombre}]]</span>
<span class="col-md-1 text-muted">Tamaño</span>
<span class="col-md-11 text-muted">[[${doc.tamano}]] bytes</span>
<span class="col-md-1 text-muted">Lenguaje</span>
<span class="col-md-11 text-muted">[[${doc.lenguaje}]]</span>
<span class="col-md-1 text-success">Metadatos</span>
<span class="col-md-11 text-success">[[${doc.metadata}]]</span>
<span class="col-md-1 text-warning">Contenido</span>
<pre class="col-md-11 text-warning">[[${doc.contenido}]]</pre>
<hr class="col-md-12">
</div>
</section>
<footer class="col-md-12 text-center">
<span>2018</span>
</footer>
<header class="text-center">
<a th:href="@{/}">
<h1 class="text-primary">Arjion</h1>
</a>
<h3 class="text-warning">[[${documentoVO.count}]] archivos</h3>
</header>
<section class="text-center col-md-4 col-md-offset-4">
<form class="form-horizontal form-label-left" method="post" enctype="multipart/form-data" novalidate="novalidate" th:action="@{/upload}"
th:object="${documentForm}">
<div class="input-group">
<span class="input-group-addon">
<span class="glyphicon glyphicon-file"></span>
</span>
<label class="input-group-addon custom-file">
<input type="file" name="archivos" class="custom-file-input" multiple="multiple" />
<span class="custom-file-control"></span>
</label>
<span class="input-group-addon">
<button class="btn btn-primary" type="submit">
<span class="glyphicon glyphicon-level-up"></span>
</button>
</span>
</div>
</form>
</section>
<section class="col-md-12">
<hr>
</section>
<section class="col-md-12">
<div th:each="arc : ${documentoVO.archivos}" class="col-md-12">
<span class="col-md-1 text-primary lead">Nombre</span>
<span class="col-md-11 text-primary lead">[[${arc.nombre}]]</span>
<span class="col-md-1 text-muted">Tamaño</span>
<span class="col-md-11 text-muted">[[${arc.tamano}]] bytes</span>
<span class="col-md-1 text-muted">Lenguaje</span>
<span class="col-md-11 text-muted">[[${arc.lenguaje}]]</span>
<span class="col-md-1 text-success">Metadatos</span>
<span class="col-md-11 text-success">[[${arc.metadata}]]</span>
<span class="col-md-1 text-warning">Contenido</span>
<pre class="col-md-11 text-warning">[[${arc.contenido}]]</pre>
<span class="col-md-12">
<hr>
</span>
</div>
</section>
<section class="col-md-12">
<hr>
</section>
<section class="col-md-12 text-center">
<div th:each="doc : ${documentoVO.documentos}">
<div>
<span class="col-md-12 text-primary">
<a th:href="@{'/detail'(nombre=${doc.nombre})}" class="lead">[[${doc.nombre}]]</a> -
<a th:href="@{'/download'(filename=${doc.nombre})}">download</a>
<br>[[${doc.tamano}]] bytes
<br>[[${doc.lenguaje}]]</span>
<span class="col-md-12 text-success">[[${#strings.abbreviate(doc.metadata,200)}]]</span>
<span class="col-md-12 text-warning">[[${#strings.abbreviate(doc.contenido,200)}]]</span>
</div>
<span class="col-md-12">
<hr>
</span>
</div>
</section>
<footer class="col-md-12 text-center">
<span>2018</span>
</footer>
</body>
</html>