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
e054e8f3
Commit
e054e8f3
authored
Feb 09, 2015
by
Johannes Stelzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added view for traces-endpoint
closes #35
parent
d8395c20
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
185 additions
and
1 deletion
+185
-1
main.css
spring-boot-admin-server-ui/app/css/main.css
+74
-0
app.js
spring-boot-admin-server-ui/app/js/app.js
+5
-0
index.js
spring-boot-admin-server-ui/app/js/controller/index.js
+1
-0
traceCtrl.js
spring-boot-admin-server-ui/app/js/controller/traceCtrl.js
+54
-0
applicationTrace.js
...g-boot-admin-server-ui/app/js/service/applicationTrace.js
+22
-0
index.js
spring-boot-admin-server-ui/app/js/service/index.js
+1
-0
apps.html
spring-boot-admin-server-ui/app/views/apps.html
+2
-1
trace.html
spring-boot-admin-server-ui/app/views/apps/trace.html
+26
-0
No files found.
spring-boot-admin-server-ui/app/css/main.css
View file @
e054e8f3
...
...
@@ -267,3 +267,77 @@ span.refresh {
background-image
:
linear-gradient
(
to
bottom
,
#ee5f5b
,
#c43c35
);
background-repeat
:
repeat-x
;
}
/** Timeline **/
.timeline
{
position
:
relative
;
padding
:
1em
0
;
list-style-type
:
none
;
padding-left
:
120px
;
}
.timeline
:before
{
position
:
absolute
;
top
:
0
;
content
:
' '
;
display
:
block
;
width
:
6px
;
height
:
100%
;
margin-left
:
0px
;
background
:
rgb
(
80
,
80
,
80
);
background
:
-moz-linear-gradient
(
top
,
rgba
(
80
,
80
,
80
,
0
)
0%
,
rgb
(
80
,
80
,
80
)
8%
,
rgb
(
80
,
80
,
80
)
92%
,
rgba
(
80
,
80
,
80
,
0
)
100%
);
background
:
-webkit-linear-gradient
(
top
,
rgba
(
80
,
80
,
80
,
0
)
0%
,
rgb
(
80
,
80
,
80
)
8%
,
rgb
(
80
,
80
,
80
)
92%
,
rgba
(
80
,
80
,
80
,
0
)
100%
);
background
:
-o-linear-gradient
(
top
,
rgba
(
80
,
80
,
80
,
0
)
0%
,
rgb
(
80
,
80
,
80
)
8%
,
rgb
(
80
,
80
,
80
)
92%
,
rgba
(
80
,
80
,
80
,
0
)
100%
);
background
:
-ms-linear-gradient
(
top
,
rgba
(
80
,
80
,
80
,
0
)
0%
,
rgb
(
80
,
80
,
80
)
8%
,
rgb
(
80
,
80
,
80
)
92%
,
rgba
(
80
,
80
,
80
,
0
)
100%
);
background
:
linear-gradient
(
to
bottom
,
rgba
(
80
,
80
,
80
,
0
)
0%
,
rgb
(
80
,
80
,
80
)
8%
,
rgb
(
80
,
80
,
80
)
92%
,
rgba
(
80
,
80
,
80
,
0
)
100%
);
z-index
:
5
;
}
.timeline
li
{
padding
:
1em
0
;
}
.timeline
li
:after
{
content
:
""
;
display
:
block
;
height
:
0
;
clear
:
both
;
visibility
:
hidden
;
}
.timeline
.event
{
position
:
relative
;
width
:
100%
;
display
:
inline-block
;
left
:
15px
;
padding-left
:
5px
;
cursor
:
pointer
;
}
.timeline
.event
.time
{
position
:
absolute
;
left
:
-120px
;
margin-left
:
-25px
;
display
:
inline-block
;
vertical-align
:
middle
;
text-align
:
right
;
width
:
120px
;
}
.timeline
.event
:before
{
content
:
' '
;
display
:
block
;
width
:
12px
;
height
:
12px
;
background
:
#fff
;
border-radius
:
10px
;
border
:
4px
solid
#6db33f
;
z-index
:
10
;
position
:
absolute
;
left
:
-6px
;
margin-left
:
-15px
;
}
.timeline
.event
:hover:before
{
background
:
#ccc
;
}
spring-boot-admin-server-ui/app/js/app.js
View file @
e054e8f3
...
...
@@ -107,6 +107,11 @@ springBootAdmin.config(function ($stateProvider, $urlRouterProvider) {
url
:
'/threads'
,
templateUrl
:
'views/apps/threads.html'
,
controller
:
'threadsCtrl'
})
.
state
(
'apps.trace'
,
{
url
:
'/trace'
,
templateUrl
:
'views/apps/trace.html'
,
controller
:
'traceCtrl'
});
});
springBootAdmin
.
run
(
function
(
$rootScope
,
$state
)
{
...
...
spring-boot-admin-server-ui/app/js/controller/index.js
View file @
e054e8f3
...
...
@@ -13,3 +13,4 @@ springBootAdmin.controller('detailsClasspathCtrl', require('./detailsClasspathCt
springBootAdmin
.
controller
(
'loggingCtrl'
,
require
(
'./loggingCtrl'
));
springBootAdmin
.
controller
(
'jmxCtrl'
,
require
(
'./jmxCtrl'
));
springBootAdmin
.
controller
(
'threadsCtrl'
,
require
(
'./threadsCtrl'
));
springBootAdmin
.
controller
(
'traceCtrl'
,
require
(
'./traceCtrl'
));
spring-boot-admin-server-ui/app/js/controller/traceCtrl.js
0 → 100644
View file @
e054e8f3
/*
* Copyright 2014 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.
*/
'use strict'
;
module
.
exports
=
function
(
$scope
,
application
,
ApplicationTrace
,
$interval
)
{
$scope
.
lastTraceTime
=
0
;
$scope
.
traces
=
[];
$scope
.
refresher
=
null
;
$scope
.
refreshInterval
=
5
;
$scope
.
refresh
=
function
()
{
ApplicationTrace
.
getTraces
(
application
)
.
success
(
function
(
traces
)
{
for
(
var
i
=
0
;
i
<
traces
.
length
;
i
++
)
{
if
(
traces
[
i
].
timestamp
>
$scope
.
lastTraceTime
)
{
$scope
.
traces
.
push
(
traces
[
i
]);
}
}
if
(
traces
.
length
>
0
)
{
$scope
.
lastTraceTime
=
traces
[
traces
.
length
-
1
].
timestamp
;
}
})
.
error
(
function
(
error
)
{
$scope
.
error
=
error
;
});
};
$scope
.
toggleAutoRefresh
=
function
()
{
if
(
$scope
.
refresher
===
null
)
{
$scope
.
refresher
=
$interval
(
function
()
{
$scope
.
refresh
();
},
$scope
.
refreshInterval
*
1000
);
}
else
{
$interval
.
cancel
(
$scope
.
refresher
);
$scope
.
refresher
=
null
;
}
};
$scope
.
refresh
();
};
spring-boot-admin-server-ui/app/js/service/applicationTrace.js
0 → 100644
View file @
e054e8f3
/*
* Copyright 2014 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.
*/
'use strict'
;
module
.
exports
=
function
(
$http
)
{
this
.
getTraces
=
function
(
app
)
{
return
$http
.
get
(
app
.
url
+
'/trace'
);
};
};
spring-boot-admin-server-ui/app/js/service/index.js
View file @
e054e8f3
...
...
@@ -14,3 +14,4 @@ springBootAdmin.service('Abbreviator', require('./abbreviator'));
springBootAdmin
.
service
(
'jolokia'
,
require
(
'./jolokia'
));
springBootAdmin
.
service
(
'MetricsHelper'
,
require
(
'./metricsHelper'
));
springBootAdmin
.
service
(
'ApplicationThreads'
,
require
(
'./applicationThreads'
));
springBootAdmin
.
service
(
'ApplicationTrace'
,
require
(
'./applicationTrace'
));
spring-boot-admin-server-ui/app/views/apps.html
View file @
e054e8f3
...
...
@@ -11,7 +11,8 @@
<a
class=
"btn"
ng-class=
"{active: $state.includes('apps.details')}"
ui-sref=
"apps.details.metrics({id: application.id})"
>
Details
</a>
<a
class=
"btn"
ui-sref-active=
"active"
ui-sref=
"apps.logging({id: application.id})"
>
Logging
</a></label>
<a
class=
"btn"
ui-sref-active=
"active"
ui-sref=
"apps.jmx({id: application.id})"
>
JMX
</a></label>
<a
class=
"btn"
ui-sref-active=
"active"
ui-sref=
"apps.threads({id: application.id})"
>
Threads
</a></label>
<a
class=
"btn"
ui-sref-active=
"active"
ui-sref=
"apps.threads({id: application.id})"
>
Threads
</a></label>
<a
class=
"btn"
ui-sref-active=
"active"
ui-sref=
"apps.trace({id: application.id})"
>
Trace
</a></label>
</div>
</div>
</div>
...
...
spring-boot-admin-server-ui/app/views/apps/trace.html
0 → 100644
View file @
e054e8f3
<div
class=
"alert alert-error"
ng-if=
"error"
>
<b>
Error:
</b>
{{ error }}
</div>
<div
class=
"container"
>
<div
class=
"form-inline"
>
<button
title=
"refresh"
class=
"btn"
ng-click=
"refresh()"
><i
class=
"icon-refresh"
></i></button>
<div
class=
"input-prepend input-append"
>
<button
title=
"auto refresh"
class=
"btn"
ng-click=
"toggleAutoRefresh()"
ng-class=
"{'active':refresher != null}"
><i
ng-class=
"{'icon-play':refresher == null, 'icon-pause':refresher != null}"
></i></button>
<input
class=
"input-mini"
type=
"number"
min=
"1"
ng-model=
"refreshInterval"
ng-disabled=
"refresher != null"
></input>
<span
class=
"add-on"
>
sec
</span>
</div>
</div>
<ul
class=
"timeline"
>
<li
ng-repeat=
"trace in traces | orderBy:'timestamp':true"
>
<div
class=
"event"
ng-click=
"trace.show = !trace.show"
>
<div
class=
"time"
>
{{trace.timestamp | date:'HH:mm:ss.sss'}}
<small
class=
"muted"
>
{{trace.timestamp | date:'dd.MM.yyyy'}}
</small><br/>
</div>
<div
class=
"title"
><span
class=
"muted"
>
{{trace.info.method}}
</span>
{{trace.info.path}}
</div>
<pre
class=
"content"
ng-show=
"trace.show"
>
{{trace.info | json}}
</pre>
</div>
</li>
</ul>
</div>
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