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
97335237
Commit
97335237
authored
Jul 09, 2016
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't read /configprops for detecting endpoints
Detecect endpoints by making a HEAD request instead of querying the configprops since it is broken when having a second applicationContext
parent
e93935bb
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
38 deletions
+27
-38
environmentCtrl.js
...s/applications-environment/controllers/environmentCtrl.js
+7
-3
environment.html
...i/modules/applications-environment/views/environment.html
+1
-1
applicationsHeaderCtrl.js
...odules/applications/controllers/applicationsHeaderCtrl.js
+0
-4
module.js
spring-boot-admin-server-ui/modules/applications/module.js
+17
-1
application.js
...in-server-ui/modules/applications/services/application.js
+0
-25
applications-list.html
...rver-ui/modules/applications/views/applications-list.html
+0
-1
ApplicationRouteLocator.java
.../codecentric/boot/admin/zuul/ApplicationRouteLocator.java
+2
-3
No files found.
spring-boot-admin-server-ui/modules/applications-environment/controllers/environmentCtrl.js
View file @
97335237
...
...
@@ -15,10 +15,15 @@
*/
'use strict'
;
module
.
exports
=
function
(
$scope
,
application
)
{
module
.
exports
=
function
(
$scope
,
$http
,
application
)
{
'ngInject'
;
$scope
.
application
=
application
;
$scope
.
refreshSupported
=
false
;
$http
.
head
(
'api/applications/'
+
application
.
id
+
'/refresh'
).
catch
(
function
(
response
)
{
$scope
.
refreshSupported
=
response
.
status
===
405
;
//If method not allowed is returned the endpoint is present.
});
var
toArray
=
function
(
obj
)
{
return
Object
.
getOwnPropertyNames
(
obj
).
map
(
function
(
key
)
{
...
...
@@ -38,8 +43,7 @@ module.exports = function ($scope, application) {
var
env
=
response
.
data
;
$scope
.
profiles
=
env
.
profiles
;
delete
env
.
profiles
;
$scope
.
env
=
toArray
(
env
);
// to get the env-sources in correct
// order we have to convert to an array
$scope
.
env
=
toArray
(
env
);
// to get the env-sources in correct order we have to convert to an array
}).
catch
(
function
(
response
)
{
$scope
.
error
=
response
.
data
;
});
...
...
spring-boot-admin-server-ui/modules/applications-environment/views/environment.html
View file @
97335237
...
...
@@ -10,7 +10,7 @@
</table>
</sba-info-panel>
<sba-info-panel
panel-title=
"Environment manager"
ng-show=
"
application.capabilities.refresh
"
>
<sba-info-panel
panel-title=
"Environment manager"
ng-show=
"
refreshSupported
"
>
<sba-environment-manager
environment=
"env"
application=
"application"
on-environment-changed=
"refresh"
></sba-environment-manager>
</sba-info-panel>
...
...
spring-boot-admin-server-ui/modules/applications/controllers/applicationsHeaderCtrl.js
View file @
97335237
...
...
@@ -19,9 +19,5 @@ module.exports = function ($scope, application, ApplicationViews) {
'ngInject'
;
$scope
.
application
=
application
;
if
(
!
application
.
capablities
)
{
application
.
getCapabilities
();
}
$scope
.
views
=
ApplicationViews
.
getApplicationViews
(
application
);
};
spring-boot-admin-server-ui/modules/applications/module.js
View file @
97335237
...
...
@@ -67,6 +67,23 @@ module.run(function ($rootScope, $state, $filter, $sce, $http, Notification, App
});
ApplicationViews
.
register
({
order
:
1
,
title
:
$sce
.
trustAsHtml
(
'<i class="fa fa-file-text-o fa-fw"></i>Log'
),
href
:
'/api/applications/{id}/logfile'
,
target
:
'_blank'
,
show
:
function
(
application
)
{
if
(
!
application
.
managementUrl
||
!
application
.
statusInfo
.
status
||
application
.
statusInfo
.
status
===
'OFFLINE'
)
{
return
false
;
}
return
$http
.
head
(
'api/applications/'
+
application
.
id
+
'/logfile'
).
then
(
function
()
{
return
true
;
}).
catch
(
function
()
{
return
false
;
});
}
});
ApplicationViews
.
register
({
order
:
110
,
title
:
$sce
.
trustAsHtml
(
'<i class="fa fa-cubes fa-fw"></i>Heapdump'
),
href
:
'/api/applications/{id}/heapdump'
,
...
...
@@ -97,7 +114,6 @@ module.run(function ($rootScope, $state, $filter, $sce, $http, Notification, App
var
refresh
=
function
(
application
)
{
application
.
info
=
{};
application
.
refreshing
=
true
;
application
.
getCapabilities
();
application
.
getInfo
().
then
(
function
(
response
)
{
var
info
=
response
.
data
;
application
.
version
=
info
.
version
;
...
...
spring-boot-admin-server-ui/modules/applications/services/application.js
View file @
97335237
...
...
@@ -18,14 +18,6 @@
module
.
exports
=
function
(
$resource
,
$http
)
{
'ngInject'
;
var
isEndpointPresent
=
function
(
endpoint
,
configprops
)
{
if
(
configprops
[
endpoint
])
{
return
true
;
}
else
{
return
false
;
}
};
var
Application
=
$resource
(
'api/applications/:id'
,
{
id
:
'@id'
},
{
...
...
@@ -52,23 +44,6 @@ module.exports = function ($resource, $http) {
return
response
;
};
Application
.
prototype
.
getCapabilities
=
function
()
{
var
application
=
this
;
this
.
capabilities
=
{};
if
(
this
.
managementUrl
)
{
$http
.
get
(
'api/applications/'
+
application
.
id
+
'/configprops'
).
then
(
function
(
response
)
{
application
.
capabilities
.
refresh
=
isEndpointPresent
(
'refreshEndpoint'
,
response
.
data
);
});
$http
.
head
(
'api/applications/'
+
application
.
id
+
'/logfile'
).
then
(
function
()
{
application
.
capabilities
.
logfile
=
true
;
}).
catch
(
function
()
{
application
.
capabilities
.
logfile
=
false
;
});
}
};
Application
.
prototype
.
getHealth
=
function
()
{
return
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/health'
).
then
(
convert
);
};
...
...
spring-boot-admin-server-ui/modules/applications/views/applications-list.html
View file @
97335237
...
...
@@ -30,7 +30,6 @@
<td>
<div
class=
"pull-right"
>
<div
class=
"btn-group"
>
<a
ng-if=
"application.capabilities.logfile && application.statusInfo.status != null && application.statusInfo.status != 'OFFLINE'"
target=
"_blank"
class=
"btn btn-success"
ng-href=
"{{application.capabilities.logfile ? 'api/applications/' + application.id + '/logfile' :''}}"
><i
class=
"fa fa-file-text-o"
></i>
Log
</a>
<a
ng-if=
"views.length > 0"
ng-href=
"{{views[0].href}}"
target=
"{{views[0].target}}"
class=
"btn btn-success"
ng-bind-html=
"views[0].title"
></a>
<a
class=
"btn btn-success dropdown-toggle"
data-toggle=
"dropdown"
ng-if=
"views.length > 1"
>
<i
class=
"fa fa-caret-down"
></i>
...
...
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/zuul/ApplicationRouteLocator.java
View file @
97335237
...
...
@@ -52,9 +52,8 @@ public class ApplicationRouteLocator implements RefreshableRouteLocator {
/**
* Endpoints to be proxified by spring boot admin.
*/
private
String
[]
endpoints
=
{
"env"
,
"metrics"
,
"trace"
,
"dump"
,
"jolokia"
,
"info"
,
"configprops"
,
"trace"
,
"activiti"
,
"logfile"
,
"refresh"
,
"flyway"
,
"liquibase"
,
"heapdump"
};
private
String
[]
endpoints
=
{
"env"
,
"metrics"
,
"trace"
,
"dump"
,
"jolokia"
,
"info"
,
"trace"
,
"activiti"
,
"logfile"
,
"refresh"
,
"flyway"
,
"liquibase"
,
"heapdump"
};
public
ApplicationRouteLocator
(
String
servletPath
,
ApplicationRegistry
registry
,
String
prefix
)
{
...
...
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