Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
admin-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pleroma
admin-fe
Commits
529a8469
Commit
529a8469
authored
5 years ago
by
Angelina Filippova
Browse files
Options
Downloads
Patches
Plain Diff
Add Logger tab, fix processing atom values
parent
5700f362
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!65
Update server configuration
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/store/modules/normalizers.js
+12
-5
12 additions, 5 deletions
src/store/modules/normalizers.js
src/views/settings/components/Inputs.vue
+3
-1
3 additions, 1 deletion
src/views/settings/components/Inputs.vue
src/views/settings/index.vue
+4
-3
4 additions, 3 deletions
src/views/settings/index.vue
with
19 additions
and
9 deletions
src/store/modules/normalizers.js
+
12
−
5
View file @
529a8469
...
@@ -71,7 +71,10 @@ const parseObject = object => {
...
@@ -71,7 +71,10 @@ const parseObject = object => {
}
}
const
parseProxyUrl
=
value
=>
{
const
parseProxyUrl
=
value
=>
{
if
(
!
Array
.
isArray
(
value
)
&&
typeof
value
===
'
object
'
&&
value
.
tuple
.
length
===
3
&&
value
.
tuple
[
0
]
===
'
:socks5
'
)
{
if
(
value
&&
!
Array
.
isArray
(
value
)
&&
typeof
value
===
'
object
'
&&
value
.
tuple
.
length
===
3
&&
value
.
tuple
[
0
]
===
'
:socks5
'
)
{
const
[,
host
,
port
]
=
value
.
tuple
const
[,
host
,
port
]
=
value
.
tuple
return
{
socks5
:
true
,
host
,
port
}
return
{
socks5
:
true
,
host
,
port
}
}
else
if
(
typeof
value
===
'
string
'
)
{
}
else
if
(
typeof
value
===
'
string
'
)
{
...
@@ -83,7 +86,6 @@ const parseProxyUrl = value => {
...
@@ -83,7 +86,6 @@ const parseProxyUrl = value => {
export
const
partialUpdate
=
(
group
,
key
)
=>
{
export
const
partialUpdate
=
(
group
,
key
)
=>
{
if
((
group
===
'
:pleroma
'
&&
key
===
'
:ecto_repos
'
)
||
if
((
group
===
'
:pleroma
'
&&
key
===
'
:ecto_repos
'
)
||
(
group
===
'
:quack
'
&&
key
===
'
:meta
'
)
||
(
group
===
'
:mime
'
&&
key
===
'
:types
'
)
||
(
group
===
'
:mime
'
&&
key
===
'
:types
'
)
||
(
group
===
'
:auto_linker
'
&&
key
===
'
:opts
'
)
||
(
group
===
'
:auto_linker
'
&&
key
===
'
:opts
'
)
||
(
group
===
'
:swarm
'
&&
key
===
'
:node_blacklist
'
))
{
(
group
===
'
:swarm
'
&&
key
===
'
:node_blacklist
'
))
{
...
@@ -107,8 +109,13 @@ export const valueHasTuples = (key, value) => {
...
@@ -107,8 +109,13 @@ export const valueHasTuples = (key, value) => {
export
const
wrapUpdatedSettings
=
(
group
,
settings
)
=>
{
export
const
wrapUpdatedSettings
=
(
group
,
settings
)
=>
{
return
Object
.
keys
(
settings
).
map
((
key
)
=>
{
return
Object
.
keys
(
settings
).
map
((
key
)
=>
{
const
value
=
settings
[
key
].
_value
?
settings
[
key
].
_value
[
1
]
:
wrapValues
(
settings
[
key
])
if
(
settings
[
key
].
_value
)
{
return
{
group
,
key
,
value
}
const
value
=
settings
[
key
].
_value
[
0
]
===
'
atom
'
&&
settings
[
key
].
_value
[
1
].
length
>
1
?
`:
${
settings
[
key
].
_value
[
1
]}
`
:
settings
[
key
].
_value
[
1
]
return
{
group
,
key
,
value
}
}
return
{
group
,
key
,
value
:
wrapValues
(
settings
[
key
])
}
})
})
}
}
...
@@ -117,7 +124,7 @@ const wrapValues = settings => {
...
@@ -117,7 +124,7 @@ const wrapValues = settings => {
const
[
type
,
value
]
=
Array
.
isArray
(
settings
[
setting
])
?
settings
[
setting
]
:
[
''
,
settings
[
setting
]]
const
[
type
,
value
]
=
Array
.
isArray
(
settings
[
setting
])
?
settings
[
setting
]
:
[
''
,
settings
[
setting
]]
if
(
type
===
'
keyword
'
||
type
.
includes
(
'
keyword
'
))
{
if
(
type
===
'
keyword
'
||
type
.
includes
(
'
keyword
'
))
{
return
{
'
tuple
'
:
[
setting
,
wrapValues
(
value
)]
}
return
{
'
tuple
'
:
[
setting
,
wrapValues
(
value
)]
}
}
else
if
(
type
===
'
atom
'
)
{
}
else
if
(
type
===
'
atom
'
&&
value
.
length
>
0
)
{
return
{
'
tuple
'
:
[
setting
,
`:
${
value
}
`
]
}
return
{
'
tuple
'
:
[
setting
,
`:
${
value
}
`
]
}
}
else
if
(
type
.
includes
(
'
tuple
'
)
&&
Array
.
isArray
(
value
))
{
}
else
if
(
type
.
includes
(
'
tuple
'
)
&&
Array
.
isArray
(
value
))
{
return
{
'
tuple
'
:
[
setting
,
{
'
tuple
'
:
value
}]
}
return
{
'
tuple
'
:
[
setting
,
{
'
tuple
'
:
value
}]
}
...
...
This diff is collapsed.
Click to expand it.
src/views/settings/components/Inputs.vue
+
3
−
1
View file @
529a8469
...
@@ -185,7 +185,9 @@ export default {
...
@@ -185,7 +185,9 @@ export default {
inputValue
()
{
inputValue
()
{
if
([
'
:esshd
'
,
'
:cors_plug
'
,
'
:quack
'
,
'
:http_signatures
'
].
includes
(
this
.
settingGroup
.
group
)
&&
if
([
'
:esshd
'
,
'
:cors_plug
'
,
'
:quack
'
,
'
:http_signatures
'
].
includes
(
this
.
settingGroup
.
group
)
&&
this
.
data
[
this
.
setting
.
key
])
{
this
.
data
[
this
.
setting
.
key
])
{
return
this
.
data
[
this
.
setting
.
key
].
value
return
this
.
setting
.
type
===
'
atom
'
&&
this
.
data
[
this
.
setting
.
key
].
value
[
0
]
===
'
:
'
?
this
.
data
[
this
.
setting
.
key
].
value
.
substr
(
1
)
:
this
.
data
[
this
.
setting
.
key
].
value
}
else
if
((
this
.
settingGroup
.
group
===
'
:logger
'
&&
this
.
setting
.
key
===
'
:backends
'
)
||
}
else
if
((
this
.
settingGroup
.
group
===
'
:logger
'
&&
this
.
setting
.
key
===
'
:backends
'
)
||
this
.
setting
.
key
===
'
Pleroma.Web.Auth.Authenticator
'
||
this
.
setting
.
key
===
'
Pleroma.Web.Auth.Authenticator
'
||
this
.
setting
.
key
===
'
:admin_token
'
)
{
this
.
setting
.
key
===
'
:admin_token
'
)
{
...
...
This diff is collapsed.
Click to expand it.
src/views/settings/index.vue
+
4
−
3
View file @
529a8469
...
@@ -38,13 +38,14 @@
...
@@ -38,13 +38,14 @@
<el-tab-pane
:label=
"$t('settings.instance')"
name=
"instance"
>
<el-tab-pane
:label=
"$t('settings.instance')"
name=
"instance"
>
<instance/>
<instance/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
:label=
"$t('settings.logger')"
lazy
>
<logger/>
</el-tab-pane>
<!--
<!--
<el-tab-pane
:label=
"$t('settings.jobQueue')"
lazy
>
<el-tab-pane
:label=
"$t('settings.jobQueue')"
lazy
>
<job-queue/>
<job-queue/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
:label=
"$t('settings.logger')"
lazy
>
<logger/>
</el-tab-pane>
<el-tab-pane
:label=
"$t('settings.mailer')"
lazy
>
<el-tab-pane
:label=
"$t('settings.mailer')"
lazy
>
<mailer/>
<mailer/>
</el-tab-pane>
</el-tab-pane>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment