You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2023/04/06 16:04:27 UTC
[superset] branch master updated: fix: Increases the options limit for Annotation Layers (#23613)
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 739adcb93c fix: Increases the options limit for Annotation Layers (#23613)
739adcb93c is described below
commit 739adcb93cabcf5b84b0e058aaa6f9ec31b738a1
Author: Michael S. Molina <70...@users.noreply.github.com>
AuthorDate: Thu Apr 6 13:04:18 2023 -0300
fix: Increases the options limit for Annotation Layers (#23613)
---
.../controls/AnnotationLayerControl/AnnotationLayer.jsx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.jsx b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.jsx
index e83c6594a4..d04b20cb0d 100644
--- a/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.jsx
+++ b/superset-frontend/src/explore/components/controls/AnnotationLayerControl/AnnotationLayer.jsx
@@ -47,6 +47,7 @@ import {
import PopoverSection from 'src/components/PopoverSection';
import ControlHeader from 'src/explore/components/ControlHeader';
import { EmptyStateSmall } from 'src/components/EmptyState';
+import { FILTER_OPTIONS_LIMIT } from 'src/explore/constants';
const AUTOMATIC_COLOR = '';
@@ -301,8 +302,12 @@ class AnnotationLayer extends React.PureComponent {
fetchOptions(annotationType, sourceType, isLoadingOptions) {
if (isLoadingOptions) {
if (sourceType === ANNOTATION_SOURCE_TYPES.NATIVE) {
+ const queryParams = rison.encode({
+ page: 0,
+ page_size: FILTER_OPTIONS_LIMIT,
+ });
SupersetClient.get({
- endpoint: '/api/v1/annotation_layer/',
+ endpoint: `/api/v1/annotation_layer/?q=${queryParams}`,
}).then(({ json }) => {
const layers = json
? json.result.map(layer => ({
@@ -327,7 +332,7 @@ class AnnotationLayer extends React.PureComponent {
order_column: 'slice_name',
order_direction: 'asc',
page: 0,
- page_size: 25,
+ page_size: FILTER_OPTIONS_LIMIT,
});
SupersetClient.get({
endpoint: `/api/v1/chart/?q=${queryParams}`,