mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 11:52:38 +02:00
chore: declare ttl property in schema
This commit is contained in:
parent
16fd5d8ca3
commit
dbafe19b7f
3 changed files with 13 additions and 14 deletions
|
@ -478,8 +478,19 @@ export const SCHEMA = {
|
||||||
label: translate('To zoom'),
|
label: translate('To zoom'),
|
||||||
helpText: translate('Optional.'),
|
helpText: translate('Optional.'),
|
||||||
},
|
},
|
||||||
|
ttl: {
|
||||||
|
type: Number,
|
||||||
|
label: translate('Cache proxied request'),
|
||||||
|
choices: [
|
||||||
|
['', translate('No cache')],
|
||||||
|
['300', translate('5 min')],
|
||||||
|
['3600', translate('1 hour')],
|
||||||
|
['86400', translate('1 day')],
|
||||||
|
],
|
||||||
|
default: '300',
|
||||||
|
},
|
||||||
type: {
|
type: {
|
||||||
type: 'String',
|
type: String,
|
||||||
impacts: ['data'],
|
impacts: ['data'],
|
||||||
},
|
},
|
||||||
weight: {
|
weight: {
|
||||||
|
|
|
@ -340,15 +340,6 @@ L.FormBuilder.TextColorPicker = L.FormBuilder.ColorPicker.extend({
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
L.FormBuilder.ProxyTTLSelect = L.FormBuilder.Select.extend({
|
|
||||||
selectOptions: [
|
|
||||||
[undefined, L._('No cache')],
|
|
||||||
['300', L._('5 min')],
|
|
||||||
['3600', L._('1 hour')],
|
|
||||||
['86400', L._('1 day')],
|
|
||||||
],
|
|
||||||
})
|
|
||||||
|
|
||||||
L.FormBuilder.LayerTypeChooser = L.FormBuilder.Select.extend({
|
L.FormBuilder.LayerTypeChooser = L.FormBuilder.Select.extend({
|
||||||
getOptions: function () {
|
getOptions: function () {
|
||||||
const layer_classes = [
|
const layer_classes = [
|
||||||
|
|
|
@ -1407,10 +1407,7 @@ U.DataLayer = L.Evented.extend({
|
||||||
helpEntries: 'proxyRemoteData',
|
helpEntries: 'proxyRemoteData',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
remoteDataFields.push([
|
remoteDataFields.push('options.remoteData.ttl')
|
||||||
'options.remoteData.ttl',
|
|
||||||
{ handler: 'ProxyTTLSelect', label: L._('Cache proxied request') },
|
|
||||||
])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const remoteDataContainer = L.DomUtil.createFieldset(container, L._('Remote data'))
|
const remoteDataContainer = L.DomUtil.createFieldset(container, L._('Remote data'))
|
||||||
|
|
Loading…
Reference in a new issue