You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by er...@apache.org on 2020/01/17 21:13:58 UTC
[incubator-superset] branch master updated: [sip-15] Displaying
endpoints for all start/end time ranges (#8817)
This is an automated email from the ASF dual-hosted git repository.
erikrit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 2fc5fd4 [sip-15] Displaying endpoints for all start/end time ranges (#8817)
2fc5fd4 is described below
commit 2fc5fd4f2921f24e5064bf54561eff87e754409a
Author: John Bodley <45...@users.noreply.github.com>
AuthorDate: Fri Jan 17 13:13:35 2020 -0800
[sip-15] Displaying endpoints for all start/end time ranges (#8817)
* [sip-15] Displaying endpoints for all start/end time ranges
* Update superset/assets/src/explore/components/controls/DateFilterControl.jsx
Co-Authored-By: Erik Ritter <er...@airbnb.com>
* Update superset/assets/src/explore/components/controls/DateFilterControl.jsx
Co-Authored-By: Erik Ritter <er...@airbnb.com>
* Update DateFilterControl.jsx
Co-authored-by: Erik Ritter <er...@airbnb.com>
---
.../assets/src/explore/components/controls/DateFilterControl.jsx | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/superset/assets/src/explore/components/controls/DateFilterControl.jsx b/superset/assets/src/explore/components/controls/DateFilterControl.jsx
index 6862ae6..93e0637 100644
--- a/superset/assets/src/explore/components/controls/DateFilterControl.jsx
+++ b/superset/assets/src/explore/components/controls/DateFilterControl.jsx
@@ -576,11 +576,10 @@ export default class DateFilterControl extends React.Component {
const endpoints = this.props.endpoints;
value = value
.split(SEPARATOR)
- .map((v, idx) =>
- moment(v).isValid()
- ? v.replace('T00:00:00', '') +
- (endpoints ? ` (${endpoints[idx]})` : '')
- : v || (idx === 0 ? '-∞' : '∞'),
+ .map(
+ (v, idx, values) =>
+ (v.replace('T00:00:00', '') || (idx === 0 ? '-∞' : '∞')) +
+ (endpoints && values.length > 1 ? ` (${endpoints[idx]})` : ''),
)
.join(SEPARATOR);
return (