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
4805d54c
Commit
4805d54c
authored
May 12, 2015
by
Johannes Stelzer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for /refresh endpoint
closes #69
parent
5b709a7f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
16 deletions
+42
-16
environmentCtrl.js
...admin-server-ui/app/js/controller/apps/environmentCtrl.js
+28
-12
application.js
spring-boot-admin-server-ui/app/js/service/application.js
+4
-0
environment.html
spring-boot-admin-server-ui/app/views/apps/environment.html
+10
-4
No files found.
spring-boot-admin-server-ui/app/js/controller/apps/environmentCtrl.js
View file @
4805d54c
...
...
@@ -17,7 +17,7 @@
module
.
exports
=
function
(
$scope
,
application
)
{
$scope
.
application
=
application
;
$scope
.
override
=
{
values
:
[{
key
:
''
,
value
:
''
}],
error
:
null
};
$scope
.
override
s
=
{
values
:
[{
key
:
''
,
value
:
''
}],
error
:
null
};
var
toArray
=
function
(
map
)
{
var
array
=
[];
...
...
@@ -71,37 +71,53 @@ module.exports = function ($scope, application) {
$scope
.
onChangeOverrideItem
=
function
(
item
)
{
getValue
(
item
);
if
(
$scope
.
override
.
values
[
$scope
.
override
.
values
.
length
-
1
].
key
)
{
$scope
.
override
.
values
.
push
({
key
:
''
,
value
:
''
});
if
(
$scope
.
override
s
.
values
[
$scope
.
overrides
.
values
.
length
-
1
].
key
)
{
$scope
.
override
s
.
values
.
push
({
key
:
''
,
value
:
''
});
}
};
$scope
.
override
Value
=
function
()
{
$scope
.
override
=
function
()
{
var
map
=
{};
for
(
var
i
=
0
;
i
<
$scope
.
override
.
values
.
length
;
i
++
)
{
if
(
$scope
.
override
.
values
[
i
].
key
)
{
map
[
$scope
.
override
.
values
[
i
].
key
]
=
$scope
.
override
.
values
[
i
].
value
;
for
(
var
i
=
0
;
i
<
$scope
.
override
s
.
values
.
length
;
i
++
)
{
if
(
$scope
.
override
s
.
values
[
i
].
key
)
{
map
[
$scope
.
override
s
.
values
[
i
].
key
]
=
$scope
.
overrides
.
values
[
i
].
value
;
}
}
$scope
.
override
.
error
=
null
;
$scope
.
override
s
.
error
=
null
;
application
.
setEnv
(
map
).
success
(
function
()
{
$scope
.
override
=
{
values
:
[{
key
:
''
,
value
:
''
}],
error
:
null
};
$scope
.
override
s
=
{
values
:
[{
key
:
''
,
value
:
''
}],
error
:
null
,
changes
:
null
};
$scope
.
reload
();
})
.
error
(
function
(
error
)
{
$scope
.
override
.
error
=
error
;
$scope
.
overrides
.
error
=
error
;
$scope
.
overrides
.
changes
=
null
;
$scope
.
reload
();
});
};
$scope
.
reset
=
function
()
{
$scope
.
override
.
error
=
null
;
$scope
.
overrides
.
error
=
null
;
$scope
.
overrides
.
changes
=
null
;
application
.
resetEnv
().
success
(
function
()
{
$scope
.
reload
();
})
.
error
(
function
(
error
)
{
$scope
.
override
.
error
=
error
;
$scope
.
overrides
.
error
=
error
;
$scope
.
reload
();
});
};
$scope
.
refresh
=
function
()
{
$scope
.
overrides
.
error
=
null
;
$scope
.
overrides
.
changes
=
null
;
application
.
refresh
().
success
(
function
(
changes
)
{
$scope
.
overrides
.
changes
=
changes
;
$scope
.
reload
();
})
.
error
(
function
(
error
)
{
$scope
.
overrides
.
error
=
error
;
$scope
.
reload
();
});
...
...
spring-boot-admin-server-ui/app/js/service/application.js
View file @
4805d54c
...
...
@@ -84,6 +84,10 @@ module.exports = function ($resource, $http) {
return
$http
.
post
(
'api/applications/'
+
this
.
id
+
'/env/reset'
);
};
Application
.
prototype
.
refresh
=
function
()
{
return
$http
.
post
(
'api/applications/'
+
this
.
id
+
'/refresh'
);
};
Application
.
prototype
.
getThreadDump
=
function
()
{
return
$http
.
get
(
'api/applications/'
+
this
.
id
+
'/dump'
);
};
...
...
spring-boot-admin-server-ui/app/views/apps/environment.html
View file @
4805d54c
...
...
@@ -25,7 +25,7 @@
<td
style=
"word-break: break-all;"
>
{{ key }}
</td>
<td
style=
"word-break: break-all;"
>
{{ value }}
</td>
</tr>
<tr
ng-repeat=
"item in override.values"
>
<tr
ng-repeat=
"item in override
s
.values"
>
<td
>
<input
type=
"text"
class=
"input-xlarge"
list=
"allkeys"
placeholder=
"key"
ng-model=
"item.key"
ng-change=
"onChangeOverrideItem(item)"
></input>
<datalist
id=
"allkeys"
>
...
...
@@ -41,11 +41,17 @@
<tfoot>
<tr>
<td
colspan=
"2"
>
<div
class=
"control-group pull-left"
>
<button
class=
"btn btn-info"
ng-click=
"refresh()"
>
Refresh beans
</button>
</div>
<div
class=
"control-group pull-right"
>
<button
class=
"btn btn-warning"
ng-click=
"overrideValue()"
>
Overrride Values!
</button>
<button
class=
"btn"
ng-click=
"reset()"
>
Reset Values!
</button>
<button
class=
"btn btn-warning"
ng-click=
"override()"
>
Overrride values!
</button>
<button
class=
"btn"
ng-click=
"reset()"
>
Reset overrides
</button>
</div>
<div
class=
"alert alert-info"
ng-if=
"overrides.changes"
>
<pre>
{{ override.changes }}
</pre>
</div>
<div
class=
"alert alert-error"
ng-if=
"override.error"
>
<div
class=
"alert alert-error"
ng-if=
"override
s
.error"
>
<b>
Error:
</b>
{{ override.error }}
</div>
</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