Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-boot-admin
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
openSource
spring-boot-admin
Commits
03587815
Commit
03587815
authored
Dec 21, 2016
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add login-ui-module
This new ui-module provides a login page and a logout button. closes #361
parent
38a5cb25
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
178 additions
and
8 deletions
+178
-8
pom.xml
pom.xml
+6
-0
server-ui-modules.adoc
...-boot-admin-docs/src/main/asciidoc/server-ui-modules.adoc
+17
-0
pom.xml
spring-boot-admin-server-ui-login/pom.xml
+12
-0
login.css
.../resources/META-INF/spring-boot-admin-server-ui/login.css
+32
-0
login.html
...resources/META-INF/spring-boot-admin-server-ui/login.html
+60
-0
module.js
...rces/META-INF/spring-boot-admin-server-ui/login/module.js
+42
-0
core.css
spring-boot-admin-server-ui/core/css/core.css
+2
-2
index.html
spring-boot-admin-server-ui/core/index.html
+7
-6
No files found.
pom.xml
View file @
03587815
...
...
@@ -33,6 +33,7 @@
<module>
spring-boot-admin-server-ui-activiti
</module>
<module>
spring-boot-admin-server-ui-hystrix
</module>
<module>
spring-boot-admin-server-ui-turbine
</module>
<module>
spring-boot-admin-server-ui-login
</module>
<module>
spring-boot-admin-samples
</module>
<module>
spring-boot-admin-starter-client
</module>
<module>
spring-boot-admin-docs
</module>
...
...
@@ -244,6 +245,11 @@
</dependency>
<dependency>
<groupId>
de.codecentric
</groupId>
<artifactId>
spring-boot-admin-server-ui-login
</artifactId>
<version>
${project.version}
</version>
</dependency>
<dependency>
<groupId>
de.codecentric
</groupId>
<artifactId>
spring-boot-admin-starter-client
</artifactId>
<version>
${project.version}
</version>
</dependency>
...
...
spring-boot-admin-docs/src/main/asciidoc/server-ui-modules.adoc
View file @
03587815
...
...
@@ -96,3 +96,19 @@ The Activiti module shows information from the `/activti` endpoint.
----
spring.boot.admin.routes.endpoints: env,metrics,trace,dump,jolokia,info,configprops,trace,logfile,refresh,flyway,liquibase,heapdump,activiti
----
==== Login UI Module ====
The Login module just provides you a login page and a logout button.
. Add the ui module to your classpath:
+
[source,xml,subs="verbatim,attributes"]
.pom.xml
----
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server-ui-login</artifactId>
<version>{project-version}</version>
</dependency>
----
\ No newline at end of file
spring-boot-admin-server-ui-login/pom.xml
0 → 100644
View file @
03587815
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<groupId>
de.codecentric
</groupId>
<artifactId>
spring-boot-admin
</artifactId>
<version>
1.5.0-SNAPSHOT
</version>
<relativePath>
..
</relativePath>
</parent>
<artifactId>
spring-boot-admin-server-ui-login
</artifactId>
</project>
spring-boot-admin-server-ui-login/src/main/resources/META-INF/spring-boot-admin-server-ui/login.css
0 → 100644
View file @
03587815
.form-login
{
max-width
:
300px
;
padding
:
19px
29px
29px
;
margin
:
0
auto
20px
;
background-color
:
#fff
;
border
:
1px
solid
#e5e5e5
;
-webkit-border-radius
:
5px
;
-moz-border-radius
:
5px
;
border-radius
:
5px
;
-webkit-box-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
.05
);
-moz-box-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
.05
);
box-shadow
:
0
1px
2px
rgba
(
0
,
0
,
0
,
.05
);
}
.form-login
.form-login-heading
,
.form-login
.checkbox
{
margin-bottom
:
10px
;
}
.form-login
input
[
type
=
"text"
],
.form-login
input
[
type
=
"password"
]
{
height
:
auto
;
margin-bottom
:
15px
;
padding
:
7px
9px
;
}
.error-message
{
display
:
none
;
}
.error
.error-message
{
display
:
initial
;
}
\ No newline at end of file
spring-boot-admin-server-ui-login/src/main/resources/META-INF/spring-boot-admin-server-ui/login.html
0 → 100644
View file @
03587815
<!DOCTYPE html>
<html
class=
"no-js"
>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<title>
Spring Boot Admin
</title>
<meta
name=
"description"
content=
""
>
<meta
name=
"viewport"
content=
"width=device-width"
>
<link
rel=
"shortcut icon"
type=
"image/x-icon"
href=
"img/favicon.png"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"core.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"login.css"
/>
</head>
<body>
<header
class=
"navbar header--navbar desktop-only"
>
<div
class=
"navbar-inner"
>
<div
class=
"container-fluid"
>
<div
class=
"spring-logo--container"
>
<a
class=
"spring-logo"
href=
"#"
><span></span></a>
</div>
<div
class=
"spring-logo--container"
>
<a
class=
"spring-boot-logo"
href=
"#"
><span></span></a>
</div>
</div>
</div>
</header>
<div
class=
"container"
>
<form
class=
"form-login"
action=
"/login"
method=
"post"
>
<h2
class=
"form-login-heading"
>
Login
</h2>
<div
id=
"login-controls"
class=
"control-group"
>
<input
type=
"text"
class=
"input-block-level"
name=
"username"
placeholder=
"Username"
>
<input
type=
"password"
class=
"input-block-level"
name=
"password"
placeholder=
"Password"
>
<span
class=
"help-inline error-message"
>
Invalid username or password!
</div>
<input
type=
"submit"
class=
"btn btn-success"
value=
"Login"
></input>
</div>
</form>
</div>
<script
type=
"text/javascript"
>
if
(
/
\?
error/
.
test
(
window
.
location
.
href
))
{
document
.
getElementById
(
"login-controls"
).
classList
.
add
(
"error"
)
}
</script>
<footer
class=
"footer"
>
<ul
class=
"inline"
>
<li><a
href=
"https://codecentric.github.io/spring-boot-admin/@project.version@"
target=
"_blank"
>
Reference Guide
</a></li>
<li>
-
</li>
<li><a
href=
"https://github.com/codecentric/spring-boot-admin"
target=
"_blank"
>
Sources
</a></li>
<li>
-
</li>
<li>
Code licensed under
<a
href=
"http://www.apache.org/licenses/LICENSE-2.0"
target=
"_blank"
>
Apache License 2.0
</a></li>
</ul>
</footer>
</body>
</html>
\ No newline at end of file
spring-boot-admin-server-ui-login/src/main/resources/META-INF/spring-boot-admin-server-ui/login/module.js
0 → 100644
View file @
03587815
/*
* Copyright 2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
(
function
(
sbaModules
,
angular
)
{
'use strict'
;
var
module
=
angular
.
module
(
'sba-login'
,
[
'sba-core'
]);
sbaModules
.
push
(
module
.
name
);
module
.
controller
(
'logoutCtrl'
,
[
'$scope'
,
'$document'
,
function
()
{
angular
.
element
(
'#logout-form'
).
submit
();
}]);
module
.
config
([
'$stateProvider'
,
function
(
$stateProvider
)
{
$stateProvider
.
state
(
'logout'
,
{
template
:
'<form id="logout-form" action="/logout" method="post"></form>'
,
name
:
'logout'
,
url
:
'/logout'
,
controller
:
'logoutCtrl'
});
}]);
module
.
run
([
'MainViews'
,
'$sce'
,
function
(
MainViews
,
$sce
)
{
MainViews
.
register
({
title
:
$sce
.
trustAsHtml
(
'<i class="fa fa-2x fa-sign-out" aria-hidden="true"></i>'
),
state
:
'logout'
,
order
:
9999
});
}]);
}
(
sbaModules
,
angular
));
spring-boot-admin-server-ui/core/css/core.css
View file @
03587815
...
...
@@ -74,8 +74,8 @@ pre {
text-transform
:
uppercase
;
text-shadow
:
none
;
font-size
:
14px
;
line-height
:
14
px
;
padding
:
28px
20px
;
line-height
:
70
px
;
padding
:
0
20px
;
transition
:
all
0.15s
;
-webkit-transition
:
all
0.15s
;
-moz-transition
:
all
0.15s
;
...
...
spring-boot-admin-server-ui/core/index.html
View file @
03587815
...
...
@@ -25,7 +25,7 @@
</div>
<ul
class=
"nav pull-right"
>
<li
ng-repeat=
"view in mainViews"
class=
"navbar-link"
ng-class=
"{active: $state.includes(view.state)}"
>
<a
ui-sref=
"{{view.state}}"
ng-bind=
"view.title"
></a>
<a
ui-sref=
"{{view.state}}"
ng-bind
-html
=
"view.title"
></a>
</li>
</ul>
...
...
@@ -49,15 +49,15 @@
<script
type=
"text/javascript"
>
sbaModules
=
[];
</script>
<script
src=
"core.js"
type=
"text/javascript"
></script>
<script
src=
"all-modules.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
>
angular
.
element
(
document
).
ready
(
function
()
{
<script
src=
"core.js"
type=
"text/javascript"
></script>
<script
src=
"all-modules.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
>
angular
.
element
(
document
).
ready
(
function
()
{
angular
.
bootstrap
(
document
,
sbaModules
.
slice
(
0
),
{
strictDi
:
true
});
});
</script>
</script>
</body>
</html>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment