-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix condition to determine if the date field's value is an array #299
Changes from all commits
0453721
d493e8e
8b9af0a
0db4d73
b0ed35e
cb41949
a0ea513
5bda259
b026112
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ another JDK installation, e.g. `RUNTIME_JAVA_HOME=/usr/lib/jvm/jdk-8`. | |
cd plugins | ||
git clone https://github.com/opensearch-project/dashboards-reporting.git | ||
``` | ||
1. Run `yarn osd bootstrap` inside `OpenSearch-Dashboards/plugins/dashboards-reporting`. | ||
1. Run `yarn osd bootstrap --single-version=loose` inside `OpenSearch-Dashboards/plugins/dashboards-reporting`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice! |
||
|
||
Ultimately, your directory structure should look like this: | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,8 +145,8 @@ export const getOpenSearchData = ( | |
if (typeof dateValue === 'string') { | ||
data._source[keys] = moment.utc(dateValue).tz(timezone).format(dateFormat); | ||
} else if ( | ||
fieldDateValue.length !== 0 && | ||
fieldDateValue instanceof Array | ||
dateValue.length !== 0 && | ||
dateValue instanceof Array | ||
) { | ||
fieldDateValue.forEach((element, index) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just for my knowledge, why whats the difference between There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Originally the variable was |
||
data._source[keys][index] = moment.utc(element).tz(timezone).format(dateFormat); | ||
|
@@ -161,8 +161,8 @@ export const getOpenSearchData = ( | |
if (typeof fieldDateValue === 'string') { | ||
keys.push(moment.utc(fieldDateValue).tz(timezone).format(dateFormat)); | ||
} else if ( | ||
fieldDateValue.length !== 0 && | ||
fieldDateValue instanceof Array | ||
dateValue.length !== 0 && | ||
dateValue instanceof Array | ||
) { | ||
let tempArray: string[] = []; | ||
fieldDateValue.forEach((index) => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops good catch on this, seems like we don't need to specify the
spec
for this directory setup. Thanks!