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
25f4003f
Commit
25f4003f
authored
Feb 19, 2018
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow esc/enter to cancel/save when edition MBean attributes.
parent
957aa085
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
m-bean-attribute.vue
...ain/frontend/views/instances/jolokia/m-bean-attribute.vue
+12
-7
No files found.
spring-boot-admin-server-ui/src/main/frontend/views/instances/jolokia/m-bean-attribute.vue
View file @
25f4003f
...
...
@@ -29,14 +29,17 @@
</button>
</div>
<div
class=
"control is-expanded has-icons-right"
>
<input
v-if=
"!hasComplexValue"
class=
"input"
type=
"text"
:readonly=
"!editing"
:value=
"editing? input : value"
@
input=
"input = $event.target.value"
@
dblclick=
"edit"
>
<textarea
v-else
class=
"input m-bean-attribute--text"
:readonly=
"!editing"
v-text=
"jsonValue"
/>
<template
v-if=
"!editing"
>
<input
v-if=
"!hasComplexValue"
class=
"input"
type=
"text"
readonly
:value=
"value"
@
dblclick=
"edit"
>
<textarea
v-else
class=
"input m-bean-attribute--text"
readonly
v-text=
"jsonValue"
/>
<span
class=
"icon is-right has-text-warning"
v-if=
"error"
>
<font-awesome-icon
icon=
"exclamation-triangle"
/>
</span>
</
template
>
<
template
v-else
>
<input
v-if=
"!hasComplexValue"
class=
"input"
type=
"text"
ref=
"input"
v-model=
"input"
@
keyup
.
esc=
"cancel"
@
keyup
.
enter=
"save"
>
</
template
>
</div>
</div>
<div
class=
"help"
v-text=
"descriptor.desc"
/>
...
...
@@ -86,10 +89,12 @@
},
},
methods
:
{
edit
()
{
if
(
this
.
descriptor
.
rw
)
{
async
edit
()
{
if
(
this
.
descriptor
.
rw
&&
!
this
.
hasComplexValue
)
{
this
.
input
=
this
.
value
;
this
.
editing
=
true
;
await
this
.
$nextTick
();
this
.
$refs
.
input
.
focus
();
}
},
cancel
()
{
...
...
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