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
1d73bddd
Commit
1d73bddd
authored
Jun 23, 2014
by
Thomas Bosch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apps
parent
7e845d77
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
63 additions
and
31 deletions
+63
-31
RegistryController.java
...codecentric/boot/admin/controller/RegistryController.java
+3
-2
index.html
src/main/webapp/public/index.html
+3
-0
app.js
src/main/webapp/public/scripts/app.js
+7
-4
controllers.js
src/main/webapp/public/scripts/controllers/controllers.js
+13
-3
services.js
src/main/webapp/public/scripts/services/services.js
+1
-1
main.css
src/main/webapp/public/styles/main.css
+20
-0
details.html
src/main/webapp/public/views/apps/details.html
+2
-2
infos.html
src/main/webapp/public/views/apps/details/infos.html
+1
-9
metrics.html
src/main/webapp/public/views/apps/details/metrics.html
+2
-9
overview.html
src/main/webapp/public/views/apps/overview.html
+1
-1
logback-test.xml
src/test/resources/logback-test.xml
+10
-0
No files found.
src/main/java/de/codecentric/boot/admin/controller/RegistryController.java
View file @
1d73bddd
...
...
@@ -6,6 +6,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
...
...
@@ -32,9 +33,9 @@ public class RegistryController {
registry
.
register
(
app
);
}
@RequestMapping
(
value
=
"/api/application"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/api/application
/{id}
"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
Application
get
(
@
RequestBody
String
id
)
{
public
Application
get
(
@
PathVariable
String
id
)
{
LOGGER
.
debug
(
"Deliver registered application with ID '{}'"
,
id
);
return
registry
.
getApplication
(
id
);
}
...
...
src/main/webapp/public/index.html
View file @
1d73bddd
...
...
@@ -25,6 +25,9 @@
<div
class=
"spring-logo--container"
>
<a
class=
"spring-logo"
href=
"/"
><span></span></a>
</div>
<div
class=
"spring-logo--container"
>
<a
class=
"spring-boot-logo"
href=
"/"
><span></span></a>
</div>
<ul
class=
"nav pull-right"
ng-controller=
'navCtrl'
>
<li
class=
"navbar-link"
ng-class=
"{active: $state.includes('apps')}"
><a
ui-sref=
"apps.overview"
>
Applications
</a></li>
<li
class=
"navbar-link"
ng-class=
"{active: $state.includes('about')}"
><a
ui-sref=
"about"
>
About
</a></li>
...
...
src/main/webapp/public/scripts/app.js
View file @
1d73bddd
...
...
@@ -13,7 +13,8 @@ angular.module('springBootAdmin', [
$stateProvider
.
state
(
'apps'
,
{
url
:
'/apps'
,
templateUrl
:
'views/apps.html'
,
abstract
:
true
,
template
:
'<ui-view/>'
,
})
.
state
(
'about'
,
{
url
:
'/about'
,
...
...
@@ -26,16 +27,18 @@ angular.module('springBootAdmin', [
})
.
state
(
'apps.details'
,
{
url
:
'/details'
,
abstract
:
true
,
templateUrl
:
'views/apps/details.html'
})
.
state
(
'apps.details.infos'
,
{
url
:
'/infos/
{id}
'
,
url
:
'/infos/
:id
'
,
templateUrl
:
'views/apps/details/infos.html'
,
controller
:
'infosCtrl'
})
.
state
(
'apps.details.metrics'
,
{
url
:
'/metrics/{id}'
,
templateUrl
:
'views/apps/details/metrics.html'
url
:
'/metrics/:id'
,
templateUrl
:
'views/apps/details/metrics.html'
,
controller
:
'metricsCtrl'
});
})
.
run
(
function
(
$rootScope
,
$state
,
$stateParams
,
$log
)
{
...
...
src/main/webapp/public/scripts/controllers/controllers.js
View file @
1d73bddd
'use strict'
;
angular
.
module
(
'springBootAdmin'
)
.
controller
(
'overviewCtrl'
,
function
(
$scope
,
Applications
,
ApplicationInfo
,
$location
,
$http
)
{
.
controller
(
'overviewCtrl'
,
function
(
$scope
,
Applications
,
ApplicationInfo
,
$location
)
{
$scope
.
applications
=
Applications
.
query
({},
function
(
applications
)
{
for
(
var
i
=
0
;
i
<
applications
.
length
;
i
++
)
{
var
app
=
applications
[
i
];
...
...
@@ -9,6 +9,10 @@ angular.module('springBootAdmin')
ApplicationInfo
.
getHealth
(
app
);
}
});
// callback for ng-click 'showDetails':
$scope
.
showDetails
=
function
(
id
)
{
$location
.
path
(
'/apps/details/infos/'
+
id
);
};
})
.
controller
(
'navCtrl'
,
function
(
$scope
,
$location
)
{
$scope
.
navClass
=
function
(
page
)
{
...
...
@@ -16,8 +20,13 @@ angular.module('springBootAdmin')
return
page
==
currentRoute
?
'active'
:
''
;
};
})
.
controller
(
'infosCtrl'
,
function
(
$scope
,
Application
,
ApplicationInfo
)
{
$scope
.
application
=
Application
.
query
({},
function
(
application
)
{
.
controller
(
'infosCtrl'
,
function
(
$scope
,
$stateParams
,
Application
,
ApplicationInfo
)
{
$scope
.
application
=
Application
.
query
({
id
:
$stateParams
.
id
},
function
(
application
)
{
ApplicationInfo
.
getInfo
(
application
);
});
})
.
controller
(
'metricsCtrl'
,
function
(
$scope
,
$stateParams
,
Application
,
ApplicationInfo
)
{
$scope
.
application
=
Application
.
query
({
id
:
$stateParams
.
id
},
function
(
application
)
{
ApplicationInfo
.
getInfo
(
application
);
});
});
\ No newline at end of file
src/main/webapp/public/scripts/services/services.js
View file @
1d73bddd
...
...
@@ -12,7 +12,7 @@ angular.module('springBootAdmin.services', ['ngResource'])
.
factory
(
'Application'
,
[
'$resource'
,
function
(
$resource
){
return
$resource
(
'/api/application'
,
{},
{
'/api/application
/:id
'
,
{},
{
query
:
{
method
:
'GET'
}
});
}
...
...
src/main/webapp/public/styles/main.css
View file @
1d73bddd
...
...
@@ -28,4 +28,23 @@
background-color
:
#34302D
;
border-color
:
#34302D
;
color
:
#f1f1f1
;
}
a
.spring-boot-logo
{
background
:
url("../img/platform-spring-boot.png")
-1px
-1px
no-repeat
;
}
a
.spring-boot-logo
span
{
display
:
block
;
width
:
160px
;
height
:
46px
;
background
:
url("../img/platform-spring-boot.png")
-1px
-48px
no-repeat
;
opacity
:
0
;
-moz-transition
:
opacity
0.12s
ease-in-out
;
-webkit-transition
:
opacity
0.12s
ease-in-out
;
-o-transition
:
opacity
0.12s
ease-in-out
;
}
a
:hover
.spring-boot-logo
span
{
opacity
:
1
;
}
\ No newline at end of file
src/main/webapp/public/views/apps/details.html
View file @
1d73bddd
...
...
@@ -8,8 +8,8 @@
<div
class=
"main-template"
>
<div
id=
"xd-jobs"
class=
"tab-pane active col-md-12"
>
<ul
class=
"nav nav-tabs"
>
<li
ng-class=
"{ active: $state.includes('apps.details.infos') }"
><a
ui-sref=
"apps.details.infos
"
>
Infos
</a></li>
<li
ng-class=
"{ active: $state.includes('apps.details.metrics') }"
><a
ui-sref=
"apps.details.metrics
"
>
Metrics
</a></li>
<li
ui-sref-active=
"active"
><a
ui-sref=
"apps.details.infos({id: application.id})
"
>
Infos
</a></li>
<li
ui-sref-active=
"active"
><a
ui-sref=
"apps.details.metrics({id: application.id})
"
>
Metrics
</a></li>
</ul>
<div
class=
"tab-content"
>
<div
ui-view
></div>
...
...
src/main/webapp/public/views/apps/details/infos.html
View file @
1d73bddd
...
...
@@ -10,15 +10,7 @@
</tr>
</thead>
<tbody>
<tr
ng-repeat=
"application in applications"
>
<td>
{{ application.id }}
</td>
<td>
{{ application.version }}
</td>
<td>
{{ application.status }}
</td>
<td></td>
<td>
<!-- <button type="button" ng-click="editService(service.id)" class="btn btn-success">Edit</button> -->
</td>
</tr>
</tbody>
</table>
Info-Endpoint
src/main/webapp/public/views/apps/details/metrics.html
View file @
1d73bddd
...
...
@@ -10,15 +10,7 @@
</tr>
</thead>
<tbody>
<tr
ng-repeat=
"application in applications"
>
<td>
{{ application.id }}
</td>
<td>
{{ application.version }}
</td>
<td>
{{ application.status }}
</td>
<td></td>
<td>
<!-- <button type="button" ng-click="editService(service.id)" class="btn btn-success">Edit</button> -->
</td>
</tr>
</tbody>
</table>
Metrics-Endpoint
\ No newline at end of file
src/main/webapp/public/views/apps/overview.html
View file @
1d73bddd
...
...
@@ -26,7 +26,7 @@
<td></td>
<td></td>
<td>
<
!-- <button type="button" ng-click="editService(service.id)" class="btn btn-success">Edit</button> --
>
<
button
type=
"button"
ng-click=
"showDetails(application.id)"
class=
"btn btn-success"
>
Details
</button
>
</td>
</tr>
</tbody>
...
...
src/test/resources/logback-test.xml
0 → 100644
View file @
1d73bddd
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include
resource=
"org/springframework/boot/logging/logback/base.xml"
/>
<logger
name=
"de.codecentric"
level=
"DEBUG"
/>
<logger
name=
"org.springframework.data"
level=
"INFO"
/>
</configuration>
\ No newline at end of file
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