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
6e6799dd
Commit
6e6799dd
authored
Aug 06, 2016
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some codacy issues
parent
f5cb00b7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
23 deletions
+16
-23
applicationJmx.js
...er-ui/modules/applications-jmx/services/applicationJmx.js
+1
-1
RevereseZuulProxyConfiguration.java
...ric/boot/admin/config/RevereseZuulProxyConfiguration.java
+1
-1
RemindingNotifier.java
...a/de/codecentric/boot/admin/notify/RemindingNotifier.java
+3
-3
ConcatenatingResourceResolver.java
...n/web/servlet/resource/ConcatenatingResourceResolver.java
+1
-1
ApplicationRouteLocator.java
.../codecentric/boot/admin/zuul/ApplicationRouteLocator.java
+1
-3
MailNotifierTest.java
...va/de/codecentric/boot/admin/notify/MailNotifierTest.java
+1
-1
AdminClientPropertiesTest.java
...ecentric/boot/admin/config/AdminClientPropertiesTest.java
+8
-13
No files found.
spring-boot-admin-server-ui/modules/applications-jmx/services/applicationJmx.js
View file @
6e6799dd
...
...
@@ -43,7 +43,7 @@ module.exports = function ($rootScope, jolokia, $q) {
var
name
=
''
;
var
type
=
''
;
var
parts
=
rBeanName
.
split
(
','
);
for
(
var
i
in
parts
)
{
for
(
var
i
=
0
;
i
<
parts
.
length
;
i
++
)
{
var
tokens
=
parts
[
i
].
split
(
'='
);
if
(
tokens
[
0
].
toLowerCase
()
===
'name'
)
{
name
=
tokens
[
1
];
...
...
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/config/RevereseZuulProxyConfiguration.java
View file @
6e6799dd
...
...
@@ -112,7 +112,7 @@ public class RevereseZuulProxyConfiguration extends ZuulConfiguration {
private
static
class
ZuulRefreshListener
implements
ApplicationListener
<
ApplicationEvent
>
{
private
ZuulHandlerMapping
zuulHandlerMapping
;
p
ublic
ZuulRefreshListener
(
ZuulHandlerMapping
zuulHandlerMapping
)
{
p
rivate
ZuulRefreshListener
(
ZuulHandlerMapping
zuulHandlerMapping
)
{
this
.
zuulHandlerMapping
=
zuulHandlerMapping
;
}
...
...
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/notify/RemindingNotifier.java
View file @
6e6799dd
...
...
@@ -30,7 +30,7 @@ import de.codecentric.boot.admin.event.ClientApplicationStatusChangedEvent;
* @author Johannes Edmeier
*/
public
class
RemindingNotifier
implements
Notifier
{
private
final
ConcurrentHashMap
<
String
,
Reminder
>
reminders
=
new
ConcurrentHashMap
<
String
,
Reminder
>();
private
final
ConcurrentHashMap
<
String
,
Reminder
>
reminders
=
new
ConcurrentHashMap
<>();
private
long
reminderPeriod
=
TimeUnit
.
MINUTES
.
toMillis
(
10L
);
private
String
[]
reminderStatuses
=
{
"DOWN"
,
"OFFLINE"
};
private
final
Notifier
delegate
;
...
...
@@ -51,7 +51,7 @@ public class RemindingNotifier implements Notifier {
public
void
sendReminders
()
{
long
now
=
System
.
currentTimeMillis
();
for
(
Reminder
reminder
:
new
ArrayList
<
Reminder
>(
reminders
.
values
()))
{
for
(
Reminder
reminder
:
new
ArrayList
<>(
reminders
.
values
()))
{
if
(
now
-
reminder
.
getLastNotification
()
>
reminderPeriod
)
{
reminder
.
setLastNotification
(
now
);
delegate
.
notify
(
reminder
.
getEvent
());
...
...
@@ -92,7 +92,7 @@ public class RemindingNotifier implements Notifier {
private
final
ClientApplicationEvent
event
;
private
long
lastNotification
;
p
ublic
Reminder
(
ClientApplicationEvent
event
)
{
p
rivate
Reminder
(
ClientApplicationEvent
event
)
{
this
.
event
=
event
;
this
.
lastNotification
=
event
.
getTimestamp
();
}
...
...
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/web/servlet/resource/ConcatenatingResourceResolver.java
View file @
6e6799dd
...
...
@@ -43,7 +43,7 @@ public class ConcatenatingResourceResolver extends AbstractResourceResolver {
private
final
byte
[]
delimiter
;
public
ConcatenatingResourceResolver
(
byte
[]
delimiter
)
{
this
.
delimiter
=
delimiter
;
this
.
delimiter
=
delimiter
.
clone
()
;
}
@Override
...
...
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/zuul/ApplicationRouteLocator.java
View file @
6e6799dd
...
...
@@ -154,10 +154,8 @@ public class ApplicationRouteLocator implements RefreshableRouteLocator {
private
String
stripServletPath
(
final
String
path
)
{
String
adjustedPath
=
path
;
if
(
StringUtils
.
hasText
(
servletPath
))
{
if
(!
servletPath
.
equals
(
"/"
))
{
if
(
StringUtils
.
hasText
(
servletPath
)
&&
!
"/"
.
equals
(
servletPath
))
{
adjustedPath
=
path
.
substring
(
this
.
servletPath
.
length
());
}
}
LOGGER
.
debug
(
"adjustedPath={}"
,
path
);
...
...
spring-boot-admin-server/src/test/java/de/codecentric/boot/admin/notify/MailNotifierTest.java
View file @
6e6799dd
...
...
@@ -97,7 +97,7 @@ public class MailNotifierTest {
Notifier
notifier
=
new
AbstractStatusChangeNotifier
()
{
@Override
protected
void
doNotify
(
ClientApplicationStatusChangedEvent
event
)
throws
Exception
{
throw
new
RuntimeException
(
);
throw
new
IllegalStateException
(
"test"
);
}
};
notifier
.
notify
(
new
ClientApplicationStatusChangedEvent
(
...
...
spring-boot-admin-starter-client/src/test/java/de/codecentric/boot/admin/config/AdminClientPropertiesTest.java
View file @
6e6799dd
...
...
@@ -6,7 +6,6 @@ import static org.junit.Assert.assertTrue;
import
static
org
.
mockito
.
Mockito
.
mock
;
import
java.net.InetAddress
;
import
java.net.UnknownHostException
;
import
org.junit.After
;
import
org.junit.Test
;
...
...
@@ -30,7 +29,7 @@ public class AdminClientPropertiesTest {
}
@Test
public
void
test_mgmtPortPath
()
{
public
void
test_mgmtPortPath
()
throws
Exception
{
load
(
"management.contextPath=/admin"
,
"endpoints.health.id=alive"
,
"local.server.port=8080"
,
"local.management.port=8081"
);
AdminClientProperties
clientProperties
=
new
AdminClientProperties
();
...
...
@@ -46,7 +45,7 @@ public class AdminClientPropertiesTest {
}
@Test
public
void
test_contextPath_mgmtPath
()
{
public
void
test_contextPath_mgmtPath
()
throws
Exception
{
load
(
"server.context-path=app"
,
"management.context-path=/admin"
,
"local.server.port=8080"
);
AdminClientProperties
clientProperties
=
new
AdminClientProperties
();
context
.
getAutowireCapableBeanFactory
().
autowireBean
(
clientProperties
);
...
...
@@ -61,7 +60,7 @@ public class AdminClientPropertiesTest {
}
@Test
public
void
test_contextPatht_mgmtPortPath
()
{
public
void
test_contextPatht_mgmtPortPath
()
throws
Exception
{
load
(
"server.context-path=app"
,
"management.context-path=/admin"
,
"local.server.port=8080"
,
"local.management.port=8081"
);
AdminClientProperties
clientProperties
=
new
AdminClientProperties
();
...
...
@@ -77,7 +76,7 @@ public class AdminClientPropertiesTest {
}
@Test
public
void
test_contextPath
()
{
public
void
test_contextPath
()
throws
Exception
{
load
(
"server.context-path=app"
,
"local.server.port=80"
);
AdminClientProperties
clientProperties
=
new
AdminClientProperties
();
context
.
getAutowireCapableBeanFactory
().
autowireBean
(
clientProperties
);
...
...
@@ -91,7 +90,7 @@ public class AdminClientPropertiesTest {
}
@Test
public
void
test_servletPath
()
{
public
void
test_servletPath
()
throws
Exception
{
load
(
"server.servlet-path=app"
,
"server.context-path=srv"
,
"local.server.port=80"
);
AdminClientProperties
clientProperties
=
new
AdminClientProperties
();
context
.
getAutowireCapableBeanFactory
().
autowireBean
(
clientProperties
);
...
...
@@ -106,7 +105,7 @@ public class AdminClientPropertiesTest {
}
@Test
public
void
test_default
()
{
public
void
test_default
()
throws
Exception
{
load
(
"local.server.port=8080"
);
AdminClientProperties
clientProperties
=
new
AdminClientProperties
();
context
.
getAutowireCapableBeanFactory
().
autowireBean
(
clientProperties
);
...
...
@@ -119,7 +118,7 @@ public class AdminClientPropertiesTest {
}
@Test
public
void
testSsl
()
{
public
void
testSsl
()
throws
Exception
{
load
(
"server.ssl.key-store=somefile.jks"
,
"server.ssl.key-store-password=password"
,
"local.server.port=8080"
);
AdminClientProperties
clientProperties
=
new
AdminClientProperties
();
...
...
@@ -173,12 +172,8 @@ public class AdminClientPropertiesTest {
assertThat
(
clientProperties
.
getServiceUrl
(),
is
(
"http://127.0.0.1:8080"
));
}
private
String
getHostname
()
{
try
{
private
String
getHostname
()
throws
Exception
{
return
InetAddress
.
getLocalHost
().
getCanonicalHostName
();
}
catch
(
UnknownHostException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
private
void
publishApplicationReadyEvent
(
AdminClientProperties
client
)
{
...
...
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