show users
parent
7d1f5e9059
commit
a136acb0b4
@ -0,0 +1,29 @@
|
|||||||
|
package ru.ulstu.user.component;
|
||||||
|
|
||||||
|
import ru.ulstu.user.model.User;
|
||||||
|
import ru.ulstu.user.service.UserService;
|
||||||
|
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
|
import javax.faces.view.ViewScoped;
|
||||||
|
import javax.inject.Inject;
|
||||||
|
import javax.inject.Named;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Named
|
||||||
|
@ViewScoped
|
||||||
|
public class UserView implements Serializable {
|
||||||
|
@Inject
|
||||||
|
private UserService userService;
|
||||||
|
|
||||||
|
private List<User> users;
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
public void init() {
|
||||||
|
users = userService.findAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<User> getUsers() {
|
||||||
|
return users;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
|
||||||
|
>
|
||||||
|
<h:head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
|
<title>Доступ запрещен</title>
|
||||||
|
<h:outputStylesheet name="css/styles.css"/>
|
||||||
|
<h:outputScript name="js/jquery-2.2.4.min.js"/>
|
||||||
|
<link rel="stylesheet" href="/resources/css/font-awesome.css"/>
|
||||||
|
</h:head>
|
||||||
|
<h:body>
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="center-block" style="width:400px;">
|
||||||
|
<div class="content">
|
||||||
|
<h3><b>Доступ запрещен</b></h3>
|
||||||
|
<h:link outcome="#{page.MAIN}" styleClass="btn btn-primary">
|
||||||
|
<i class="fa fa-home fa-4"></i> Вернуться на главную
|
||||||
|
</h:link>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div> <!-- /container -->
|
||||||
|
</h:body>
|
||||||
|
</html>
|
@ -0,0 +1,23 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
|
||||||
|
xmlns:p="http://primefaces.org/ui">
|
||||||
|
<h:head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
|
<title>Страница не найдена</title>
|
||||||
|
<h:outputStylesheet name="css/styles.css"/>
|
||||||
|
</h:head>
|
||||||
|
<h:body>
|
||||||
|
<div class="ui-g">
|
||||||
|
<div class="ui-g-5"></div>
|
||||||
|
<div class="ui-g-2">
|
||||||
|
<p:panel header="Страница не найдена" style="margin-bottom:20px">
|
||||||
|
<h:link outcome="#{page.MAIN}" styleClass="btn btn-primary">
|
||||||
|
<i class="fa fa-home fa-4"></i> Вернуться на главную
|
||||||
|
</h:link>
|
||||||
|
</p:panel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</h:body>
|
||||||
|
</html>
|
@ -0,0 +1,42 @@
|
|||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
|
||||||
|
xmlns:p="http://primefaces.org/ui"
|
||||||
|
>
|
||||||
|
<h:head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||||
|
<title>Ошибка сервера</title>
|
||||||
|
</h:head>
|
||||||
|
<h:body>
|
||||||
|
<div class="ui-g">
|
||||||
|
<div class="ui-g-2"></div>
|
||||||
|
<div class="ui-g-8">
|
||||||
|
<p:panel header="Ошибка" style="margin-bottom:20px">
|
||||||
|
<h:link outcome="#{page.INDEX}" styleClass="btn btn-primary">
|
||||||
|
<i class="fa fa-home fa-4"></i> Вернуться на главную
|
||||||
|
</h:link>
|
||||||
|
<p:panel id="toggleable" header="Подробности" toggleable="true" toggleSpeed="500" closeSpeed="500"
|
||||||
|
widgetVar="panel" style="margin-bottom:20px" collapsed="true">
|
||||||
|
|
||||||
|
<h:panelGrid columns="2" cellpadding="10">
|
||||||
|
<h:outputText value="User agent:"/> <h:outputText value="#{header['user-agent']}"/>
|
||||||
|
<h:outputText value="User IP:"/> <h:outputText
|
||||||
|
value="#{empty header['x-forwarded-for'] ? request.remoteAddr : header['x-forwarded-for']}"/>
|
||||||
|
<h:outputText value="Status code:"/> <h:outputText
|
||||||
|
value="#{requestScope['javax.servlet.error.status_code']}"/>
|
||||||
|
|
||||||
|
<h:outputText value="Stack trace:"/>
|
||||||
|
<p:fragment>
|
||||||
|
<pre style="font-size: 10px">
|
||||||
|
#{requestScope['javax.servlet.error.exception']}
|
||||||
|
</pre>
|
||||||
|
</p:fragment>
|
||||||
|
</h:panelGrid>
|
||||||
|
</p:panel>
|
||||||
|
|
||||||
|
</p:panel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</h:body>
|
||||||
|
</html>
|
@ -1,22 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
||||||
<title>Oauth2 Login</title>
|
|
||||||
<link rel="stylesheet"
|
|
||||||
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css"/>
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div class="container">
|
|
||||||
<div class="col-sm-3 well">
|
|
||||||
<h3>Login with:</h3>
|
|
||||||
<div class="list-group">
|
|
||||||
<p th:each="url : ${urls}">
|
|
||||||
<a th:text="${url.key}" th:href="${url.value}" class="list-group-item active">Client</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
Loading…
Reference in New Issue