mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +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'),
|
||||
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: 'String',
|
||||
type: String,
|
||||
impacts: ['data'],
|
||||
},
|
||||
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({
|
||||
getOptions: function () {
|
||||
const layer_classes = [
|
||||
|
|
|
@ -1407,10 +1407,7 @@ U.DataLayer = L.Evented.extend({
|
|||
helpEntries: 'proxyRemoteData',
|
||||
},
|
||||
])
|
||||
remoteDataFields.push([
|
||||
'options.remoteData.ttl',
|
||||
{ handler: 'ProxyTTLSelect', label: L._('Cache proxied request') },
|
||||
])
|
||||
remoteDataFields.push('options.remoteData.ttl')
|
||||
}
|
||||
|
||||
const remoteDataContainer = L.DomUtil.createFieldset(container, L._('Remote data'))
|
||||
|
|
Loading…
Reference in a new issue