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
e2566a0b
Commit
e2566a0b
authored
Jan 15, 2018
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
link auditevents to sessions if sessions is active
parent
c69096ac
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
12 deletions
+70
-12
sba-confirm-button.vue
...er-ui/src/main/frontend/components/sba-confirm-button.vue
+19
-1
index.js
spring-boot-admin-server-ui/src/main/frontend/index.js
+1
-1
applications-list.vue
...rc/main/frontend/views/applications/applications-list.vue
+9
-3
auditevents-list.vue
...frontend/views/instances/auditevents/auditevents-list.vue
+12
-2
index.vue
...i/src/main/frontend/views/instances/auditevents/index.vue
+1
-2
index.vue
...r-ui/src/main/frontend/views/instances/sessions/index.vue
+27
-2
sessions-list.vue
.../main/frontend/views/instances/sessions/sessions-list.vue
+1
-1
No files found.
spring-boot-admin-server-ui/src/main/frontend/components/sba-confirm-button.vue
View file @
e2566a0b
...
...
@@ -15,18 +15,26 @@
-->
<
template
>
<button
@
click=
"click()"
>
<button
@
click=
"click()"
class=
"confirm-button"
:class=
"
{ 'is-warning' : confirm }" v-on-clickaway="abort"
>
<slot
name=
"confirm"
v-if=
"confirm"
>
Confirm
</slot>
<slot
v-else
></slot>
</button>
</
template
>
<
script
>
import
{
directive
as
onClickaway
}
from
'vue-clickaway'
;
export
default
{
directives
:
{
onClickaway
},
data
:
()
=>
({
confirm
:
false
}),
methods
:
{
abort
()
{
this
.
confirm
=
false
;
},
click
(
event
)
{
if
(
this
.
confirm
)
{
this
.
$emit
(
'click'
,
event
);
...
...
@@ -36,3 +44,12 @@
}
}
</
script
>
<
style
lang=
"scss"
>
@import
"~@/assets/css/utilities"
;
.confirm-button
{
transition
:
all
$easing
150ms
;
}
</
style
>
\ No newline at end of file
spring-boot-admin-server-ui/src/main/frontend/index.js
View file @
e2566a0b
...
...
@@ -89,7 +89,7 @@ views.register({
},
{
path
:
'auditevents'
,
component
:
sbaInstancesAuditevents
,
props
:
true
,
name
:
'instance/auditevents'
,
},
{
path
:
'sessions'
,
component
:
sbaInstancesSessions
,
props
:
true
,
name
:
'instance/sessions'
,
path
:
'sessions
/:sessionId?
'
,
component
:
sbaInstancesSessions
,
props
:
true
,
name
:
'instance/sessions'
,
},
{
path
:
'liquibase'
,
component
:
sbaInstancesLiquibase
,
props
:
true
,
name
:
'instance/liquibase'
,
},
{
...
...
spring-boot-admin-server-ui/src/main/frontend/views/applications/applications-list.vue
View file @
e2566a0b
...
...
@@ -18,7 +18,7 @@
<div
class=
"applications-list"
>
<template
v-for=
"application in applications"
>
<div
v-if=
"selected !== application.name"
:key=
"application.name"
@
click
.
stop=
"select
ed = application.name
"
@
click
.
stop=
"select
(application.name)
"
class=
"applications-list-item applications-list-item--collapsed"
>
<sba-status
:status=
"application.status"
:date=
"application.statusTimestamp"
...
...
@@ -44,10 +44,10 @@
</div>
</div>
<div
v-else
:key=
"application.name"
v-on-clickaway=
"
() => selected = null
"
v-on-clickaway=
"
deselect
"
class=
"applications-list-item applications-list-item--detailed"
>
<div
class=
"applications-list-item__header"
@
click
.
stop=
"
selected = null
"
>
@
click
.
stop=
"
deselect()
"
>
<div
class=
"applications-list-item__header-text"
v-text=
"application.name"
></div>
<div
class=
"applications-list-item__header-actions"
>
<sba-icon-button
...
...
@@ -100,6 +100,12 @@
}),
methods
:
{
select
(
name
)
{
this
.
selected
=
name
;
},
deselect
()
{
this
.
selected
=
null
;
},
showDetails
(
instance
)
{
this
.
$router
.
push
(
`/instances/
${
instance
.
id
}
`
)
},
...
...
spring-boot-admin-server-ui/src/main/frontend/views/instances/auditevents/auditevents-list.vue
View file @
e2566a0b
...
...
@@ -37,7 +37,12 @@
</td>
<td
v-text=
"event.principal"
></td>
<td
v-text=
"event.remoteAddress"
></td>
<td
v-text=
"event.sessionId"
></td>
<td
v-if=
"hasSessionEndpoint && event.sessionId"
>
<router-link
v-text=
"event.sessionId"
:to=
"
{ name: 'instance/sessions', params: { 'instanceId' : instance.id, sessionId : event.sessionId } }">
</router-link>
</td>
<td
v-else
v-text=
"event.sessionId"
></td>
</tr>
<tr
class=
"event__detail"
:key=
"`$
{event.key}-detail`" v-if="showDetails[event.key]">
<td
colspan=
"5"
>
...
...
@@ -55,10 +60,15 @@
import
prettyBytes
from
'pretty-bytes'
;
export
default
{
props
:
[
'events'
],
props
:
[
'events'
,
'instance'
],
data
:
()
=>
({
showDetails
:
{}
}),
computed
:
{
hasSessionEndpoint
()
{
return
this
.
instance
&&
this
.
instance
.
hasEndpoint
(
'sessions'
);
}
},
methods
:
{
prettyBytes
,
toJson
(
obj
)
{
...
...
spring-boot-admin-server-ui/src/main/frontend/views/instances/auditevents/index.vue
View file @
e2566a0b
...
...
@@ -18,7 +18,7 @@
<section
class=
"section"
:class=
"
{ 'is-loading' : !events}">
<div
class=
"container"
v-if=
"events"
>
<div
class=
"content"
>
<auditevents-list
:events=
"events"
></auditevents-list>
<auditevents-list
:
instance=
"instance"
:
events=
"events"
></auditevents-list>
</div>
</div>
</section>
...
...
@@ -66,7 +66,6 @@
data
:
()
=>
({
events
:
null
,
}),
computed
:
{},
watch
:
{
instance
()
{
this
.
subscribe
();
...
...
spring-boot-admin-server-ui/src/main/frontend/views/instances/sessions/index.vue
View file @
e2566a0b
...
...
@@ -45,6 +45,8 @@
import
moment
from
'moment'
;
import
sbaSessionsList
from
'./sessions-list'
;
const
regexUuid
=
/
[
0-9a-fA-F
]{8}
-
[
0-9a-fA-F
]{4}
-
[
0-9a-fA-F
]{4}
-
[
0-9a-fA-F
]{4}
-
[
0-9a-fA-F
]{12}
/
;
class
Session
{
constructor
({
id
,
attributeNames
,
creationTime
,
lastAccessedTime
,
maxInactiveInterval
,
expired
})
{
this
.
id
=
id
;
...
...
@@ -57,7 +59,7 @@
}
export
default
{
props
:
[
'instance'
],
props
:
[
'instance'
,
'sessionId'
],
components
:
{
sbaSessionsList
},
data
:
()
=>
({
filter
:
''
,
...
...
@@ -65,31 +67,53 @@
sessions
:
[],
isLoading
:
false
}),
computed
:
{},
methods
:
{
fetchSessions
:
_
.
debounce
(
async
function
()
{
if
(
!
this
.
filter
)
{
this
.
sessions
=
[];
return
;
}
this
.
isLoading
=
true
;
try
{
if
(
this
.
filtertype
===
'username'
)
{
const
response
=
await
this
.
instance
.
fetchSessions
(
this
.
filter
);
this
.
sessions
=
response
.
data
.
sessions
.
map
(
session
=>
new
Session
(
session
));
}
else
{
try
{
const
response
=
await
this
.
instance
.
fetchSession
(
this
.
filter
);
this
.
sessions
=
[
new
Session
(
response
.
data
)];
}
catch
(
error
)
{
if
(
error
.
response
.
status
===
404
)
{
this
.
sessions
=
[];
}
else
{
throw
error
;
}
}
}
}
finally
{
this
.
isLoading
=
false
;
}
},
250
)
},
mounted
()
{
if
(
this
.
sessionId
)
{
this
.
filtertype
=
'sessionId'
;
this
.
filter
=
this
.
sessionId
;
}
},
watch
:
{
filtertype
()
{
this
.
fetchSessions
();
},
filter
()
{
if
(
this
.
filter
.
match
(
regexUuid
)
&&
this
.
filtertype
!==
'sessionId'
)
{
this
.
filtertype
=
'sessionId'
;
}
else
{
this
.
fetchSessions
();
}
}
}
}
</
script
>
\ No newline at end of file
spring-boot-admin-server-ui/src/main/frontend/views/instances/sessions/sessions-list.vue
View file @
e2566a0b
...
...
@@ -22,7 +22,7 @@
<th>
Session Id
</th>
<th>
Created at
</th>
<th>
Last accessed at
</th>
<th>
Max. inactive
interval
<th>
Max. inactive
<br>
interval
</th>
<th>
Attributes
</th>
<th>
...
...
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