@datarailsshared/dr_renderer 1.2.133 → 1.2.135-tigers

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,7 +20,12 @@ jobs:
20
20
  - run:
21
21
  name: Prepare publish version
22
22
  command: |
23
- VERSION="1.2.$CIRCLE_BUILD_NUM"
23
+ postfix=""
24
+ if [[ "${CIRCLE_BRANCH}" != prod ]] ; then
25
+ postfix="-$CIRCLE_BRANCH"
26
+ fi
27
+
28
+ VERSION="1.2.$CIRCLE_BUILD_NUM$postfix"
24
29
  sed -i s/{{cicd_version}}/$VERSION/g ./package.json
25
30
  cat ./package.json
26
31
  - run:
@@ -32,7 +37,12 @@ jobs:
32
37
  - run:
33
38
  name: prepare git tag
34
39
  command: |
35
- VERSION="1.2.$CIRCLE_BUILD_NUM"
40
+ postfix=""
41
+ if [[ "${CIRCLE_BRANCH}" != prod ]] ; then
42
+ postfix="-$CIRCLE_BRANCH"
43
+ fi
44
+
45
+ VERSION="1.2.$CIRCLE_BUILD_NUM$postfix"
36
46
  git config --global user.email noreplay@circleci.com
37
47
  git config --global user.name circleci
38
48
  git config --global -l
@@ -49,3 +59,9 @@ workflows:
49
59
  branches:
50
60
  only:
51
61
  - /prod.*/
62
+ - /tigers/
63
+ - /bratans/
64
+ - /dragons/
65
+ - /tigers/
66
+ - /wizards/
67
+ - /rocket/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/dr_renderer",
3
- "version": "1.2.133",
3
+ "version": "1.2.135-tigers",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -7235,11 +7235,15 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7235
7235
  if (fieldFilter.datetypevalues.datetype === "frame") {
7236
7236
  displayname += ` (${fieldFilter.datetypevalues.val.timeframe})`;
7237
7237
  } else if (fieldFilter.datetypevalues.datetype === "range") {
7238
- const fromDate = new Date(fieldFilter.datetypevalues.val.fromdate * 1000);
7239
- const dateWithTimezone = new Date(fieldFilter.datetypevalues.val.todate * 1000);
7240
- const toDate = new Date(dateWithTimezone - Math.abs(dateWithTimezone.getTimezoneOffset()) * 1000 * 60);
7241
- const today = fieldFilter.datetypevalues.val.todate === '' ? 'Today' : null;
7242
- displayname += ` (${fromDate.toLocaleDateString("short")}-${today || toDate.toLocaleDateString("short")})`;
7238
+
7239
+ // range timestamps currently are set presupposing that user selects UTC dates, not his/her locale datetime
7240
+ // that is why for consistency we also should show in filters values which user selected
7241
+ // and not local dates, that can differ
7242
+ const fromDateTzOffsetInSeconds = new Date(fieldFilter.datetypevalues.val.fromdate * 1000).getTimezoneOffset() * 60;
7243
+ const toDateTzOffsetInSeconds = new Date(fieldFilter.datetypevalues.val.todate * 1000).getTimezoneOffset() * 60;
7244
+ const fromDateForDisplay = new Date((fieldFilter.datetypevalues.val.fromdate + fromDateTzOffsetInSeconds) * 1000);
7245
+ const toDateForDisplay= new Date((fieldFilter.datetypevalues.val.todate + toDateTzOffsetInSeconds) * 1000);
7246
+ displayname += ` (${fromDateForDisplay.toLocaleDateString("short")}-${'Today' || toDateForDisplay.toLocaleDateString("short")})`;
7243
7247
  } else {
7244
7248
  displayname += ' (All)';
7245
7249
  }