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
05ef6ab9
Commit
05ef6ab9
authored
Jun 17, 2014
by
Thomas Bosch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services
parent
44a42c9a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
11 deletions
+15
-11
app.js
src/main/webapp/public/scripts/app.js
+0
-1
controllers.js
src/main/webapp/public/scripts/controllers/controllers.js
+3
-2
services.js
src/main/webapp/public/scripts/services/services.js
+11
-6
main.html
src/main/webapp/public/views/main.html
+1
-2
No files found.
src/main/webapp/public/scripts/app.js
View file @
05ef6ab9
...
...
@@ -5,7 +5,6 @@ angular.module('registry', [
'ngResource'
,
'ngSanitize'
,
'ngRoute'
,
'ngResource'
,
'registry.services'
])
.
config
(
function
(
$routeProvider
)
{
...
...
src/main/webapp/public/scripts/controllers/controllers.js
View file @
05ef6ab9
'use strict'
;
angular
.
module
(
'registry'
)
.
controller
(
'MainCtrl'
,
function
(
$scope
,
Application
,
ApplicationInfo
,
$location
)
{
.
controller
(
'MainCtrl'
,
function
(
$scope
,
Application
,
ApplicationInfo
,
$location
,
$http
)
{
// Gets the service from /api/services
$scope
.
applications
=
Application
.
query
({},
function
(
applications
)
{
...
...
@@ -9,7 +9,8 @@ angular.module('registry')
// Get details from applications
for
(
var
i
=
0
;
i
<
applications
.
length
;
i
++
)
{
var
app
=
applications
[
i
];
app
.
version
=
ApplicationInfo
.
query
({
url
:
app
.
url
}).
version
;
ApplicationInfo
.
setApp
(
app
);
ApplicationInfo
.
getInfo
();
}
});
...
...
src/main/webapp/public/scripts/services/services.js
View file @
05ef6ab9
...
...
@@ -8,11 +8,15 @@ angular.module('registry.services', ['ngResource'])
query
:
{
method
:
'GET'
,
isArray
:
true
}
});
}])
.
factory
(
'ApplicationInfo'
,
[
'$resource'
,
function
(
$resource
){
return
$resource
(
decodeURIComponent
(
':url'
),
{},
{
query
:
{
method
:
'GET'
}
,
.
service
(
'ApplicationInfo'
,
[
'$http'
,
function
(
$http
){
var
_app
;
this
.
setApp
=
function
(
app
)
{
_app
=
app
;
}
this
.
getInfo
=
function
()
{
return
$http
.
get
(
_app
.
url
+
'/info'
).
success
(
function
(
response
)
{
_app
.
version
=
response
.
version
;
});
}
}]);
\ No newline at end of file
src/main/webapp/public/views/main.html
View file @
05ef6ab9
...
...
@@ -14,8 +14,7 @@
<tbody>
<tr
ng-repeat=
"application in applications"
>
<td>
{{ application.id }}
</td>
<td>
{{ application.url }}
</td>
<td></td>
<td>
{{ application.version }}
</td>
<td></td>
<td></td>
<td>
<!-- <button type="button" ng-click="editService(service.id)" class="btn btn-success">Edit</button> -->
</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