Commit 45cff5a4 by Percy Quispe

[EDIT]

parent dddd3ba6
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package demojsoncrud.config;
/**
*
* @author Percy Oliver Quispe Huarcaya
* Esta clase esta encargada de definir las URLs
* con las peticiones.
*/
public final class PathRequest {
/*URLS REST*/
// private static final String BASE="http://172.16.2.53:8080/security-rest/api/"; //base path;
// public static final String LOG_OUT = BASE+"user/logout";
// public static final String ENVIAR_NUEVO_TOKEN = BASE+"proyecto/enviarNuevoToken";
// public static final String VERIFICAR_LOGIN = BASE+"user/verificarLogin";
/*URLS REST PRODUCCION*/
private static final String BASE="http://app8.sacooliveros.edu.pe:8080/security-rest/api/"; //base path;
public static final String LOG_OUT = BASE+"user/logout";
public static final String ENVIAR_NUEVO_TOKEN = BASE+"proyecto/enviarNuevoToken";
public static final String VERIFICAR_LOGIN = BASE+"user/verificarLogin";
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package demojsoncrud.servlets;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
/**
*
* @author Percy Oliver Quispe Huarcaya
*/
public class AddSession extends HttpServlet {
@Override
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String codigo = request.getParameter("codigoUsuario");
String menu = request.getParameter("menu");
HttpSession session = request.getSession();
session.setAttribute("codigo", codigo);
session.setAttribute("menu", menu);
session.setMaxInactiveInterval(120*60); //Tiempo en segundos
System.out.println("-----------------------------");
System.out.println("codigo : : "+codigo);
System.out.println("menu : : "+menu);
}
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package demojsoncrud.servlets;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
*
* @author Percy Oliver Quispe Huarcaya
* Este servlet está encargado de interceptar la petición de redirección
* El objetivo de este servlet es comprar sí tiene una session vigente,
* de tener una session
*/
public class InterceptarRedireccionServlet extends HttpServlet {
@Override
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
if(request.getSession().getAttribute("codigo")!=null){
String token = request.getParameter("t");
String page = request.getParameter("p");
response.sendRedirect(page+"?t="+token);
}else{
request.getRequestDispatcher("/vistas/index.jsp").forward(request, response);
}
}
}
......@@ -5,6 +5,7 @@
*/
package demojsoncrud.servlets;
import demojsoncrud.config.PathRequest;
import demojsoncrud.utilities.PostRequest;
import java.io.IOException;
import java.io.PrintWriter;
......@@ -22,19 +23,15 @@ public class LogOut extends HttpServlet {
@Override
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
final String LOG_OUT = "http://172.16.2.53:8080/security-rest/api/user/logout"; //Cambiar por la URL del servidor de produccion
String auth = request.getHeader("Cookie");
if (auth.contains("Bearer")) {
int indiceBearer = 0;
int indiceToken = 0;
Cookie cookieAuth = new Cookie("Authorization", "");
Cookie cookieMenu = new Cookie("menu", "");
cookieAuth.setMaxAge(0);
cookieMenu.setMaxAge(0);
response.addCookie(cookieAuth);
response.addCookie(cookieMenu);
PostRequest postRequest = new PostRequest(LOG_OUT);
Cookie cookieAuth=null;
Cookie cookieMenu=null;
PostRequest postRequest = new PostRequest(PathRequest.LOG_OUT);
String respuesta = "";
String[] parts = auth.split(";");
for (int i = 0; i < parts.length - 1; i++) {
......@@ -57,6 +54,13 @@ public class LogOut extends HttpServlet {
}
auth = "Bearer " + parts[indiceToken];
respuesta = postRequest.getRespueta(auth.replaceAll("\"", ""));
cookieAuth = new Cookie("Authorization", "");
cookieMenu = new Cookie("menu", "");
cookieAuth.setMaxAge(0);
cookieMenu.setMaxAge(0);
response.addCookie(cookieAuth);
response.addCookie(cookieMenu);
request.getSession().removeAttribute("codigo");//
request.getRequestDispatcher("/vistas/login.jsp").forward(request, response);
} else {
request.getRequestDispatcher("/vistas/login.jsp").forward(request, response);
......
......@@ -5,6 +5,7 @@
*/
package demojsoncrud.servlets;
import demojsoncrud.config.PathRequest;
import demojsoncrud.utilities.PostRequest;
import java.io.IOException;
import java.io.PrintWriter;
......@@ -13,76 +14,49 @@ import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.json.JSONObject;
/**
*
* @author sistem08user
* @author Percy Oliver Quispe Huarcaya
*/
public class RedireccionarServlet extends HttpServlet {
@Override
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
final String URL = "http://172.16.2.53:8080/security-rest/api/proyecto/enviarNuevoToken";
String auth = request.getParameter("t");
if (auth.contains("Bearer ")) {
// int indiceBearer = 0;
// String[] parts = auth.split(";");
//
// for (int i = 0; i < parts.length - 1; i++) {
// if (parts[i].contains("Bearer")) {
// indiceBearer = i;
// break;
// }
// }
// String authorization = parts[indiceBearer];
// parts = authorization.split("%20");
// auth = "Bearer " + parts[1];
PostRequest sendPost = new PostRequest(URL);
PostRequest sendPost = new PostRequest(PathRequest.ENVIAR_NUEVO_TOKEN);
HttpSession session = request.getSession();
String respuesta = sendPost.getRespueta(auth);//Crearia una sesion con el codigo usuario
JSONObject obj = new JSONObject(respuesta);
JSONObject menu = new JSONObject(obj.get("menu"));
Cookie cookieAuth = new Cookie("Authorization", "Bearer "+obj.getString("token"));
Cookie cookieMenu =new Cookie("menu", menu.toString());
System.out.println("Menu de la cookie ;: "+menu.toString());
cookieAuth.setMaxAge(36000);//10horas
cookieMenu.setMaxAge(36000);//10horas
response.addCookie(cookieAuth);
response.addCookie(cookieMenu);
request.getRequestDispatcher("/vistas/main.jsp").forward(request, response);
} else {
Cookie cookieAuth = new Cookie("Authorization", "");
Cookie cookieMenu = new Cookie("menu", "");
cookieAuth.setMaxAge(0);
cookieMenu.setMaxAge(0);
response.addCookie(cookieAuth);
response.addCookie(cookieMenu);
request.getRequestDispatcher("/vistas/index.jsp").forward(request, response);
}
}
JSONObject getRespuesta = new JSONObject(respuesta);
if(getRespuesta.getBoolean("status")){
JSONObject obj = new JSONObject(respuesta);
JSONObject menu = new JSONObject(obj.get("menu").toString());
Cookie cookieAuth = new Cookie("Authorization", "Bearer "+obj.getString("token"));
System.out.println("Menu de la cookie ;: "+menu.toString());
private void listarPersona(HttpServletRequest request, HttpServletResponse response) throws ServletException {
cookieAuth.setMaxAge(36000);//10horas
// response.setContentType("application/json");
// PrintWriter pw = null;
// JSONObject salida = new JSONObject();
// try {
// pw = response.getWriter();
// String authorization =request.getHeader("Authorization");
// if(authorization!=null && authorization.contains("Bearer ")){
//
// PostRequest sendPost = new PostRequest(URL);
// String respuesta = sendPost.getRespueta(authorization);
// JSONObject obj = new JSONObject(respuesta);
// salida=obj;
// }else{
// salida.put("status", false);
// salida.put("message", "Credenciales incorrectas.");
// }
// } catch (Exception e) {
// salida.put("status", false);
// salida.put("message", e.getMessage());
// }
// pw.print(salida);
response.addCookie(cookieAuth);
System.out.println("Redireccionar Servlet : Codigo Usuario ::: "+obj.getString("codigoUsuario"));
session.setAttribute("codigo", obj.getString("codigoUsuario"));
session.setAttribute("menu", menu.toString());
session.setMaxInactiveInterval(120*60); //Tiempo en segundos
request.getRequestDispatcher("/vistas/main.jsp").forward(request, response);
}
}
Cookie cookieAuth = new Cookie("Authorization", "");
cookieAuth.setMaxAge(0);
response.addCookie(cookieAuth);
request.getRequestDispatcher("/vistas/index.jsp").forward(request, response);
}
}
......@@ -19,6 +19,14 @@
<servlet-name>RedireccionarServlet</servlet-name>
<servlet-class>demojsoncrud.servlets.RedireccionarServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>AddSession</servlet-name>
<servlet-class>demojsoncrud.servlets.AddSession</servlet-class>
</servlet>
<servlet>
<servlet-name>InterceptarRedireccionServlet</servlet-name>
<servlet-class>demojsoncrud.servlets.InterceptarRedireccionServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>PersonaServlet</servlet-name>
<url-pattern>/PersonaServlet</url-pattern>
......@@ -35,6 +43,14 @@
<servlet-name>RedireccionarServlet</servlet-name>
<url-pattern>/vistas/RedireccionarServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>AddSession</servlet-name>
<url-pattern>/addsession</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>InterceptarRedireccionServlet</servlet-name>
<url-pattern>/vistas/interceptar</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
......
// reusable ajax promise
const ajaxRequest = obj => {
return new Promise((resolve, reject) => {
$.ajax({
url: obj.url,
type: obj.type,
headers: obj.headers,
data: JSON.stringify(obj.body),
beforeSend: (xhr, settings) => {
}, success: (response, textStatus, jqXHR) => {
resolve(response)
}, error: (jqXHR, textStatus, errorThrown) => {
reject({
status: textStatus,
message: `Error making request`,
request: obj
return new Promise((resolve, reject) => {
$.ajax({
url: obj.url,
type: obj.type,
headers: obj.headers,
data: JSON.stringify(obj.body),
beforeSend: (xhr, settings) => {
}, success: (response, textStatus, jqXHR) => {
resolve(response)
}, error: (jqXHR, textStatus, errorThrown) => {
reject({
status: textStatus,
message: `Error making request`,
request: obj
})
}
})
}
})
})
}
/*Envio de datos al servicio REST*/
// http request
const httpRequest = {
login(params) {
return ajaxRequest({
url: 'http://172.16.2.53:8080/security-rest/api/user/login',
type: 'POST',
headers: {
"Content-type": 'application/json',
"Accept": 'application/json'
},
body: params
})
},
verify() {
return ajaxRequest({
url: 'http://172.16.2.53:8080/security-rest/api/user/verificarLogin',
type: 'POST',
headers: {
"Content-type": 'application/json',
"Accept": 'application/json',
login(params) {
return ajaxRequest({
// url: 'http://172.16.2.53:8080/security-rest/api/user/login',
url: 'http://app8.sacooliveros.edu.pe:8080/security-rest/api/user/login',
type: 'POST',
headers: {
"Content-type": 'application/json',
"Accept": 'application/json'
},
body: params
})
},
verify() {
return ajaxRequest({
url: 'http://172.16.2.53:8080/security-rest/api/user/verificarLogin',
type: 'POST',
headers: {
"Content-type": 'application/json',
"Accept": 'application/json',
// "Authorization": window.localStorage.getItem('Authorization')
"Authorization": Cookies.get('Authorization')
}
})
}
// ,
// getNewToken() {
// return ajaxRequest({
// url: '../RedireccionarServlet',
// type: 'POST',
// headers: {
// "Authorization":"Bearer "+getToken()
// }
// })
// }
"Authorization": Cookies.get('Authorization')
}
})
},
addSession(params) {
return new Promise((resolve, reject) => {
$.ajax({
url: 'http://172.16.2.53:8080/proyecto-estandar/addsession',
type: 'POST',
data: params,
beforeSend: (xhr, settings) => {
}, success: (response, textStatus, jqXHR) => {
resolve(response)
}, error: (jqXHR, textStatus, errorThrown) => {
reject({
status: textStatus,
message: `Error making request ${jqXHR}`
})
}
})
})
}
}
// domevents
const DOMEvents = {
init() {
this.signIn()
this.verify()
},
signIn() {
document.querySelector('#signIn').addEventListener('click', (e) => {
let params = {
usuario: document.querySelector('#usuario').value.trim(),
pass: document.querySelector('#pass').value,
codigoProyecto: "2",
path: `${location.origin}/${location.pathname.split('/')[1]}/`
}
httpRequest.login(params)
.then(data => {
if (data.status) {
delete data["status"]
// window.localStorage.setItem('Authorization', 'Bearer ' + data.token)
// window.localStorage.setItem('menu', JSON.stringify(data.menu))
Cookies.set('Authorization', `Bearer ${data.token}`, {expiry: 36000000})
console.log("mnenu"+data.menu)
localStorage.setItem("menu",JSON.stringify(data.menu))
window.location.href = 'main.jsp'
init() {
this.signIn()
this.verify()
},
signIn() {
document.querySelector('#signIn').addEventListener('click', (e) => {
let params = {
usuario: document.querySelector('#usuario').value.trim(),
pass: document.querySelector('#pass').value,
// codigoProyecto: "2",
codigoProyecto: "5"
}
} else {
alert('No tienes autorización')
}
console.log(data)
httpRequest.login(params)
.then(data => {
if (data.status) {
delete data["status"]
Cookies.set('Authorization', `Bearer ${data.token}`, {expiry: 36000000})
console.log("mnenu" + data.menu)
// localStorage.setItem("menu", JSON.stringify(data.menu))
return data;
} else {
return alert('No tienes autorización');
}
console.log(data)
}).then(data => {
if (data !== undefined) {
debugger
let body = {
codigoUsuario: data.codigoUsuario,
menu: JSON.stringify(data.menu)
}
httpRequest.addSession(body)
.then(() => {
window.location.href = 'main.jsp'
})
.catch(err => console.log(err))
}
console.log("data :::::: " + data);
})
.catch(err => console.log(err))
})
.catch(err => console.log(err))
})
},
verify() {
document.querySelector('#verify').addEventListener('click', (e) => {
httpRequest.verify()
.then(data => console.log(data))
.catch(err => console.log(err))
})
}
}
let getToken=()=>{
let authorization;
let auth = window.location.search;
if(auth!==null && auth.includes('%20')){
authorization =auth.split('%20');
}else{
authorization[1] ="";
}
return authorization[1];
},
verify() {
document.querySelector('#verify').addEventListener('click', (e) => {
httpRequest.verify()
.then(data => console.log(data))
.catch(err => console.log(err))
})
}
}
//let obtenerToken=()=>{
// debugger
// let token = getToken();
// if(token!==null && token!==""){
// httpRequest.getNewToken()
// .then(data => {
// if (data.status) {
// delete data["status"]
// Cookies.set('Authorization', `Bearer ${data.token}`, {expiry: 36000000})
// Cookies.set('menu', `${JSON.stringify(data.menu)}`, {expiry: 36000000})
// console.log("MENU main.js"+data.menu);
// window.location.href = 'main.jsp';
//// window.history.replaceState( {} , '', 'main.jsp' );
// } else {
// alert('No tienes autorización')
// }
// console.log(data)
// })
// // .then(()=>{
// // promiseSqrt();
// // })
// .catch(err => console.log(err))
// }
//
//}
DOMEvents.init()
DOMEvents.init()
\ No newline at end of file
......@@ -46,7 +46,7 @@ let obtenerToken=()=>{
// })
.catch(err => {
console.log(err)
window.location.href = "index.jsp";
// window.location.href = "index.jsp";
})
}
......@@ -84,4 +84,4 @@ let obtenerToken=()=>{
//
//getNewToken();
obtenerToken();
\ No newline at end of file
//obtenerToken();
\ No newline at end of file
......@@ -35,7 +35,7 @@ let setProyecto = () => {
urls += proyectos[i].url+";";
// let url = proyectos[i].url;//produccion
let url = 'http://172.16.2.53:8080/proyecto-estandar/';//Pruebas
html+='<li><a href="'+url+'vistas/RedireccionarServlet?t='+auth.replace("\"","")+'" class="redirect" class="deutsch" ><img src="assets/images/flags/de.png" alt=""> '
html+='<li><a target="_blank" href="../vistas/interceptar?p='+url+'vistas/RedireccionarServlet&t='+auth.replace("\"","")+'" class="redirect" class="deutsch" ><img src="assets/images/flags/de.png" alt=""> '
+ '<i class="glyphicon glyphicon-arrow-right"></i>'+proyectos[i].nombre+'</a></li>';
}
/*Pruebas*/
......@@ -45,7 +45,7 @@ let setProyecto = () => {
urls +=url3;
let url4 = 'http://172.16.2.53:8080/aplicaciones/';//Pruebas
Cookies.set("urls",urls,{expiry: 36000000});
html+='<li><a href="'+url4+'vistas/RedireccionarServlet?t='+auth.replace("\"","")+'" class="redirect" class="deutsch" ><img src="assets/images/flags/de.png" alt=""> '
html+='<li><a target="_blank" href="../vistas/interceptar?p='+url4+'vistas/RedireccionarServlet&t='+auth.replace("\"","")+'" class="redirect" class="deutsch" ><img src="assets/images/flags/de.png" alt=""> '
+ '<i class="glyphicon glyphicon-arrow-right"></i>Test</a></li>';
/*Pruebas*/
document.getElementById("proyectos").innerHTML = html;
......
......@@ -57,8 +57,10 @@ let setMenu = () => {
let position = getUrl(location.pathname, "/");
let path = location.pathname.substring(position + 1);//obtiene el nombre de la vista jsp para activar la clase .active
let menu = document.getElementById("MENU");
let contenido = JSON.parse(JSON.parse(localStorage.getItem("menu")));
// let contenido = JSON.parse(localStorage.getItem("menu"));
debugger;
let contenido = sidebar;
// console.log("sidebar "+JSON.stringify(sidebar));
let html = "";
let active = "";
console.log(contenido)
......
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
<%@include file="templates/header.jsp" %>
<!--template-core-->
<!--css-->
<!--css-->
</head>
<body>
<%@include file="templates/header-body.jsp" %>
<!-- content -->
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="panel panel-flat border-top-xlg border-top-primary">
<div class="panel-heading">
<h6 class="panel-title text-semibold"><i class="icon-cog3 position-left"></i> Consulta de fichas</h6>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="control-label display-block">Ingresar criterio de búsqueda: </label>
<div class="input-group input-group-xlg">
<span class="input-group-addon"><i class="icon-search4"></i></span>
<input id="txt-busqueda" type="text" class="form-control" placeholder="Ingresar criterio">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 text-center">
<button id="btn_buscar_criterio" type="button" class="btn btn-primary"><i class="icon-search4 position-left"></i> Buscar</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-flat border-top-xlg border-top-primary">
<div class="panel-heading">
<h6 class="panel-title text-semibold"><i class=" icon-list3 position-left"></i> Consulta de fichas</h6>
</div>
<div class="table-responsive">
<table class="table table-striped table-sm" id="tbl-persona">
<thead>
<tr>
<th>#</th>
<th>DNI</th>
<th>APELLIDOS Y NOMBRES</th>
<th>EDAD</th>
<th>CORREO ELECTRONICO</th>
<th>ESTADO</th>
<th>ACCIONES</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- / content -->
<%@include file="templates/footer-body.jsp" %>
<!--js plantilla-->
<!--jQueryValidator-->
<script type="text/javascript" src="../plantilla/assets/js/plugins/forms/validation/validate.min.js"></script>
<!--jQueryValidator-->
<!--form-->
<script type="text/javascript" src="../plantilla/assets/js/plugins/forms/inputs/touchspin.min.js"></script>
<script type="text/javascript" src="../plantilla/assets/js/pages/form_input_groups.js"></script>
<!--form-->
<!--modal-->
<script type="text/javascript" src="../plantilla/assets/js/pages/components_modals.js"></script>
<!--modal-->
<!--sweetalerts-->
<script type="text/javascript" src="../plantilla/assets/js/plugins/notifications/bootbox.min.js"></script>
<script type="text/javascript" src="../plantilla/assets/js/plugins/notifications/sweet_alert.min.js"></script>
<!--sweetalerts-->
<!--datatable-->
<script type="text/javascript" src="../plantilla/assets/js/plugins/tables/datatables/datatables.min.js"></script>
<script type="text/javascript" src="../plantilla/assets/js/plugins/forms/selects/select2.min.js"></script>
<!--datatable-->
<!--js plantilla-->
<!--mi js-->
<script src="../js/lib/validate_inputs.js" type="text/javascript"></script>
<script src="../js/pages/sidebar.js" type="text/javascript"></script>
<!--mi js-->
</body>
</html>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
<%@include file="templates/header.jsp" %>
<!--template-core-->
<!--css-->
<!--css-->
</head>
<body>
<%@include file="templates/header-body.jsp" %>
<!-- content -->
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="panel panel-flat border-top-xlg border-top-primary">
<div class="panel-heading">
<h6 class="panel-title text-semibold"><i class="icon-cog3 position-left"></i> Consulta de Lotes</h6>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="control-label display-block">Ingresar criterio de búsqueda: </label>
<div class="input-group input-group-xlg">
<span class="input-group-addon"><i class="icon-search4"></i></span>
<input id="txt-busqueda" type="text" class="form-control" placeholder="Ingresar criterio">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 text-center">
<button id="btn_buscar_criterio" type="button" class="btn btn-primary"><i class="icon-search4 position-left"></i> Buscar</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-flat border-top-xlg border-top-primary">
<div class="panel-heading">
<h6 class="panel-title text-semibold"><i class=" icon-list3 position-left"></i> Consulta de Lotes</h6>
</div>
<div class="table-responsive">
<table class="table table-striped table-sm" id="tbl-persona">
<thead>
<tr>
<th>#</th>
<th>DNI</th>
<th>APELLIDOS Y NOMBRES</th>
<th>EDAD</th>
<th>CORREO ELECTRONICO</th>
<th>ESTADO</th>
<th>ACCIONES</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- / content -->
<%@include file="templates/footer-body.jsp" %>
<!--js plantilla-->
<!--jQueryValidator-->
<script type="text/javascript" src="../plantilla/assets/js/plugins/forms/validation/validate.min.js"></script>
<!--jQueryValidator-->
<!--form-->
<script type="text/javascript" src="../plantilla/assets/js/plugins/forms/inputs/touchspin.min.js"></script>
<script type="text/javascript" src="../plantilla/assets/js/pages/form_input_groups.js"></script>
<!--form-->
<!--modal-->
<script type="text/javascript" src="../plantilla/assets/js/pages/components_modals.js"></script>
<!--modal-->
<!--sweetalerts-->
<script type="text/javascript" src="../plantilla/assets/js/plugins/notifications/bootbox.min.js"></script>
<script type="text/javascript" src="../plantilla/assets/js/plugins/notifications/sweet_alert.min.js"></script>
<!--sweetalerts-->
<!--datatable-->
<script type="text/javascript" src="../plantilla/assets/js/plugins/tables/datatables/datatables.min.js"></script>
<script type="text/javascript" src="../plantilla/assets/js/plugins/forms/selects/select2.min.js"></script>
<!--datatable-->
<!--js plantilla-->
<!--mi js-->
<script src="../js/lib/validate_inputs.js" type="text/javascript"></script>
<script src="../js/pages/sidebar.js" type="text/javascript"></script>
<!--mi js-->
</body>
</html>
......@@ -49,7 +49,7 @@
</div>
<div class="form-group has-feedback has-feedback-left">
<input type="password" id="pass" class="form-control" placeholder="Contraseña" value="123">
<input type="password" id="pass" class="form-control" placeholder="Contraseña" value="75441247">
<div class="form-control-feedback">
<i class="icon-lock2 text-muted"></i>
</div>
......@@ -99,7 +99,13 @@
</div>
<!-- /page container -->
<script>
((window) => {
window.history.replaceState( {} , '', 'index.jsp' );
})(window);
</script>
<!--javascript template-->
<!-- Core JS files -->
<script type="text/javascript" src="../plantilla/assets/js/plugins/loaders/pace.min.js"></script>
......@@ -117,6 +123,7 @@
<!--javascript template-->
<script src="../js/lib/cookies.js" type="text/javascript"></script>
<script src="../js/pages/index.js" type="text/javascript"></script>
</body>
</html>
<%--
Document : index
Created on : 05-ene-2018, 20:49:32
Author : Alonso
Created on : 05-may-2018, 12:27:05
Author : POQH
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
......@@ -23,7 +23,7 @@
<!-- / content -->
<%@include file="templates/footer-body.jsp" %>
......
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<head>
<%@include file="templates/header.jsp" %>
<!--template-core-->
<!--css-->
<!--css-->
</head>
<body>
<%@include file="templates/header-body.jsp" %>
<!-- content -->
<div class="row">
<div class="col-md-6 col-md-offset-3">
<div class="panel panel-flat border-top-xlg border-top-primary">
<div class="panel-heading">
<h6 class="panel-title text-semibold"><i class="icon-cog3 position-left"></i> Mantenimiento personal</h6>
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-12">
<div class="form-group">
<label class="control-label display-block">Ingresar criterio de búsqueda: </label>
<div class="input-group input-group-xlg">
<span class="input-group-addon"><i class="icon-search4"></i></span>
<input id="txt-busqueda" type="text" class="form-control" placeholder="Ingresar criterio">
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 text-center">
<button id="btn_buscar_criterio" type="button" class="btn btn-primary"><i class="icon-search4 position-left"></i> Buscar</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-flat border-top-xlg border-top-primary">
<div class="panel-heading">
<h6 class="panel-title text-semibold"><i class=" icon-list3 position-left"></i> Listado personal</h6>
</div>
<div class="table-responsive">
<table class="table table-striped table-sm" id="tbl-persona">
<thead>
<tr>
<th>#</th>
<th>DNI</th>
<th>APELLIDOS Y NOMBRES</th>
<th>EDAD</th>
<th>CORREO ELECTRONICO</th>
<th>ESTADO</th>
<th>ACCIONES</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- / content -->
<%@include file="templates/footer-body.jsp" %>
<!--js plantilla-->
<!--jQueryValidator-->
<script type="text/javascript" src="../plantilla/assets/js/plugins/forms/validation/validate.min.js"></script>
<!--jQueryValidator-->
<!--form-->
<script type="text/javascript" src="../plantilla/assets/js/plugins/forms/inputs/touchspin.min.js"></script>
<script type="text/javascript" src="../plantilla/assets/js/pages/form_input_groups.js"></script>
<!--form-->
<!--modal-->
<script type="text/javascript" src="../plantilla/assets/js/pages/components_modals.js"></script>
<!--modal-->
<!--sweetalerts-->
<script type="text/javascript" src="../plantilla/assets/js/plugins/notifications/bootbox.min.js"></script>
<script type="text/javascript" src="../plantilla/assets/js/plugins/notifications/sweet_alert.min.js"></script>
<!--sweetalerts-->
<!--datatable-->
<script type="text/javascript" src="../plantilla/assets/js/plugins/tables/datatables/datatables.min.js"></script>
<script type="text/javascript" src="../plantilla/assets/js/plugins/forms/selects/select2.min.js"></script>
<!--datatable-->
<!--js plantilla-->
<!--mi js-->
<script src="../js/lib/validate_inputs.js" type="text/javascript"></script>
<script src="../js/pages/sidebar.js" type="text/javascript"></script>
<!--mi js-->
</body>
</html>
......@@ -14,4 +14,7 @@
<!-- /global stylesheets -->
<script src="../js/lib/cookies.js" type="text/javascript"></script>
<script src="../js/pages/validate.js" type="text/javascript"></script>
<script>
var sidebar = <%=(String)request.getSession().getAttribute("menu")%>
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment