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
f0a00964
Commit
f0a00964
authored
Sep 25, 2014
by
Thomas Bosch
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/codecentric/spring-boot-admin.git
parents
54a4d970
65c74a0e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
5 deletions
+73
-5
controllers.js
...src/main/webapp/public/scripts/controllers/controllers.js
+32
-1
application.css
...dmin-server/src/main/webapp/public/styles/application.css
+4
-3
main.css
...-boot-admin-server/src/main/webapp/public/styles/main.css
+1
-1
metrics.html
...er/src/main/webapp/public/views/apps/details/metrics.html
+36
-0
No files found.
spring-boot-admin-server/src/main/webapp/public/scripts/controllers/controllers.js
View file @
f0a00964
...
@@ -64,6 +64,8 @@ angular.module('springBootAdmin')
...
@@ -64,6 +64,8 @@ angular.module('springBootAdmin')
.
controller
(
'detailsMetricsCtrl'
,
function
(
$scope
,
$stateParams
,
Application
,
ApplicationDetails
)
{
.
controller
(
'detailsMetricsCtrl'
,
function
(
$scope
,
$stateParams
,
Application
,
ApplicationDetails
)
{
$scope
.
memoryData
=
[];
$scope
.
memoryData
=
[];
$scope
.
heapMemoryData
=
[];
$scope
.
heapMemoryData
=
[];
$scope
.
counterData
=
[];
$scope
.
gaugeData
=
[];
$scope
.
application
=
Application
.
query
({
id
:
$stateParams
.
id
},
function
(
application
)
{
$scope
.
application
=
Application
.
query
({
id
:
$stateParams
.
id
},
function
(
application
)
{
ApplicationDetails
.
getMetrics
(
application
,
function
(
application
)
{
ApplicationDetails
.
getMetrics
(
application
,
function
(
application
)
{
...
@@ -77,6 +79,22 @@ angular.module('springBootAdmin')
...
@@ -77,6 +79,22 @@ angular.module('springBootAdmin')
$scope
.
heapMemoryData
=
[{
label
:
'Free Heap'
,
value
:
application
.
metrics
[
"heap.free"
]
},
$scope
.
heapMemoryData
=
[{
label
:
'Free Heap'
,
value
:
application
.
metrics
[
"heap.free"
]
},
{
label
:
'Used Heap'
,
value
:
application
.
metrics
[
"heap.used"
]
}];
{
label
:
'Used Heap'
,
value
:
application
.
metrics
[
"heap.used"
]
}];
//*** Extract data for Counter-Chart and Gauge-Chart
$scope
.
counterData
=
[
{
key
:
"value"
,
values
:
[]
}
];
$scope
.
gaugeData
=
[
{
key
:
"value"
,
values
:
[]
}
];
for
(
var
metric
in
application
.
metrics
)
{
var
matchCounter
=
/counter
\.(
.+
)
/
.
exec
(
metric
);
if
(
matchCounter
!==
null
)
{
$scope
.
counterData
[
0
].
values
.
push
({
label
:
matchCounter
[
1
],
value
:
application
.
metrics
[
metric
]
});
}
var
matchGauge
=
/gauge
\.(
.+
)
/
.
exec
(
metric
);
if
(
matchGauge
!==
null
)
{
$scope
.
gaugeData
[
0
].
values
.
push
({
label
:
matchGauge
[
1
],
value
:
application
.
metrics
[
metric
]
});
}
}
});
});
});
});
...
@@ -93,13 +111,26 @@ angular.module('springBootAdmin')
...
@@ -93,13 +111,26 @@ angular.module('springBootAdmin')
};
};
}
}
var
colorArray
=
[
'#6db33f'
,
'#a5b2b9'
,
'#
ebf1e7'
,
'#
34302d'
];
var
colorArray
=
[
'#6db33f'
,
'#a5b2b9'
,
'#34302d'
];
$scope
.
colorFunction
=
function
()
{
$scope
.
colorFunction
=
function
()
{
return
function
(
d
,
i
)
{
return
function
(
d
,
i
)
{
return
colorArray
[
i
%
colorArray
.
length
];
return
colorArray
[
i
%
colorArray
.
length
];
};
};
}
}
$scope
.
intFormatFunction
=
function
(){
return
function
(
d
)
{
return
d3
.
format
(
'd'
)(
d
);
};
}
$scope
.
toolTipContentFunction
=
function
(){
return
function
(
key
,
x
,
y
,
e
,
graph
)
{
console
.
log
(
key
,
x
,
y
,
e
,
graph
);
return
x
+
': '
+
y
;
}
}
})
})
.
controller
(
'detailsEnvCtrl'
,
function
(
$scope
,
$stateParams
,
Application
,
ApplicationDetails
)
{
.
controller
(
'detailsEnvCtrl'
,
function
(
$scope
,
$stateParams
,
Application
,
ApplicationDetails
)
{
$scope
.
application
=
Application
.
query
({
id
:
$stateParams
.
id
},
function
(
application
)
{
$scope
.
application
=
Application
.
query
({
id
:
$stateParams
.
id
},
function
(
application
)
{
...
...
spring-boot-admin-server/src/main/webapp/public/styles/application.css
View file @
f0a00964
...
@@ -14,6 +14,10 @@ ul.download-links {
...
@@ -14,6 +14,10 @@ ul.download-links {
margin-right
:
auto
;
margin-right
:
auto
;
}
}
.nvd3
text
,
div
.nvtooltip
{
font-size
:
14px
;
}
ul
.chart-legend
{
ul
.chart-legend
{
list-style
:
none
;
list-style
:
none
;
}
}
...
@@ -31,9 +35,6 @@ li.chart-2:before {
...
@@ -31,9 +35,6 @@ li.chart-2:before {
color
:
#a5b2b9
;
color
:
#a5b2b9
;
}
}
li
.chart-3
:before
{
li
.chart-3
:before
{
color
:
#ebf1e7
;
}
li
.chart-4
:before
{
color
:
#34302d
;
color
:
#34302d
;
}
}
li
.no-bullet
:before
{
li
.no-bullet
:before
{
...
...
spring-boot-admin-server/src/main/webapp/public/styles/main.css
View file @
f0a00964
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
}
}
.table
tr
.highlight
>
td
{
.table
tr
.highlight
>
td
{
background-color
:
#
6db33f
!important
;
background-color
:
#
a5b2b9
!important
;
font-weight
:
bold
;
font-weight
:
bold
;
}
}
...
...
spring-boot-admin-server/src/main/webapp/public/views/apps/details/metrics.html
View file @
f0a00964
...
@@ -44,6 +44,42 @@
...
@@ -44,6 +44,42 @@
</table>
</table>
<table
class=
"table table-striped"
>
<table
class=
"table table-striped"
>
<thead>
<tr>
<th>
Metrics
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<h1
style=
"text-align: center;"
>
Counter
</h1>
<div
class=
"center-block"
style=
"width: 800px; height: 300px; position:relative;"
>
<nvd3-discrete-bar-chart
id=
"counterChart"
nodata=
"not available"
data=
"counterData"
x=
"xFunction()"
y=
"yFunction()"
color=
"colorFunction()"
tooltips=
"true"
tooltipContent=
"toolTipContentFunction()"
showYAxis=
"true"
yAxisTickFormat=
"intFormatFunction()"
>
</nvd3-discrete-bar-chart>
</div>
</td>
</tr>
<tr>
<td>
<h1
style=
"text-align: center;"
>
Gauge
</h1>
<div
class=
"center-block"
style=
"width: 800px; height: 300px; position:relative;"
>
<nvd3-discrete-bar-chart
id=
"gaugesChart"
nodata=
"not available"
data=
"gaugeData"
x=
"xFunction()"
y=
"yFunction()"
color=
"colorFunction()"
tooltips=
"true"
tooltipContent=
"toolTipContentFunction()"
showYAxis=
"true"
yAxisTickFormat=
"intFormatFunction()"
>
</nvd3-discrete-bar-chart>
</div>
</td>
</tr>
</tbody>
</table>
<table
class=
"table table-striped"
>
<col
style=
"width:30%"
>
<col
style=
"width:30%"
>
<col
style=
"width:auto"
>
<col
style=
"width:auto"
>
<thead>
<thead>
...
...
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