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
ccd0ca98
Commit
ccd0ca98
authored
Jun 08, 2018
by
Johannes Edmeier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish: use includes() instead indexOf() where possible
parent
5be42a58
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
22 additions
and
22 deletions
+22
-22
package-lock.json
spring-boot-admin-server-ui/package-lock.json
+0
-0
package.json
spring-boot-admin-server-ui/package.json
+12
-12
instance.js
...ot-admin-server-ui/src/main/frontend/services/instance.js
+1
-1
notification-filter.js
...rver-ui/src/main/frontend/services/notification-filter.js
+1
-1
index.vue
...i/src/main/frontend/views/instances/auditevents/index.vue
+2
-2
index.vue
...er-ui/src/main/frontend/views/instances/details/index.vue
+1
-1
index.vue
...server-ui/src/main/frontend/views/instances/env/index.vue
+1
-1
index.vue
...-ui/src/main/frontend/views/instances/httptrace/index.vue
+3
-3
index.vue
...er-ui/src/main/frontend/views/instances/loggers/index.vue
+1
-1
No files found.
spring-boot-admin-server-ui/package-lock.json
View file @
ccd0ca98
This source diff could not be displayed because it is too large. You can
view the blob
instead.
spring-boot-admin-server-ui/package.json
View file @
ccd0ca98
...
...
@@ -13,7 +13,7 @@
"@fortawesome/fontawesome-free-brands"
:
"^5.0.13"
,
"@fortawesome/fontawesome-free-regular"
:
"^5.0.13"
,
"@fortawesome/fontawesome-free-solid"
:
"^5.0.13"
,
"@fortawesome/vue-fontawesome"
:
"0.0.2
2
"
,
"@fortawesome/vue-fontawesome"
:
"0.0.2
3
"
,
"axios"
:
"^0.18.0"
,
"bulma"
:
"^0.7.1"
,
"bulma-badge"
:
"^1.0.1"
,
...
...
@@ -27,12 +27,12 @@
"event-source-polyfill"
:
"0.0.12"
,
"linkifyjs"
:
"^2.1.6"
,
"lodash"
:
"^4.17.10"
,
"moment"
:
"^2.22.
1
"
,
"moment"
:
"^2.22.
2
"
,
"moment-shortformat"
:
"^2.1.0"
,
"popper.js"
:
"^1.14.3"
,
"pretty-bytes"
:
"^5.
0
.0"
,
"pretty-bytes"
:
"^5.
1
.0"
,
"resize-observer-polyfill"
:
"^1.5.0"
,
"rxjs"
:
"^5.5.1
0
"
,
"rxjs"
:
"^5.5.1
1
"
,
"vue"
:
"^2.5.16"
,
"vue-clickaway"
:
"^2.2.1"
,
"vue-router"
:
"^3.0.1"
,
...
...
@@ -40,17 +40,17 @@
},
"devDependencies"
:
{
"@vue/test-utils"
:
"^1.0.0-beta.16"
,
"autoprefixer"
:
"^8.
5.0
"
,
"autoprefixer"
:
"^8.
6.1
"
,
"babel-core"
:
"^6.26.3"
,
"babel-eslint"
:
"^8.2.3"
,
"babel-jest"
:
"^2
2.4.3
"
,
"babel-jest"
:
"^2
3.0.1
"
,
"babel-loader"
:
"^7.1.4"
,
"babel-plugin-lodash"
:
"^3.3.
2
"
,
"babel-plugin-lodash"
:
"^3.3.
3
"
,
"babel-polyfill"
:
"^6.26.0"
,
"babel-preset-env"
:
"^1.7.0"
,
"babel-preset-stage-2"
:
"^6.24.1"
,
"clean-webpack-plugin"
:
"^0.1.19"
,
"cross-env"
:
"^5.1.
5
"
,
"cross-env"
:
"^5.1.
6
"
,
"css-hot-loader"
:
"^1.3.9"
,
"css-loader"
:
"^0.28.11"
,
"css-mqpacker"
:
"^6.0.2"
,
...
...
@@ -64,7 +64,7 @@
"html-loader"
:
"^0.5.5"
,
"html-webpack-plugin"
:
"^2.30.0"
,
"identity-obj-proxy"
:
"^3.0.0"
,
"jest"
:
"^2
2.4.3
"
,
"jest"
:
"^2
3.1.0
"
,
"lodash-webpack-plugin"
:
"^0.11.5"
,
"node-sass"
:
"^4.9.0"
,
"optimize-css-assets-webpack-plugin"
:
"^3.2.0"
,
...
...
@@ -72,12 +72,12 @@
"sass-loader"
:
"^6.0.7"
,
"style-loader"
:
"^0.20.3"
,
"url-loader"
:
"^0.6.2"
,
"vue-jest"
:
"^2.
5
.0"
,
"vue-loader"
:
"^14.2.
2
"
,
"vue-jest"
:
"^2.
6
.0"
,
"vue-loader"
:
"^14.2.
3
"
,
"vue-svg-loader"
:
"^0.5.0"
,
"vue-template-compiler"
:
"^2.5.16"
,
"webpack"
:
"^3.12.0"
,
"webpack-bundle-analyzer"
:
"^2.1
2.0
"
"webpack-bundle-analyzer"
:
"^2.1
3.1
"
},
"browserslist"
:
[
"> 2%"
,
...
...
spring-boot-admin-server-ui/src/main/frontend/services/instance.js
View file @
ccd0ca98
...
...
@@ -88,7 +88,7 @@ class Instance {
async
hasEnvManagerSupport
()
{
const
response
=
await
axios
.
options
(
uri
`instances/
${
this
.
id
}
/actuator/env`
);
return
response
.
headers
[
'allow'
]
&&
response
.
headers
[
'allow'
].
in
dexOf
(
'POST'
)
>=
0
;
return
response
.
headers
[
'allow'
]
&&
response
.
headers
[
'allow'
].
in
cludes
(
'POST'
)
;
}
async
resetEnv
()
{
...
...
spring-boot-admin-server-ui/src/main/frontend/services/notification-filter.js
View file @
ccd0ca98
...
...
@@ -56,7 +56,7 @@ class NotificationFilter {
static
async
isSupported
()
{
try
{
const
response
=
await
axios
.
options
(
'notifications/filters'
);
return
response
.
headers
[
'allow'
]
&&
response
.
headers
[
'allow'
].
in
dexOf
(
'POST'
)
>=
0
;
return
response
.
headers
[
'allow'
]
&&
response
.
headers
[
'allow'
].
in
cludes
(
'POST'
)
;
}
catch
(
error
)
{
return
false
;
}
...
...
spring-boot-admin-server-ui/src/main/frontend/views/instances/auditevents/index.vue
View file @
ccd0ca98
...
...
@@ -58,11 +58,11 @@
}
isSuccess
()
{
return
this
.
type
.
toLowerCase
().
in
dexOf
(
'success'
)
>=
0
;
return
this
.
type
.
toLowerCase
().
in
cludes
(
'success'
)
;
}
isFailure
()
{
return
this
.
type
.
toLowerCase
().
in
dexOf
(
'failure'
)
>=
0
;
return
this
.
type
.
toLowerCase
().
in
cludes
(
'failure'
)
;
}
}
...
...
spring-boot-admin-server-ui/src/main/frontend/views/instances/details/index.vue
View file @
ccd0ca98
...
...
@@ -130,7 +130,7 @@
},
methods
:
{
hasMetric
(
metric
)
{
return
this
.
metrics
.
in
dexOf
(
metric
)
>=
0
;
return
this
.
metrics
.
in
cludes
(
metric
)
;
},
async
fetchMetricIndex
()
{
if
(
this
.
instance
.
hasEndpoint
(
'metrics'
))
{
...
...
spring-boot-admin-server-ui/src/main/frontend/views/instances/env/index.vue
View file @
ccd0ca98
...
...
@@ -67,7 +67,7 @@
import
sbaEnvManager
from
'./env-manager'
;
const
filterProperty
=
(
needle
)
=>
(
property
,
name
)
=>
{
return
name
.
toString
().
toLowerCase
().
in
dexOf
(
needle
)
>=
0
||
property
.
value
.
toString
().
toLowerCase
().
indexOf
(
needle
)
>=
0
;
return
name
.
toString
().
toLowerCase
().
in
cludes
(
needle
)
||
property
.
value
.
toString
().
toLowerCase
().
includes
(
needle
)
;
};
const
filterProperties
=
(
needle
,
properties
)
=>
_
.
pickBy
(
properties
,
filterProperty
(
needle
));
const
filterPropertySource
=
(
needle
)
=>
(
propertySource
)
=>
{
...
...
spring-boot-admin-server-ui/src/main/frontend/views/instances/httptrace/index.vue
View file @
ccd0ca98
...
...
@@ -161,7 +161,7 @@
}),
computed
:
{
actuatorPath
()
{
if
(
this
.
instance
.
registration
.
managementUrl
.
in
dexOf
(
this
.
instance
.
registration
.
serviceUrl
)
>=
0
)
{
if
(
this
.
instance
.
registration
.
managementUrl
.
in
cludes
(
this
.
instance
.
registration
.
serviceUrl
)
)
{
const
appendix
=
this
.
instance
.
registration
.
managementUrl
.
substring
(
this
.
instance
.
registration
.
serviceUrl
.
length
);
if
(
appendix
.
length
>
0
)
{
return
`/
${
appendix
}
`
;
...
...
@@ -214,11 +214,11 @@
getFilterFn
()
{
let
filterFn
=
null
;
if
(
this
.
actuatorPath
!==
null
&&
this
.
excludeActuator
)
{
filterFn
=
addToFilter
(
filterFn
,
(
trace
)
=>
trace
.
request
.
uri
.
indexOf
(
this
.
actuatorPath
)
<
0
);
filterFn
=
addToFilter
(
filterFn
,
(
trace
)
=>
!
trace
.
request
.
uri
.
includes
(
this
.
actuatorPath
)
);
}
if
(
this
.
filter
)
{
const
normalizedFilter
=
this
.
filter
.
toLowerCase
();
filterFn
=
addToFilter
(
filterFn
,
(
trace
)
=>
trace
.
request
.
uri
.
toLowerCase
().
in
dexOf
(
normalizedFilter
)
>=
0
);
filterFn
=
addToFilter
(
filterFn
,
(
trace
)
=>
trace
.
request
.
uri
.
toLowerCase
().
in
cludes
(
normalizedFilter
)
);
}
if
(
!
this
.
showSuccess
)
{
filterFn
=
addToFilter
(
filterFn
,
(
trace
)
=>
!
trace
.
isSuccess
());
...
...
spring-boot-admin-server-ui/src/main/frontend/views/instances/loggers/index.vue
View file @
ccd0ca98
...
...
@@ -185,7 +185,7 @@
if
(
this
.
filter
)
{
const
normalizedFilter
=
this
.
filter
.
toLowerCase
();
filterFn
=
addToFilter
(
filterFn
,
logger
=>
logger
.
name
.
toLowerCase
().
in
dexOf
(
normalizedFilter
)
>=
0
);
filterFn
=
addToFilter
(
filterFn
,
logger
=>
logger
.
name
.
toLowerCase
().
in
cludes
(
normalizedFilter
)
);
}
return
filterFn
;
...
...
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