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
22988fd0
Commit
22988fd0
authored
Sep 11, 2015
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the ui work with hateoas-style endpoints
But make no use of it. fixes #96
parent
cbf5b2e8
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
55 additions
and
38 deletions
+55
-38
activitiCtrl.js
...ot-admin-server-ui/app/js/controller/apps/activitiCtrl.js
+2
-2
classpathCtrl.js
...server-ui/app/js/controller/apps/details/classpathCtrl.js
+2
-2
metricsCtrl.js
...n-server-ui/app/js/controller/apps/details/metricsCtrl.js
+2
-2
detailsCtrl.js
...oot-admin-server-ui/app/js/controller/apps/detailsCtrl.js
+6
-6
environmentCtrl.js
...admin-server-ui/app/js/controller/apps/environmentCtrl.js
+9
-9
threadsCtrl.js
...oot-admin-server-ui/app/js/controller/apps/threadsCtrl.js
+2
-2
traceCtrl.js
...-boot-admin-server-ui/app/js/controller/apps/traceCtrl.js
+2
-2
overviewCtrl.js
...ng-boot-admin-server-ui/app/js/controller/overviewCtrl.js
+2
-2
application.js
spring-boot-admin-server-ui/app/js/service/application.js
+28
-11
No files found.
spring-boot-admin-server-ui/app/js/controller/apps/activitiCtrl.js
View file @
22988fd0
...
...
@@ -18,7 +18,7 @@
module
.
exports
=
function
(
$scope
,
application
)
{
$scope
.
application
=
application
;
application
.
getActiviti
()
.
success
(
function
(
activiti
){
.
then
(
function
(
activiti
){
$scope
.
summary
=
[];
$scope
.
summary
.
push
({
key
:
'Completed Task Count Today'
,
...
...
@@ -56,7 +56,7 @@ module.exports = function ($scope, application) {
});
}
})
.
error
(
function
(
error
)
{
.
catch
(
function
(
error
)
{
$scope
.
error
=
error
;
});
};
spring-boot-admin-server-ui/app/js/controller/apps/details/classpathCtrl.js
View file @
22988fd0
...
...
@@ -18,11 +18,11 @@
module
.
exports
=
function
(
$scope
,
application
)
{
$scope
.
application
=
application
;
application
.
getEnv
()
.
success
(
function
(
env
)
{
.
then
(
function
(
env
)
{
var
separator
=
env
.
systemProperties
[
'path.separator'
];
$scope
.
classpath
=
env
.
systemProperties
[
'java.class.path'
].
split
(
separator
);
})
.
error
(
function
(
error
)
{
.
catch
(
function
(
error
)
{
$scope
.
error
=
error
;
});
};
spring-boot-admin-server-ui/app/js/controller/apps/details/metricsCtrl.js
View file @
22988fd0
...
...
@@ -23,7 +23,7 @@ module.exports = function ($scope, application, Abbreviator, MetricsHelper) {
$scope
.
showRichGauges
=
false
;
application
.
getMetrics
()
.
success
(
function
(
metrics
)
{
.
then
(
function
(
metrics
)
{
function
merge
(
array
,
obj
)
{
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
)
{
if
(
array
[
i
].
name
===
obj
.
name
)
{
...
...
@@ -77,7 +77,7 @@ module.exports = function ($scope, application, Abbreviator, MetricsHelper) {
]);
})
.
error
(
function
(
error
)
{
.
catch
(
function
(
error
)
{
$scope
.
error
=
error
;
});
};
spring-boot-admin-server-ui/app/js/controller/apps/detailsCtrl.js
View file @
22988fd0
...
...
@@ -24,18 +24,18 @@ module.exports = function ($scope, $interval, application, MetricsHelper) {
},
1000
);
application
.
getInfo
()
.
success
(
function
(
info
)
{
.
then
(
function
(
info
)
{
$scope
.
info
=
info
;
})
.
error
(
function
(
error
)
{
.
catch
(
function
(
error
)
{
$scope
.
error
=
error
;
});
application
.
getHealth
()
.
success
(
function
(
health
)
{
.
then
(
function
(
health
)
{
$scope
.
health
=
health
;
})
.
error
(
function
(
health
)
{
.
catch
(
function
(
health
)
{
$scope
.
health
=
health
;
});
...
...
@@ -48,7 +48,7 @@ module.exports = function ($scope, $interval, application, MetricsHelper) {
};
application
.
getMetrics
()
.
success
(
function
(
metrics
)
{
.
then
(
function
(
metrics
)
{
$scope
.
metrics
=
metrics
;
$scope
.
metrics
[
'mem.used'
]
=
$scope
.
metrics
.
mem
-
$scope
.
metrics
[
'mem.free'
];
...
...
@@ -105,7 +105,7 @@ module.exports = function ($scope, $interval, application, MetricsHelper) {
}
]);
})
.
error
(
function
(
error
)
{
.
catch
(
function
(
error
)
{
$scope
.
error
=
error
;
});
};
spring-boot-admin-server-ui/app/js/controller/apps/environmentCtrl.js
View file @
22988fd0
...
...
@@ -48,12 +48,12 @@ module.exports = function ($scope, application) {
$scope
.
allKeys
=
[];
application
.
getEnv
()
.
success
(
function
(
env
)
{
.
then
(
function
(
env
)
{
$scope
.
env
=
env
;
$scope
.
envArray
=
toArray
(
env
);
$scope
.
allKeys
=
collectKeys
(
$scope
.
envArray
);
})
.
error
(
function
(
error
)
{
.
catch
(
function
(
error
)
{
$scope
.
error
=
error
;
});
};
...
...
@@ -62,7 +62,7 @@ module.exports = function ($scope, application) {
var
getValue
=
function
(
item
)
{
if
(
item
.
key
&&
$scope
.
allKeys
.
indexOf
(
item
.
key
)
>=
0
)
{
application
.
getEnv
(
item
.
key
).
success
(
function
(
value
)
{
application
.
getEnv
(
item
.
key
).
then
(
function
(
value
)
{
item
.
value
=
value
;
});
}
...
...
@@ -85,11 +85,11 @@ module.exports = function ($scope, application) {
}
$scope
.
overrides
.
error
=
null
;
application
.
setEnv
(
map
).
success
(
function
()
{
application
.
setEnv
(
map
).
then
(
function
()
{
$scope
.
overrides
=
{
values
:
[{
key
:
''
,
value
:
''
}],
error
:
null
,
changes
:
null
};
$scope
.
reload
();
})
.
error
(
function
(
error
)
{
.
catch
(
function
(
error
)
{
$scope
.
overrides
.
error
=
error
;
$scope
.
overrides
.
changes
=
null
;
$scope
.
reload
();
...
...
@@ -99,10 +99,10 @@ module.exports = function ($scope, application) {
$scope
.
reset
=
function
()
{
$scope
.
overrides
.
error
=
null
;
$scope
.
overrides
.
changes
=
null
;
application
.
resetEnv
().
success
(
function
()
{
application
.
resetEnv
().
then
(
function
()
{
$scope
.
reload
();
})
.
error
(
function
(
error
)
{
.
catch
(
function
(
error
)
{
$scope
.
overrides
.
error
=
error
;
$scope
.
reload
();
});
...
...
@@ -112,11 +112,11 @@ module.exports = function ($scope, application) {
$scope
.
refresh
=
function
()
{
$scope
.
overrides
.
error
=
null
;
$scope
.
overrides
.
changes
=
null
;
application
.
refresh
().
success
(
function
(
changes
)
{
application
.
refresh
().
then
(
function
(
changes
)
{
$scope
.
overrides
.
changes
=
changes
;
$scope
.
reload
();
})
.
error
(
function
(
error
)
{
.
catch
(
function
(
error
)
{
$scope
.
overrides
.
error
=
error
;
$scope
.
reload
();
});
...
...
spring-boot-admin-server-ui/app/js/controller/apps/threadsCtrl.js
View file @
22988fd0
...
...
@@ -18,7 +18,7 @@
module
.
exports
=
function
(
$scope
,
application
)
{
$scope
.
dumpThreads
=
function
()
{
application
.
getThreadDump
()
.
success
(
function
(
dump
)
{
.
then
(
function
(
dump
)
{
$scope
.
dump
=
dump
;
var
threadStats
=
{
...
...
@@ -35,7 +35,7 @@ module.exports = function ($scope, application) {
threadStats
.
total
=
dump
.
length
;
$scope
.
threadStats
=
threadStats
;
})
.
error
(
function
(
error
)
{
.
catch
(
function
(
error
)
{
$scope
.
error
=
error
;
});
};
...
...
spring-boot-admin-server-ui/app/js/controller/apps/traceCtrl.js
View file @
22988fd0
...
...
@@ -23,7 +23,7 @@ module.exports = function ($scope, application, $interval) {
$scope
.
refresh
=
function
()
{
application
.
getTraces
()
.
success
(
function
(
traces
)
{
.
then
(
function
(
traces
)
{
for
(
var
i
=
0
;
i
<
traces
.
length
;
i
++
)
{
if
(
traces
[
i
].
timestamp
>
$scope
.
lastTraceTime
)
{
$scope
.
traces
.
push
(
traces
[
i
]);
...
...
@@ -34,7 +34,7 @@ module.exports = function ($scope, application, $interval) {
}
})
.
error
(
function
(
error
)
{
.
catch
(
function
(
error
)
{
$scope
.
error
=
error
;
});
};
...
...
spring-boot-admin-server-ui/app/js/controller/overviewCtrl.js
View file @
22988fd0
...
...
@@ -15,7 +15,7 @@
*/
'use strict'
;
module
.
exports
=
function
(
$scope
,
$location
,
$interval
,
$
q
,
$
state
,
$filter
,
Application
,
Notification
)
{
module
.
exports
=
function
(
$scope
,
$location
,
$interval
,
$state
,
$filter
,
Application
,
Notification
)
{
var
createNote
=
function
(
app
)
{
var
title
=
app
.
name
+
(
app
.
statusInfo
.
status
===
'UP'
?
' is back '
:
' went '
)
+
app
.
statusInfo
.
status
;
var
options
=
{
tag
:
app
.
id
,
...
...
@@ -45,7 +45,7 @@ module.exports = function ($scope, $location, $interval, $q, $state, $filter, Ap
break
;
}
}
app
.
getInfo
().
success
(
function
(
info
)
{
app
.
getInfo
().
then
(
function
(
info
)
{
app
.
version
=
info
.
version
;
app
.
infoDetails
=
null
;
app
.
infoShort
=
''
;
...
...
spring-boot-admin-server-ui/app/js/service/application.js
View file @
22988fd0
...
...
@@ -16,7 +16,7 @@
'use strict'
;
var
angular
=
require
(
'angular'
);
module
.
exports
=
function
(
$resource
,
$http
)
{
module
.
exports
=
function
(
$resource
,
$http
,
$q
)
{
var
isEndpointPresent
=
function
(
endpoint
,
configprops
)
{
if
(
configprops
[
endpoint
])
{
...
...
@@ -62,44 +62,61 @@ module.exports = function ($resource, $http) {
remove
:
{
method
:
'DELETE'
}
});
var
convert
=
function
(
request
,
isArray
)
{
isArray
=
isArray
||
false
;
var
deferred
=
$q
.
defer
();
request
.
success
(
function
(
response
)
{
var
result
=
response
;
delete
result
[
'_links'
];
if
(
isArray
)
{
result
=
response
.
content
||
response
;
}
deferred
.
resolve
(
result
);
}).
error
(
function
(
response
)
{
deferred
.
reject
(
response
);
});
return
deferred
.
promise
;
};
Application
.
prototype
.
getHealth
=
function
()
{
return
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/health'
);
return
convert
(
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/health'
)
);
};
Application
.
prototype
.
getInfo
=
function
()
{
return
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/info'
);
return
convert
(
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/info'
)
);
};
Application
.
prototype
.
getMetrics
=
function
()
{
return
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/metrics'
);
return
convert
(
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/metrics'
)
);
};
Application
.
prototype
.
getEnv
=
function
(
key
)
{
return
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/env'
+
(
key
?
'/'
+
key
:
''
));
return
convert
(
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/env'
+
(
key
?
'/'
+
key
:
''
)
));
};
Application
.
prototype
.
setEnv
=
function
(
map
)
{
return
$http
.
post
(
'api/applications/'
+
this
.
id
+
'/env'
,
''
,
{
params
:
map
}
);
return
convert
(
$http
.
post
(
'api/applications/'
+
this
.
id
+
'/env'
,
''
,
{
params
:
map
})
);
};
Application
.
prototype
.
resetEnv
=
function
()
{
return
$http
.
post
(
'api/applications/'
+
this
.
id
+
'/env/reset'
);
return
convert
(
$http
.
post
(
'api/applications/'
+
this
.
id
+
'/env/reset'
)
);
};
Application
.
prototype
.
refresh
=
function
()
{
return
$http
.
post
(
'api/applications/'
+
this
.
id
+
'/refresh'
);
return
convert
(
$http
.
post
(
'api/applications/'
+
this
.
id
+
'/refresh'
)
);
};
Application
.
prototype
.
getThreadDump
=
function
()
{
return
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/dump'
);
return
convert
(
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/dump'
),
true
);
};
Application
.
prototype
.
getTraces
=
function
()
{
return
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/trace'
);
return
convert
(
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/trace'
),
true
);
};
Application
.
prototype
.
getActiviti
=
function
()
{
return
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/activiti'
);
return
convert
(
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/activiti'
)
);
};
return
Application
;
...
...
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