From notifications-return-24963-apmail-superset-notifications-archive=superset.apache.org@superset.apache.org Thu Aug 1 00:03:37 2019 Return-Path: X-Original-To: apmail-superset-notifications-archive@minotaur.apache.org Delivered-To: apmail-superset-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id BB6FE19506 for ; Thu, 1 Aug 2019 00:03:36 +0000 (UTC) Received: (qmail 3712 invoked by uid 500); 1 Aug 2019 00:03:36 -0000 Delivered-To: apmail-superset-notifications-archive@superset.apache.org Received: (qmail 3695 invoked by uid 500); 1 Aug 2019 00:03:36 -0000 Mailing-List: contact notifications-help@superset.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@superset.apache.org Delivered-To: mailing list notifications@superset.apache.org Received: (qmail 3676 invoked by uid 99); 1 Aug 2019 00:03:36 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Aug 2019 00:03:36 +0000 From: GitBox To: notifications@superset.apache.org Subject: [GitHub] [incubator-superset] graceguo-supercat commented on a change in pull request #7908: [WiP][Feature] Dashboard filter indicators Message-ID: <156461781616.23829.88775511434775118.gitbox@gitbox.apache.org> Date: Thu, 01 Aug 2019 00:03:36 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit graceguo-supercat commented on a change in pull request #7908: [WiP][Feature] Dashboard filter indicators URL: https://github.com/apache/incubator-superset/pull/7908#discussion_r309478679 ########## File path: superset/assets/src/dashboard/reducers/dashboardFilters.js ########## @@ -0,0 +1,125 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/* eslint-disable no-param-reassign */ +/* eslint-disable camelcase */ +import { DASHBOARD_ROOT_ID } from '../util/constants'; +import { + ADD_FILTER, + REMOVE_FILTER, + CHANGE_FILTER, + UPDATE_DIRECT_PATH_TO_FILTER, +} from '../actions/dashboardFilters'; +import { TIME_RANGE } from '../../visualizations/FilterBox/FilterBox'; +import getFilterConfigsFromFormdata from '../util/getFilterConfigsFromFormdata'; +import { buildFilterColorMap } from '../util/dashboardFiltersColorMap'; +import { buildActiveFilters } from '../util/activeDashboardFilters'; + +export const dashboardFilter = { + chartId: 0, + componentId: '', + directPathToFilter: [], + scope: DASHBOARD_ROOT_ID, + isDateFilter: false, + isInstantFilter: true, + columns: {}, +}; + +export default function dashboardFiltersReducer(dashboardFilters = {}, action) { + const actionHandlers = { + [ADD_FILTER]() { + const { chartId, component, form_data } = action; + const columns = getFilterConfigsFromFormdata(form_data); + let directPathToFilter = []; Review comment: 👍 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org For additional commands, e-mail: notifications-help@superset.apache.org