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
00b7b57f
Commit
00b7b57f
authored
Sep 28, 2015
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show cache metrics from spring-boot 1.3 in details
parent
8625b20a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
24 deletions
+48
-24
detailsCtrl.js
...oot-admin-server-ui/app/js/controller/apps/detailsCtrl.js
+28
-21
details.html
spring-boot-admin-server-ui/app/views/apps/details.html
+20
-3
No files found.
spring-boot-admin-server-ui/app/js/controller/apps/detailsCtrl.js
View file @
00b7b57f
...
...
@@ -54,54 +54,61 @@ module.exports = function ($scope, $interval, application, MetricsHelper) {
$scope
.
gcInfos
=
{};
$scope
.
datasources
=
{};
$scope
.
caches
=
{};
function
createOrGet
(
map
,
key
,
factory
)
{
return
map
[
key
]
||
(
map
[
key
]
=
factory
());
}
MetricsHelper
.
find
(
metrics
,
[
/gc
\.(
.+
)\.
time/
,
/gc
\.(
.+
)\.
count/
,
/datasource
\.(
.+
)\.
active/
,
/datasource
\.(
.+
)\.
usage/
/datasource
\.(
.+
)\.
active/
,
/datasource
\.(
.+
)\.
usage/
,
/cache
\.(
.+
)\.
size/
,
/cache
\.(
.+
)\.
miss
\.
ratio/
,
/cache
\.(
.+
)\.
hit
\.
ratio/
],
[
function
(
metric
,
match
,
value
)
{
createOrGet
(
$scope
.
gcInfos
,
match
[
1
],
function
()
{
return
{
time
:
0
,
count
:
0
};
return
{
time
:
0
,
count
:
0
};
})
.
time
=
value
;
},
function
(
metric
,
match
,
value
)
{
createOrGet
(
$scope
.
gcInfos
,
match
[
1
],
function
()
{
return
{
time
:
0
,
count
:
0
};
return
{
time
:
0
,
count
:
0
};
})
.
count
=
value
;
},
function
(
metric
,
match
,
value
)
{
$scope
.
hasDatasources
=
true
;
createOrGet
(
$scope
.
datasources
,
match
[
1
],
function
()
{
return
{
min
:
0
,
max
:
0
,
active
:
0
,
usage
:
0
};
return
{
min
:
0
,
max
:
0
,
active
:
0
,
usage
:
0
};
})
.
active
=
value
;
},
function
(
metric
,
match
,
value
)
{
$scope
.
hasDatasources
=
true
;
createOrGet
(
$scope
.
datasources
,
match
[
1
],
function
()
{
return
{
min
:
0
,
max
:
0
,
active
:
0
,
usage
:
0
};
return
{
min
:
0
,
max
:
0
,
active
:
0
,
usage
:
0
};
})
.
usage
=
value
;
},
function
(
metric
,
match
,
value
)
{
$scope
.
hasCaches
=
true
;
createOrGet
(
$scope
.
caches
,
match
[
1
],
function
()
{
return
{
size
:
0
,
hitRatio
:
0.0
,
missRatio
:
0.0
};
})
.
size
=
value
;
},
function
(
metric
,
match
,
value
)
{
$scope
.
hasCaches
=
true
;
createOrGet
(
$scope
.
caches
,
match
[
1
],
function
()
{
return
{
size
:
0
,
hitRatio
:
0.0
,
missRatio
:
0.0
};
})
.
missRatio
=
value
;
},
function
(
metric
,
match
,
value
)
{
$scope
.
hasCaches
=
true
;
createOrGet
(
$scope
.
caches
,
match
[
1
],
function
()
{
return
{
size
:
0
,
hitRatio
:
0.0
,
missRatio
:
0.0
};
})
.
hitRatio
=
value
;
}
]);
})
...
...
spring-boot-admin-server-ui/app/views/apps/details.html
View file @
00b7b57f
...
...
@@ -60,7 +60,6 @@
</tr>
</table>
</div>
<div
class=
"span6"
>
<table
class=
"table"
>
<thead><tr><th
colspan=
"2"
>
JVM
<small
class=
"pull-right"
><a
href=
"api/applications/{{ application.id }}/metrics"
>
raw JSON
</a></small></th></tr></thead>
...
...
@@ -113,7 +112,6 @@
</tbody>
</table>
</div>
<div
class=
"span6"
ng-show=
"metrics['httpsessions.active'] != null"
>
<table
class=
"table"
>
<thead><tr><th
colspan=
"2"
>
Servlet Container
</th></tr></thead>
...
...
@@ -125,7 +123,6 @@
</tbody>
</table>
</div>
<div
class=
"span6"
ng-show=
"hasDatasources"
>
<table
class=
"table"
>
<thead><tr><th
colspan=
"2"
>
Datasources
</th></tr></thead>
...
...
@@ -143,6 +140,26 @@
</tbody>
</table>
</div>
<div
class=
"span6"
ng-show=
"hasCaches"
>
<table
class=
"table"
>
<thead><tr><th
colspan=
"2"
>
Caches
</th></tr></thead>
<tbody>
<tr
ng-repeat =
"(name, value) in caches track by name"
>
<td
colspan=
"2"
>
<span>
{{name | capitalize}} (size: {{ value.size }})
</span>
<div
class=
"progress"
style=
"margin-bottom: 0px;"
>
<div
class=
"bar bar-success"
style=
"width:{{ value.hitRatio * 100 | number:2 }}%;"
>
{{value.hitRatio * 100 | number}}% hits
</div>
<div
class=
"bar bar-danger"
style=
"width:{{ value.missRatio * 100 | number:2 }}%;"
>
{{value.missRatio * 100 | number}}% misses
</div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div
class=
"row"
>
<div
class=
"span12"
>
...
...
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