kibana/x-pack/plugins/gis/public/shared/layers/sources/source.js
Nathan Reese 72680f2fa0
[Maps] update layers on kibana global refresh interval (#27721)
* update layers on kibana global refresh interval

* store refresh in UI state

* clearer function names for refresh timer

* rename a bunch of things

* fix store_actions jest test

* add functional test to verify refresh config is loaded from saved object state

* add functional tests verifing layers re-fetch data on refresh timer
2018-12-26 10:14:43 -07:00

63 lines
1.2 KiB
JavaScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import React from 'react';
export class ASource {
static renderEditor() {
throw new Error('Must implement Source.renderEditor');
}
static createDescriptor() {
throw new Error('Must implement Source.createDescriptor');
}
constructor(descriptor) {
this._descriptor = descriptor;
}
destory() {}
renderDetails() {
return (<div>{`Here be details for source`}</div>);
}
_createDefaultLayerDescriptor() {
throw new Error(`Source#createDefaultLayerDescriptor not implemented`);
}
createDefaultLayer() {
throw new Error(`Source#createDefaultLayer not implemented`);
}
async getDisplayName() {
console.warn('Source should implement Source#getDisplayName');
return '';
}
isFieldAware() {
return false;
}
isRefreshTimerAware() {
return false;
}
getFieldNames() {
return [];
}
hasCompleteConfig() {
throw new Error(`Source#hasCompleteConfig not implemented`);
}
renderSourceSettingsEditor() {
return null;
}
}