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
a5d60986
Commit
a5d60986
authored
Nov 10, 2014
by
Johannes Stelzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added threads view
parent
6ff2b45c
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
112 additions
and
6 deletions
+112
-6
app.js
...g-boot-admin-server/src/main/webapp/public/scripts/app.js
+6
-1
controllers.js
...src/main/webapp/public/scripts/controllers/controllers.js
+21
-0
services.js
...erver/src/main/webapp/public/scripts/services/services.js
+5
-0
main.css
...-boot-admin-server/src/main/webapp/public/styles/main.css
+4
-0
apps.html
...-boot-admin-server/src/main/webapp/public/views/apps.html
+1
-0
threads.html
...min-server/src/main/webapp/public/views/apps/threads.html
+73
-0
overview.html
...t-admin-server/src/main/webapp/public/views/overview.html
+2
-5
No files found.
spring-boot-admin-server/src/main/webapp/public/scripts/app.js
View file @
a5d60986
...
...
@@ -76,7 +76,12 @@ angular.module('springBootAdmin', [
url
:
'/jmx'
,
templateUrl
:
'views/apps/jmx.html'
,
controller
:
'jmxCtrl'
});
})
.
state
(
'apps.threads'
,
{
url
:
'/threads'
,
templateUrl
:
'views/apps/threads.html'
,
controller
:
'threadsCtrl'
});
})
.
run
(
function
(
$rootScope
,
$state
,
$stateParams
,
$log
)
{
$rootScope
.
$state
=
$state
;
...
...
spring-boot-admin-server/src/main/webapp/public/scripts/controllers/controllers.js
View file @
a5d60986
...
...
@@ -389,4 +389,25 @@ angular.module('springBootAdmin')
}
}
}
}])
.
controller
(
'threadsCtrl'
,
[
'$scope'
,
'$stateParams'
,
'Application'
,
'ApplicationThreads'
,
function
(
$scope
,
$stateParams
,
Application
,
ApplicationThreads
)
{
$scope
.
application
=
Application
.
query
({
id
:
$stateParams
.
id
});
$scope
.
dumpThreads
=
function
()
{
ApplicationThreads
.
getDump
(
$scope
.
application
).
success
(
function
(
dump
)
{
$scope
.
dump
=
dump
;
var
threadStats
=
{
NEW
:
0
,
RUNNABLE
:
0
,
BLOCKED
:
0
,
WAITING
:
0
,
TIMED_WAITING
:
0
,
TERMINATED
:
0
};
for
(
var
i
=
0
;
i
<
dump
.
length
;
i
++
)
{
threadStats
[
dump
[
i
].
threadState
]
++
;
}
threadStats
.
total
=
dump
.
length
;
$scope
.
threadStats
=
threadStats
;
}).
error
(
function
(
error
)
{
$scope
.
error
=
error
;
});
}
}]);
spring-boot-admin-server/src/main/webapp/public/scripts/services/services.js
View file @
a5d60986
...
...
@@ -328,4 +328,9 @@ angular.module('springBootAdmin.services', ['ngResource'])
}
}
}
}])
.
service
(
'ApplicationThreads'
,
[
'$http'
,
function
(
$http
)
{
this
.
getDump
=
function
(
app
)
{
return
$http
.
get
(
app
.
url
+
'/dump'
);
}
}]);
spring-boot-admin-server/src/main/webapp/public/styles/main.css
View file @
a5d60986
...
...
@@ -30,6 +30,10 @@ a:active {
color
:
#5fa134
;
}
pre
{
white-space
:
pre
;
}
/** NVD3 **/
.nvd3
text
,
div
.nvtooltip
{
font-size
:
14px
;
...
...
spring-boot-admin-server/src/main/webapp/public/views/apps.html
View file @
a5d60986
...
...
@@ -3,6 +3,7 @@
<a
class=
"btn "
ng-class=
"{active: $state.includes('apps.details')}"
ui-sref=
"apps.details.metrics({id: applicationId})"
>
Details
</a>
<a
class=
"btn "
ui-sref-active=
"active"
ui-sref=
"apps.logging({id: applicationId})"
>
Logging
</a></label>
<a
class=
"btn "
ui-sref-active=
"active"
ui-sref=
"apps.jmx({id: applicationId})"
>
JMX
</a></label>
<a
class=
"btn "
ui-sref-active=
"active"
ui-sref=
"apps.threads({id: applicationId})"
>
Threads
</a></label>
</div>
</h2>
<div
ui-view
></div>
spring-boot-admin-server/src/main/webapp/public/views/apps/threads.html
0 → 100644
View file @
a5d60986
<div
class=
"alert alert-error"
ng-if=
"error"
>
<b>
Error:
</b>
{{ error }}
</div>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"span12 text-center"
>
<form>
<button
class=
"btn"
ng-click=
"dumpThreads()"
><i
class=
"icon-screenshot"
></i>
Dump all threads!
</button>
</form>
</div>
</div>
<div
class=
"row"
ng-show=
"threadStats"
>
<div
class=
"span12"
>
<div
class=
"progress"
>
<div
ng-if=
"threadStats.NEW > 0"
class=
"bar bar-info"
style=
"width:{{ threadStats.NEW / threadStats.total * 100 | number:0 }}%;"
>
New {{ threadStats.NEW }}
</div>
<div
ng-if=
"threadStats.RUNNABLE > 0"
class=
"bar bar-success"
style=
"width:{{ threadStats.RUNNABLE / threadStats.total * 100 | number:0 }}%;"
>
Runnable {{ threadStats.RUNNABLE }}
</div>
<div
ng-if=
"threadStats.BLOCKED > 0"
class=
"bar bar-danger"
style=
"width:{{ threadStats.BLOCKED / threadStats.total * 100 | number:0 }}%;"
>
Blocked {{ threadStats.BLOCKED }}
</div>
<div
ng-if=
"threadStats.WAITING > 0"
class=
"bar bar-warning"
style=
"width:{{ threadStats.WAITING / threadStats.total * 100 | number:0 }}%;"
>
Waiting {{ threadStats.WAITING }}
</div>
<div
ng-if=
"threadStats.TIMED_WAITING > 0"
class=
"bar bar-warning bar-striped"
style=
"width:{{ threadStats.TIMED_WAITING / threadStats.total * 100 | number:0 }}%;"
>
Timed waiting {{ threadStats.TIMED_WAITING }}
</div>
<div
ng-if=
"threadStats.TERMINATED > 0"
class=
"bar bar-info"
style=
"width:{{ threadStats.TERMINATED / threadStats.total * 100 | number:0 }}%;"
>
Terminated {{ threadStats.TERMINATED }}
</div>
</div>
</div>
</div>
<div
class=
"row"
ng-show=
"dump"
>
<div
class=
"span12"
>
<accordion
close-others=
"true"
>
<accordion-group
ng-repeat=
"thread in dump | orderBy:'threadName' track by thread.threadId"
>
<accordion-heading>
<small
class=
"muted"
>
{{thread.threadId}}
</small>
{{thread.threadName}}
<span
class=
"pull-right label"
ng-class=
"{ 'label-info': thread.threadState == 'NEW', 'label-success': thread.threadState == 'RUNNABLE', 'label-important': thread.threadState == 'BLOCKED', 'label-warning': thread.threadState == 'TIMED_WAITING' || thread.threadState == 'WAITING', 'label-info': thread.threadState == 'TERMINATED'}"
>
{{thread.threadState}}
</span>
<span
class=
"label label-warning"
ng-if=
"thread.suspended"
>
suspended
</span>
</accordion-heading>
<div
class=
"container"
>
<div
class=
"row"
>
<table
class=
"span6"
>
<colgroup>
<col
style=
"min-width: 10em;"
/>
</colgroup>
<tr><td>
Blocked count
</td><td>
{{thread.blockedCount}}
</td></tr>
<tr><td>
Blocked time
</td><td>
{{thread.blockedTime}}
</td></tr>
<tr><td>
Waited count
</td><td>
{{thread.waitedCount}}
</td></tr>
<tr><td>
Waited time
</td><td>
{{thread.waitedTime}}
</td></tr>
</table>
<table
class=
"span6"
>
<colgroup>
<col
style=
"min-width: 10em;"
/>
</colgroup>
<tr><td>
Lock name
</td><td>
{{thread.lockName}}
</td></tr>
<tr><td>
Lock owner id
</td><td>
{{thread.lockOwnerId}}
</td></tr>
<tr><td>
Lock owner name
</td><td>
{{thread.lockOwnerName}}
</td></tr>
</table>
</div>
</div>
<pre
style=
"overflow: auto; max-height: 20em"
ng-if=
"thread.stackTrace"
><span
ng-repeat=
"el in thread.stackTrace"
>
{{el.className}}.{{el.methodName}}({{el.fileName}}:{{el.lineNumber}})
<span
class=
"label"
ng-if=
"el.nativeMethod"
>
native
</span>
</span></pre>
</accordion-group>
</accordion>
</div>
</div>
</div>
\ No newline at end of file
spring-boot-admin-server/src/main/webapp/public/views/overview.html
View file @
a5d60986
...
...
@@ -3,10 +3,6 @@
</h2>
<div
class=
"span12"
>
<table
class=
"table table-striped"
>
<colgroup
style=
"width: 40%;"
/>
<colgroup
style=
"width: 15%;"
/>
<colgroup
style=
"width: 10%;"
/>
<colgroup
style=
"width: 35%;"
/>
<thead>
<tr>
<th>
Application
</th>
...
...
@@ -26,8 +22,9 @@
<a
ui-sref=
"apps.details.metrics({id: application.id})"
class=
"btn btn-success"
>
Details
</a>
<a
ui-sref=
"apps.logging({id: application.id})"
class=
"btn btn-success"
>
Logging
</a>
<a
ui-sref=
"apps.jmx({id: application.id})"
class=
"btn btn-success"
>
JMX
</a>
<a
ui-sref=
"apps.threads({id: application.id})"
class=
"btn btn-success"
>
Threads
</a>
</span>
<span
class=
"pull-right"
ng-show=
"application.status == null || application.status
!= 'UP
'"
>
<span
class=
"pull-right"
ng-show=
"application.status == null || application.status
== 'OFFLINE
'"
>
<a
class=
"btn btn-danger"
ng-click=
"remove(application)"
><i
class=
"icon-remove icon-white"
></i>
Remove
</a>
</span>
</td>
...
...
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