Add ability to configure Remote IP and Web cache TTL

This commit is contained in:
Angelina Filippova 2019-11-22 11:58:25 +09:00
parent aa64456b2f
commit 93a0d4ffa2
2 changed files with 21 additions and 1 deletions

View file

@ -4,8 +4,12 @@
<setting :setting-group="endpoint" :data="endpointData"/>
</el-form>
<div class="line"/>
<el-form v-if="!loading" ref="endpointMetricsExporter" :model="endpointMetricsExporterData" :label-width="labelWidth">
<el-form ref="endpointMetricsExporter" :model="endpointMetricsExporterData" :label-width="labelWidth">
<setting :setting-group="endpointMetricsExporter" :data="endpointMetricsExporterData"/>
</el-form>
<div class="line"/>
<el-form ref="remoteIp" :model="remoteIpData" :label-width="labelWidth">
<setting :setting-group="remoteIp" :data="remoteIpData"/>
<el-form-item>
<el-button type="primary" @click="onSubmit">Submit</el-button>
</el-form-item>
@ -47,6 +51,12 @@ export default {
},
loading() {
return this.settings.loading
},
remoteIp() {
return this.settings.description.find(setting => setting.key === 'Pleroma.Plugs.RemoteIp')
},
remoteIpData() {
return this.settings.settings.pleroma['Pleroma.Plugs.RemoteIp']
}
},
methods: {

View file

@ -14,6 +14,10 @@
<div class="line"/>
<el-form ref="httpSecurityData" :model="httpSecurityData" :label-width="labelWidth">
<setting :setting-group="httpSecurity" :data="httpSecurityData"/>
</el-form>
<div class="line"/>
<el-form ref="webCacheTtl" :model="webCacheTtlData" :label-width="labelWidth">
<setting :setting-group="webCacheTtl" :data="webCacheTtlData"/>
<el-form-item>
<el-button type="primary" @click="onSubmit">Submit</el-button>
</el-form-item>
@ -65,6 +69,12 @@ export default {
},
loading() {
return this.settings.loading
},
webCacheTtl() {
return this.settings.description.find(setting => setting.key === ':web_cache_ttl')
},
webCacheTtlData() {
return this.settings.settings.pleroma[':web_cache_ttl']
}
},
methods: {