mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
add time to visualization status (#15856)
* add time to visualization status * account for custom time on visualization * update docs
This commit is contained in:
parent
d4300794df
commit
265c7b9fbe
2 changed files with 4 additions and 1 deletions
|
@ -91,7 +91,7 @@ options or data change, and a destroy method which will be called to cleanup.
|
|||
The render function receives the data object and status object which tells what actually changed.
|
||||
Render function needs to return a promise, which should be resolved once the visualization is done rendering.
|
||||
|
||||
Status object has the following properties: `vis`, `aggs`, `resize`, `data`. Each of them is set to true if the matching
|
||||
Status object has the following properties: `aggs`, `data`, `params`, `resize`, `time`, `uiState`. Each of them is set to true if the matching
|
||||
object changed since last call to the render function or set to false otherwise. You can use it to make your
|
||||
visualization rendering more efficient.
|
||||
|
||||
|
|
|
@ -50,11 +50,14 @@ const getUpdateStatus = ($scope) => {
|
|||
return false;
|
||||
}
|
||||
|
||||
const time = $scope.vis.params.timeRange ? $scope.vis.params.timeRange : $scope.vis.API.timeFilter.getBounds();
|
||||
|
||||
return {
|
||||
aggs: hasChangedUsingGenericHashComparison('aggs', $scope.vis.aggs),
|
||||
data: hasChangedUsingGenericHashComparison('data', $scope.visData),
|
||||
params: hasChangedUsingGenericHashComparison('param', $scope.vis.params),
|
||||
resize: hasSizeChanged($scope.vis.size),
|
||||
time: hasChangedUsingGenericHashComparison('time', time),
|
||||
uiState: hasChangedUsingGenericHashComparison('uiState', $scope.uiState)
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue