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
dce53990
Commit
dce53990
authored
Jan 09, 2018
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add login-page and logout button.
parent
73911fba
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
507 additions
and
134 deletions
+507
-134
pom.xml
spring-boot-admin-samples/pom.xml
+3
-2
logback-spring.xml
...admin-sample-consul/src/main/resources/logback-spring.xml
+0
-22
logback-spring.xml
...admin-sample-eureka/src/main/resources/logback-spring.xml
+0
-22
logback-spring.xml
...in-sample-hazelcast/src/main/resources/logback-spring.xml
+0
-6
pom.xml
...t-admin-samples/spring-boot-admin-sample-reactive/pom.xml
+1
-1
SpringBootAdminApplication.java
...de/codecentric/boot/admin/SpringBootAdminApplication.java
+21
-2
application.yml
...-admin-sample-reactive/src/main/resources/application.yml
+8
-4
SpringBootAdminApplicationTest.java
...odecentric/boot/admin/SpringBootAdminApplicationTest.java
+16
-0
pom.xml
...ot-admin-samples/spring-boot-admin-sample-servlet/pom.xml
+82
-0
SpringBootAdminApplication.java
...de/codecentric/boot/admin/SpringBootAdminApplication.java
+103
-0
application.yml
...t-admin-sample-servlet/src/main/resources/application.yml
+61
-0
SpringBootAdminApplicationTest.java
...odecentric/boot/admin/SpringBootAdminApplicationTest.java
+30
-0
pom.xml
...g-boot-admin-samples/spring-boot-admin-sample-war/pom.xml
+21
-0
logback-spring.xml
...ot-admin-sample-war/src/main/resources/logback-spring.xml
+0
-6
logback-spring.xml
...in-sample-zookeeper/src/main/resources/logback-spring.xml
+0
-22
package-lock.json
spring-boot-admin-server-ui/package-lock.json
+0
-0
package.json
spring-boot-admin-server-ui/package.json
+8
-8
base.scss
...ot-admin-server-ui/src/main/frontend/assets/css/base.scss
+12
-11
index.html
spring-boot-admin-server-ui/src/main/frontend/index.html
+1
-1
index.js
spring-boot-admin-server-ui/src/main/frontend/index.js
+6
-24
login.html
spring-boot-admin-server-ui/src/main/frontend/login.html
+72
-0
fontawesome.js
...ot-admin-server-ui/src/main/frontend/utils/fontawesome.js
+39
-0
index.vue
...er-ui/src/main/frontend/views/instances/logfile/index.vue
+0
-1
traces-list.vue
...i/src/main/frontend/views/instances/trace/traces-list.vue
+4
-2
navbar.vue
...-admin-server-ui/src/main/frontend/views/shell/navbar.vue
+8
-0
UiController.java
...de/codecentric/boot/admin/server/ui/web/UiController.java
+5
-0
webpack.config.js
spring-boot-admin-server-ui/webpack.config.js
+6
-0
No files found.
spring-boot-admin-samples/pom.xml
View file @
dce53990
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014-201
7
the original author or authors.
~ Copyright 2014-201
8
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.
...
...
@@ -30,7 +30,8 @@
<description>
Spring Boot Admin Samples
</description>
<url>
https://github.com/codecentric/spring-boot-admin/
</url>
<modules>
<module>
spring-boot-admin-sample
</module>
<module>
spring-boot-admin-sample-servlet
</module>
<module>
spring-boot-admin-sample-reactive
</module>
<module>
spring-boot-admin-sample-war
</module>
<module>
spring-boot-admin-sample-eureka
</module>
<module>
spring-boot-admin-sample-consul
</module>
...
...
spring-boot-admin-samples/spring-boot-admin-sample-consul/src/main/resources/logback-spring.xml
deleted
100644 → 0
View file @
73911fba
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014-2017 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.
-->
<configuration>
<include
resource=
"org/springframework/boot/logging/logback/base.xml"
/>
<jmxConfigurator/>
</configuration>
\ No newline at end of file
spring-boot-admin-samples/spring-boot-admin-sample-eureka/src/main/resources/logback-spring.xml
deleted
100644 → 0
View file @
73911fba
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014-2017 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.
-->
<configuration>
<include
resource=
"org/springframework/boot/logging/logback/base.xml"
/>
<jmxConfigurator/>
</configuration>
\ No newline at end of file
spring-boot-admin-samples/spring-boot-admin-sample-hazelcast/src/main/resources/logback-spring.xml
deleted
100644 → 0
View file @
73911fba
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include
resource=
"org/springframework/boot/logging/logback/base.xml"
/>
<jmxConfigurator/>
</configuration>
\ No newline at end of file
spring-boot-admin-samples/spring-boot-admin-sample/pom.xml
→
spring-boot-admin-samples/spring-boot-admin-sample
-reactive
/pom.xml
View file @
dce53990
...
...
@@ -24,7 +24,7 @@
<version>
2.0.0-SNAPSHOT
</version>
<relativePath>
..
</relativePath>
</parent>
<artifactId>
spring-boot-admin-sample
</artifactId>
<artifactId>
spring-boot-admin-sample
-reactive
</artifactId>
<dependencies>
<dependency>
<groupId>
de.codecentric
</groupId>
...
...
spring-boot-admin-samples/spring-boot-admin-sample/src/main/java/de/codecentric/boot/admin/SpringBootAdminApplication.java
→
spring-boot-admin-samples/spring-boot-admin-sample
-reactive
/src/main/java/de/codecentric/boot/admin/SpringBootAdminApplication.java
View file @
dce53990
/*
* Copyright 2014-201
7
the original author or authors.
* Copyright 2014-201
8
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.
...
...
@@ -27,6 +27,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.context.annotation.Profile
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.security.config.web.server.ServerHttpSecurity
;
import
org.springframework.security.web.server.SecurityWebFilterChain
;
...
...
@@ -40,12 +41,30 @@ public class SpringBootAdminApplication {
}
@Bean
public
SecurityWebFilterChain
securityWebFilterChain
(
ServerHttpSecurity
http
)
{
@Profile
(
"insecure"
)
public
SecurityWebFilterChain
securityWebFilterChainPermitAll
(
ServerHttpSecurity
http
)
{
return
http
.
authorizeExchange
().
anyExchange
().
permitAll
()
//
.
and
().
csrf
().
disable
()
//
.
build
();
}
@Bean
@Profile
(
"secure"
)
public
SecurityWebFilterChain
securityWebFilterChainSecure
(
ServerHttpSecurity
http
)
{
// @formatter:off
return
http
.
authorizeExchange
()
.
pathMatchers
(
"/assets/**"
).
permitAll
()
.
pathMatchers
(
"/login"
).
permitAll
()
.
anyExchange
().
authenticated
()
.
and
()
.
formLogin
().
loginPage
(
"/login"
).
and
()
.
logout
().
and
()
.
httpBasic
().
and
()
.
csrf
().
disable
()
.
build
();
// @formatter:on
}
@Configuration
public
static
class
NotifierConfig
{
private
final
InstanceRepository
repository
;
...
...
spring-boot-admin-samples/spring-boot-admin-sample/src/main/resources/application.yml
→
spring-boot-admin-samples/spring-boot-admin-sample
-reactive
/src/main/resources/application.yml
View file @
dce53990
...
...
@@ -4,7 +4,7 @@ info:
build-url
:
"
http://travis-ci.org/@env.TRAVIS_REPO_SLUG@/builds/@env.TRAVIS_BUILD_ID@"
logging
:
file
:
"
target/boot-admin-sample.log"
file
:
"
target/boot-admin-sample
-reactive
.log"
management
:
endpoints
:
...
...
@@ -16,7 +16,7 @@ management:
spring
:
application
:
name
:
spring-boot-admin-sample
name
:
spring-boot-admin-sample
-reactive
boot
:
admin
:
client
:
...
...
@@ -44,14 +44,18 @@ spring:
---
spring
:
profiles
:
secure
security
:
user
:
name
:
"
user"
password
:
"
password"
boot
:
admin
:
client
:
username
:
"
user"
#These two are needed so that the client
password
:
"
pass
"
#can register at the protected server api
password
:
"
pass
word"
#can register at the protected server api
instance
:
metadata
:
user.name
:
"
user"
#These two are needed so that the server
user.password
:
"
pass
"
#can access the protece
ted client endpoints
user.password
:
"
pass
word"
#can access the protec
ted client endpoints
spring-boot-admin-samples/spring-boot-admin-sample/src/test/java/de/codecentric/boot/admin/SpringBootAdminApplicationTest.java
→
spring-boot-admin-samples/spring-boot-admin-sample
-reactive
/src/test/java/de/codecentric/boot/admin/SpringBootAdminApplicationTest.java
View file @
dce53990
/*
* Copyright 2014-2018 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.
*/
package
de
.
codecentric
.
boot
.
admin
;
import
org.junit.Test
;
...
...
spring-boot-admin-samples/spring-boot-admin-sample-servlet/pom.xml
0 → 100644
View file @
dce53990
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014-2018 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.
-->
<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-samples
</artifactId>
<version>
2.0.0-SNAPSHOT
</version>
<relativePath>
..
</relativePath>
</parent>
<artifactId>
spring-boot-admin-sample-servlet
</artifactId>
<dependencies>
<dependency>
<groupId>
de.codecentric
</groupId>
<artifactId>
spring-boot-admin-server
</artifactId>
</dependency>
<dependency>
<groupId>
de.codecentric
</groupId>
<artifactId>
spring-boot-admin-server-ui
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
de.codecentric
</groupId>
<artifactId>
spring-boot-admin-starter-client
</artifactId>
</dependency>
<!-- Test -->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-devtools
</artifactId>
<optional>
true
</optional>
</dependency>
</dependencies>
<build>
<finalName>
${project.artifactId}
</finalName>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
<goal>
build-info
</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>
de.codecentric.boot.admin.SpringBootAdminApplication
</mainClass>
<addResources>
false
</addResources>
</configuration>
</plugin>
</plugins>
</build>
</project>
spring-boot-admin-samples/spring-boot-admin-sample-servlet/src/main/java/de/codecentric/boot/admin/SpringBootAdminApplication.java
0 → 100644
View file @
dce53990
/*
* Copyright 2014-2018 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.
*/
package
de
.
codecentric
.
boot
.
admin
;
import
de.codecentric.boot.admin.server.config.EnableAdminServer
;
import
de.codecentric.boot.admin.server.domain.entities.InstanceRepository
;
import
de.codecentric.boot.admin.server.notify.LoggingNotifier
;
import
de.codecentric.boot.admin.server.notify.RemindingNotifier
;
import
de.codecentric.boot.admin.server.notify.filter.FilteringNotifier
;
import
java.util.concurrent.TimeUnit
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Primary
;
import
org.springframework.context.annotation.Profile
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
;
@Configuration
@EnableAutoConfiguration
@EnableAdminServer
public
class
SpringBootAdminApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
SpringBootAdminApplication
.
class
,
args
);
}
@Configuration
@Profile
(
"insecure"
)
public
static
class
SecurityPermitAllConfig
extends
WebSecurityConfigurerAdapter
{
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
http
.
authorizeRequests
().
anyRequest
().
permitAll
()
//
.
and
().
csrf
().
disable
();
}
}
@Configuration
@Profile
(
"secure"
)
public
static
class
SecuritySecureConfig
extends
WebSecurityConfigurerAdapter
{
@Override
protected
void
configure
(
HttpSecurity
http
)
throws
Exception
{
// @formatter:off
http
.
authorizeRequests
()
.
antMatchers
(
"/assets/**"
).
permitAll
()
.
antMatchers
(
"/login"
).
permitAll
()
.
anyRequest
().
authenticated
()
.
and
()
.
formLogin
().
loginPage
(
"/login"
).
and
()
.
logout
().
and
()
.
httpBasic
().
and
()
.
csrf
().
disable
();
// @formatter:on
}
}
@Configuration
public
static
class
NotifierConfig
{
private
final
InstanceRepository
repository
;
public
NotifierConfig
(
InstanceRepository
repository
)
{
this
.
repository
=
repository
;
}
@Bean
@Primary
public
RemindingNotifier
remindingNotifier
()
{
RemindingNotifier
notifier
=
new
RemindingNotifier
(
filteringNotifier
(),
repository
);
notifier
.
setReminderPeriod
(
TimeUnit
.
SECONDS
.
toMillis
(
10
));
return
notifier
;
}
@Scheduled
(
fixedRate
=
1_000L
)
public
void
remind
()
{
remindingNotifier
().
sendReminders
();
}
@Bean
public
FilteringNotifier
filteringNotifier
()
{
return
new
FilteringNotifier
(
loggerNotifier
(),
repository
);
}
@Bean
public
LoggingNotifier
loggerNotifier
()
{
return
new
LoggingNotifier
(
repository
);
}
}
}
spring-boot-admin-samples/spring-boot-admin-sample-servlet/src/main/resources/application.yml
0 → 100644
View file @
dce53990
---
info
:
scm-url
:
"
@scm.url@"
build-url
:
"
http://travis-ci.org/@env.TRAVIS_REPO_SLUG@/builds/@env.TRAVIS_BUILD_ID@"
logging
:
file
:
"
target/boot-admin-sample-servlet.log"
management
:
endpoints
:
web
:
expose
:
"
*"
endpoint
:
health
:
show-details
:
true
spring
:
application
:
name
:
spring-boot-admin-sample-servlet
boot
:
admin
:
client
:
url
:
http://localhost:8080
profiles
:
active
:
-
insecure
---
spring
:
profiles
:
dev
boot
:
admin
:
ui
:
cache
:
no-cache
:
true
template-location
:
file://@project.basedir@/../../spring-boot-admin-server-ui/target/dist/
resource-locations
:
file://@project.basedir@/../../spring-boot-admin-server-ui/target/dist/
cache-templates
:
false
---
spring
:
profiles
:
insecure
---
spring
:
profiles
:
secure
security
:
user
:
name
:
"
user"
password
:
"
password"
boot
:
admin
:
client
:
username
:
"
user"
#These two are needed so that the client
password
:
"
password"
#can register at the protected server api
instance
:
metadata
:
user.name
:
"
user"
#These two are needed so that the server
user.password
:
"
password"
#can access the protected client endpoints
spring-boot-admin-samples/spring-boot-admin-sample-servlet/src/test/java/de/codecentric/boot/admin/SpringBootAdminApplicationTest.java
0 → 100644
View file @
dce53990
/*
* Copyright 2014-2018 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.
*/
package
de
.
codecentric
.
boot
.
admin
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.boot.test.context.SpringBootTest
;
import
org.springframework.test.context.junit4.SpringRunner
;
@RunWith
(
SpringRunner
.
class
)
@SpringBootTest
(
classes
=
{
SpringBootAdminApplication
.
class
})
public
class
SpringBootAdminApplicationTest
{
@Test
public
void
contextLoads
()
{
}
}
spring-boot-admin-samples/spring-boot-admin-sample-war/pom.xml
View file @
dce53990
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014-2018 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.
-->
<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>
...
...
@@ -13,6 +29,11 @@
<dependencies>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-tomcat
</artifactId>
<scope>
provided
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
...
...
spring-boot-admin-samples/spring-boot-admin-sample-war/src/main/resources/logback-spring.xml
deleted
100644 → 0
View file @
73911fba
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include
resource=
"org/springframework/boot/logging/logback/base.xml"
/>
<jmxConfigurator/>
</configuration>
\ No newline at end of file
spring-boot-admin-samples/spring-boot-admin-sample-zookeeper/src/main/resources/logback-spring.xml
deleted
100644 → 0
View file @
73911fba
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014-2017 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.
-->
<configuration>
<include
resource=
"org/springframework/boot/logging/logback/base.xml"
/>
<jmxConfigurator/>
</configuration>
\ No newline at end of file
spring-boot-admin-server-ui/package-lock.json
View file @
dce53990
This diff is collapsed.
Click to expand it.
spring-boot-admin-server-ui/package.json
View file @
dce53990
...
...
@@ -10,9 +10,9 @@
"test:watch"
:
"jest --watch"
},
"dependencies"
:
{
"@fortawesome/fontawesome"
:
"^1.1.
0
"
,
"@fortawesome/fontawesome-free-brands"
:
"^5.0.
2
"
,
"@fortawesome/fontawesome-free-solid"
:
"^5.0.
2
"
,
"@fortawesome/fontawesome"
:
"^1.1.
1
"
,
"@fortawesome/fontawesome-free-brands"
:
"^5.0.
3
"
,
"@fortawesome/fontawesome-free-solid"
:
"^5.0.
3
"
,
"@fortawesome/vue-fontawesome"
:
"0.0.22"
,
"axios"
:
"^0.17.1"
,
"bulma"
:
"^0.6.1"
,
...
...
@@ -38,7 +38,7 @@
"devDependencies"
:
{
"autoprefixer"
:
"^7.2.4"
,
"babel-core"
:
"^6.25.0"
,
"babel-eslint"
:
"^8.
1.2
"
,
"babel-eslint"
:
"^8.
2.1
"
,
"babel-jest"
:
"^22.0.4"
,
"babel-loader"
:
"^7.1.1"
,
"babel-plugin-lodash"
:
"^3.3.2"
,
...
...
@@ -59,7 +59,7 @@
"html-loader"
:
"^0.5.4"
,
"html-webpack-plugin"
:
"^2.30.0"
,
"identity-obj-proxy"
:
"^3.0.0"
,
"jest"
:
"^22.0.
4
"
,
"jest"
:
"^22.0.
5
"
,
"jest-vue"
:
"^0.8.2"
,
"lodash-webpack-plugin"
:
"^0.11.4"
,
"node-sass"
:
"^4.7.2"
,
...
...
@@ -68,13 +68,13 @@
"sass-loader"
:
"^6.0.6"
,
"style-loader"
:
"^0.19.1"
,
"url-loader"
:
"^0.6.2"
,
"vue-loader"
:
"^13.
6.2
"
,
"vue-loader"
:
"^13.
7.0
"
,
"vue-svg-loader"
:
"^0.4.0"
,
"vue-template-compiler"
:
"^2.5.13"
,
"vue-test-utils"
:
"^1.0.0-beta.9"
,
"webpack"
:
"^3.10.0"
,
"webpack-bundle-analyzer"
:
"^2.9.
1
"
,
"webpack-dev-server"
:
"^2.10.
0
"
"webpack-bundle-analyzer"
:
"^2.9.
2
"
,
"webpack-dev-server"
:
"^2.10.
1
"
},
"browserslist"
:
[
"> 2%"
,
...
...
spring-boot-admin-server-ui/src/main/frontend/assets/css/base.scss
View file @
dce53990
...
...
@@ -29,6 +29,18 @@
cursor
:
pointer
;
}
.button.is-icon
{
background
:
transparent
;
border-color
:
transparent
;
}
.navbar-item
.button.is-icon
{
color
:
$navbar-item-color
;
&
:hover
{
color
:
$navbar-item-hover-color
;
}
}
.section.is-loading
{
&
:
:
after
{
@include
loader
;
...
...
@@ -40,17 +52,6 @@
}
}
.data-table
{
&
td
:last-child
{
width
:
100%
;
text-align
:
right
;
}
&
td
:not
(
:last-child
)
{
white-space
:
nowrap
;
}
}
//D3 Charts
.tick
{
&
line
{
...
...
spring-boot-admin-server-ui/src/main/frontend/index.html
View file @
dce53990
...
...
@@ -23,7 +23,7 @@
<meta
name=
"format-detection"
content=
"telephone=no,email=no"
>
<link
rel=
"shortcut icon"
href=
"assets/img/favicon.png"
th:href=
"@{assets/img/favicon.png}"
type=
"image/png"
>
<link
href=
"assets/css/sba-core.css"
th:href=
"@{assets/css/sba-core.css}"
rel=
"stylesheet"
>
<title>
Spring Boot Admin
- Applications
</title>
<title>
Spring Boot Admin
</title>
</head>
<body>
...
...
spring-boot-admin-server-ui/src/main/frontend/index.js
View file @
dce53990
...
...
@@ -14,28 +14,13 @@
* limitations under the License.
*/
import
fontawesome
from
'@fortawesome/fontawesome'
;
import
faGithub
from
'@fortawesome/fontawesome-free-brands/faGithub'
;
import
faGitter
from
'@fortawesome/fontawesome-free-brands/faGitter'
;
import
faStackOverflow
from
'@fortawesome/fontawesome-free-brands/faStackOverflow'
;
import
faBan
from
'@fortawesome/fontawesome-free-solid/faBan'
;
import
faBook
from
'@fortawesome/fontawesome-free-solid/faBook'
;
import
faCheck
from
'@fortawesome/fontawesome-free-solid/faCheck'
;
import
faDownload
from
'@fortawesome/fontawesome-free-solid/faDownload'
;
import
faExclamation
from
'@fortawesome/fontawesome-free-solid/faExclamation'
;
import
faMinusCircle
from
'@fortawesome/fontawesome-free-solid/faMinusCircle'
;
import
faQuestionCircle
from
'@fortawesome/fontawesome-free-solid/faQuestionCircle'
;
import
faStepBackward
from
'@fortawesome/fontawesome-free-solid/faStepBackward'
;
import
faStepForward
from
'@fortawesome/fontawesome-free-solid/faStepForward'
;
import
faTimesCircle
from
'@fortawesome/fontawesome-free-solid/faTimesCircle'
;
import
faTrash
from
'@fortawesome/fontawesome-free-solid/faTrash'
;
import
FontAwesomeIcon
from
'@fortawesome/vue-fontawesome'
;
import
moment
from
'moment'
;
import
Vue
from
'vue'
;
import
VueRouter
from
'vue-router'
;
import
'./assets/css/base.scss'
;
import
'./assets/img/favicon.png'
;
import
sbaComponents
from
'./components'
import
FontAwesomeIcon
from
'./utils/fontawesome'
;
import
sbaAbout
from
'./views/about'
;
import
sbaApplications
from
'./views/applications'
;
import
sbaInstancesDetails
from
'./views/instances/details'
;
...
...
@@ -48,10 +33,7 @@ import sbaInstancesShell from './views/instances/shell';
import
sbaInstancesThreaddump
from
'./views/instances/threaddump'
;
import
sbaInstancesTrace
from
'./views/instances/trace'
;
import
sbaJournal
from
'./views/journal'
;
import
sbaShell
from
'./views/shell'
fontawesome
.
library
.
add
(
faGithub
,
faStackOverflow
,
faGitter
,
faTrash
,
faDownload
,
faStepForward
,
faStepBackward
,
faCheck
,
faQuestionCircle
,
faBan
,
faTimesCircle
,
faMinusCircle
,
faExclamation
,
faBook
);
import
sbaShell
from
'./views/shell'
;
moment
.
locale
(
window
.
navigator
.
language
);
...
...
@@ -64,7 +46,7 @@ const router = new VueRouter({
});
const
views
=
[];
views
.
register
=
(
view
)
=>
{
views
.
register
=
view
=>
{
if
(
view
.
template
)
{
views
.
push
(
view
);
}
...
...
@@ -81,8 +63,6 @@ views.register = (view) => {
}
};
router
.
addRoutes
([{
path
:
'/'
,
redirect
:
{
name
:
'applications'
}}]);
views
.
register
({
path
:
'/applications'
,
name
:
'applications'
,
...
...
@@ -148,7 +128,7 @@ views.register({
});
views
.
register
({
name
:
'instance/heapdump'
,
href
:
(
params
)
=>
`instances/
${
params
.
instanceId
}
/actuator/heapdump`
,
href
:
params
=>
`instances/
${
params
.
instanceId
}
/actuator/heapdump`
,
template
:
'Heapdump'
,
order
:
600
,
isActive
:
({
instance
})
=>
instance
.
hasEndpoint
(
'heapdump'
)
...
...
@@ -166,6 +146,8 @@ views.register({
isActive
:
({
instance
})
=>
instance
.
hasEndpoint
(
'flyway'
)
});
router
.
addRoutes
([{
path
:
'/'
,
redirect
:
{
name
:
'applications'
}}]);
//Fire root Vue up
new
Vue
({
router
,
...
...
spring-boot-admin-server-ui/src/main/frontend/login.html
0 → 100644
View file @
dce53990
<!DOCTYPE html>
<!--
~ Copyright 2014-2018 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.
-->
<html>
<head>
<base
th:href=
"@{/}"
href=
"/"
>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
name=
"format-detection"
content=
"telephone=no,email=no"
>
<link
rel=
"shortcut icon"
href=
"assets/img/favicon.png"
th:href=
"@{assets/img/favicon.png}"
type=
"image/png"
>
<link
href=
"assets/css/sba-core.css"
th:href=
"@{assets/css/sba-core.css}"
rel=
"stylesheet"
>
<title>
Spring Boot Admin - Login
</title>
</head>
<body>
<section
class=
"hero is-fullheight"
>
<div
class=
"hero-body"
>
<div
class=
"container has-text-centered"
>
<div
class=
"column is-4 is-offset-4"
>
<div
class=
"box"
>
<h1
class=
"title"
>
Spring Boot Admin
</h1>
<form
method=
"post"
action=
"login"
>
<div
class=
"field"
>
<p
class=
"is-medium has-text-danger"
th:unless=
"${param.error == null}"
>
Invalid username or password!
</p>
<p
class=
"is-medium has-text-success"
th:unless=
"${param.logout == null}"
>
Logout successful!
</p>
</div>
<div
class=
"field"
>
<div
class=
"control"
>
<input
class=
"input is-medium"
type=
"input"
name=
"username"
placeholder=
"Username"
autofocus
th:classappend=
"${param.error != null} ? is-danger"
>
</div>
</div>
<div
class=
"field"
>
<div
class=
"control"
>
<input
class=
"input is-medium"
type=
"password"
name=
"password"
placeholder=
"Password"
th:classappend=
"${param.error != null} ? is-danger"
>
</div>
</div>
<div
class=
"field"
>
<div
class=
"control"
>
<input
type=
"submit"
class=
"button is-block is-primary is-medium is-fullwidth"
value=
"Login"
>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
</body>
</html>
\ No newline at end of file
spring-boot-admin-server-ui/src/main/frontend/utils/fontawesome.js
0 → 100644
View file @
dce53990
/*
* Copyright 2014-2018 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.
*/
import
fontawesome
from
'@fortawesome/fontawesome'
;
import
faGithub
from
'@fortawesome/fontawesome-free-brands/faGithub'
;
import
faGitter
from
'@fortawesome/fontawesome-free-brands/faGitter'
;
import
faStackOverflow
from
'@fortawesome/fontawesome-free-brands/faStackOverflow'
;
import
faBan
from
'@fortawesome/fontawesome-free-solid/faBan'
;
import
faBook
from
'@fortawesome/fontawesome-free-solid/faBook'
;
import
faCheck
from
'@fortawesome/fontawesome-free-solid/faCheck'
;
import
faDownload
from
'@fortawesome/fontawesome-free-solid/faDownload'
;
import
faExclamation
from
'@fortawesome/fontawesome-free-solid/faExclamation'
;
import
faMinusCircle
from
'@fortawesome/fontawesome-free-solid/faMinusCircle'
;
import
faQuestionCircle
from
'@fortawesome/fontawesome-free-solid/faQuestionCircle'
;
import
faSignOutAlt
from
'@fortawesome/fontawesome-free-solid/faSignOutAlt'
;
import
faStepBackward
from
'@fortawesome/fontawesome-free-solid/faStepBackward'
;
import
faStepForward
from
'@fortawesome/fontawesome-free-solid/faStepForward'
;
import
faTimesCircle
from
'@fortawesome/fontawesome-free-solid/faTimesCircle'
;
import
faTrash
from
'@fortawesome/fontawesome-free-solid/faTrash'
;
import
FontAwesomeIcon
from
'@fortawesome/vue-fontawesome'
;
fontawesome
.
library
.
add
(
faGithub
,
faStackOverflow
,
faGitter
,
faTrash
,
faDownload
,
faStepForward
,
faStepBackward
,
faCheck
,
faQuestionCircle
,
faBan
,
faTimesCircle
,
faMinusCircle
,
faExclamation
,
faBook
,
faSignOutAlt
);
export
default
FontAwesomeIcon
;
\ No newline at end of file
spring-boot-admin-server-ui/src/main/frontend/views/instances/logfile/index.vue
View file @
dce53990
...
...
@@ -66,7 +66,6 @@
window
.
addEventListener
(
'scroll'
,
this
.
onScroll
);
},
beforeDestroy
()
{
this
.
stop
();
window
.
removeEventListener
(
'scroll'
,
this
.
onScroll
);
},
methods
:
{
...
...
spring-boot-admin-server-ui/src/main/frontend/views/instances/trace/traces-list.vue
View file @
dce53990
...
...
@@ -35,8 +35,10 @@
<td
v-text=
"trace.timestamp.format('L HH:mm:ss.SSS')"
></td>
<td
v-text=
"trace.method"
></td>
<td
v-text=
"trace.path"
></td>
<td
v-text=
"trace.status"
:class=
"
{ 'has-text-warning' : trace.isClientError(), 'has-text-danger' : trace.isServerError() }">
</td>
<td>
<span
v-text=
"trace.status"
class=
"tag"
:class=
"
{ 'is-success' : trace.isSuccess(), 'is-warning' : trace.isClientError(), 'is-danger' : trace.isServerError() }">
</span>
</td>
<td
v-text=
"trace.contentType"
></td>
<td
v-text=
"trace.contentLength ? prettyBytes(trace.contentLength) : ''"
></td>
<td
v-text=
"trace.timeTaken !== null && typeof trace.timeTaken !== 'undefined' ? `$
{trace.timeTaken} ms` : ''">
</td>
...
...
spring-boot-admin-server-ui/src/main/frontend/views/shell/navbar.vue
View file @
dce53990
...
...
@@ -35,6 +35,14 @@
<router-link
class=
"navbar-item"
v-for=
"view in views"
:to=
"
{name: view.name}" :key="view.name"
v-html="view.template">
</router-link>
<div
class=
"navbar-item"
>
<form
action=
"logout"
method=
"post"
>
<button
class=
"button is-icon"
type=
"submit"
value=
"logout"
>
Logout
<font-awesome-icon
icon=
"sign-out-alt"
size=
"lg"
></font-awesome-icon>
</button>
</form>
</div>
</div>
</div>
</div>
...
...
spring-boot-admin-server-ui/src/main/java/de/codecentric/boot/admin/server/ui/web/UiController.java
View file @
dce53990
...
...
@@ -29,4 +29,9 @@ public class UiController {
return
"index"
;
}
@GetMapping
(
path
=
"/login"
,
produces
=
MediaType
.
TEXT_HTML_VALUE
)
public
String
login
()
{
return
"login"
;
}
}
spring-boot-admin-server-ui/webpack.config.js
View file @
dce53990
...
...
@@ -157,6 +157,12 @@ const config = {
inject
:
false
,
hash
:
process
.
env
.
NODE_ENV
===
'production'
,
}),
new
HtmlWebpackPlugin
({
filename
:
'login.html'
,
template
:
'./src/main/frontend/login.html'
,
inject
:
false
,
hash
:
process
.
env
.
NODE_ENV
===
'production'
,
}),
new
BundleAnalyzerPlugin
({
analyzerMode
:
'static'
,
openAnalyzer
:
false
,
...
...
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