-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Lens] Time shift metrics #98781
Merged
flash1293
merged 53 commits into
elastic:master
from
flash1293:lens/splitted-time-offset
Jun 2, 2021
Merged
[Lens] Time shift metrics #98781
Changes from 51 commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
db10c1b
make basic time offset work
flash1293 e79d607
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 4c4ad72
stabilize response merging and start building UI
flash1293 4d8c9b8
continue building time shift
flash1293 fa12d2e
add better error handling
flash1293 64e208a
add better error handling
flash1293 5b389ce
fix broken metric time shift
flash1293 20940a7
experimental fix action
flash1293 f0c65ec
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 5603bb9
cleanup
flash1293 8f6b95c
remove current runtime error thingy
flash1293 0d2621e
remove leftover runtime error stuff
flash1293 b318efd
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 3439d35
fix some casest push
flash1293 557d6d5
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 abeed2c
add tests and fix some bugs
flash1293 89dd546
add back session snapshots
flash1293 bcc0cd1
fix some bugs
flash1293 e6f112d
fix terms sorting
flash1293 e866d6d
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 34a2208
fix bug and add tests
flash1293 f91d72f
address comments
flash1293 50844cd
fix test
flash1293 fc5f171
fix types and docs
flash1293 2bc3872
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 7c4d2f2
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 16b5ee2
increase accepted span for percentiles
flash1293 1593bad
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 ef024fe
add warnings
flash1293 dc686f0
Merge branch 'master' into lens/splitted-time-offset
kibanamachine e2134e2
Merge branch 'master' into lens/splitted-time-offset
kibanamachine 047d99f
improve warning
flash1293 d2ebab5
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 f0d3b44
Merge branch 'lens/splitted-time-offset' of github.com:flash1293/kiba…
flash1293 b4a988d
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 f6620ff
review comments
flash1293 eaa0819
adjust wording
flash1293 b066335
fix test
flash1293 e5287a3
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 81c1676
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 9c045a7
fix previous time shift error checks
flash1293 64fbd5a
Merge branch 'master' into lens/splitted-time-offset
kibanamachine 47d0bae
Merge branch 'master' into lens/splitted-time-offset
kibanamachine 026371f
add label suffix for cumulative sum
flash1293 6891e8b
review comments
flash1293 f4db9ec
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 8e9f724
fix functional test
flash1293 ab828a3
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 bc1633b
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 f0b137d
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 3849b04
review comments
flash1293 77139a1
Merge remote-tracking branch 'upstream/master' into lens/splitted-tim…
flash1293 e9b556f
fix tests
flash1293 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
...plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.gettimeshift.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [getTimeShift](./kibana-plugin-plugins-data-public.aggconfig.gettimeshift.md) | ||
|
||
## AggConfig.getTimeShift() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
getTimeShift(): undefined | moment.Duration; | ||
``` | ||
<b>Returns:</b> | ||
|
||
`undefined | moment.Duration` | ||
|
15 changes: 15 additions & 0 deletions
15
...plugins/data/public/kibana-plugin-plugins-data-public.aggconfig.hastimeshift.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfig](./kibana-plugin-plugins-data-public.aggconfig.md) > [hasTimeShift](./kibana-plugin-plugins-data-public.aggconfig.hastimeshift.md) | ||
|
||
## AggConfig.hasTimeShift() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
hasTimeShift(): boolean; | ||
``` | ||
<b>Returns:</b> | ||
|
||
`boolean` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...nt/plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.forcenow.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [forceNow](./kibana-plugin-plugins-data-public.aggconfigs.forcenow.md) | ||
|
||
## AggConfigs.forceNow property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
forceNow?: Date; | ||
``` |
72 changes: 72 additions & 0 deletions
72
...ublic/kibana-plugin-plugins-data-public.aggconfigs.getsearchsourcetimefilter.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [getSearchSourceTimeFilter](./kibana-plugin-plugins-data-public.aggconfigs.getsearchsourcetimefilter.md) | ||
|
||
## AggConfigs.getSearchSourceTimeFilter() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
getSearchSourceTimeFilter(forceNow?: Date): RangeFilter[] | { | ||
meta: { | ||
index: string | undefined; | ||
params: {}; | ||
alias: string; | ||
disabled: boolean; | ||
negate: boolean; | ||
}; | ||
query: { | ||
bool: { | ||
should: { | ||
bool: { | ||
filter: { | ||
range: { | ||
[x: string]: { | ||
gte: string; | ||
lte: string; | ||
}; | ||
}; | ||
}[]; | ||
}; | ||
}[]; | ||
minimum_should_match: number; | ||
}; | ||
}; | ||
}[]; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| forceNow | <code>Date</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`RangeFilter[] | { | ||
meta: { | ||
index: string | undefined; | ||
params: {}; | ||
alias: string; | ||
disabled: boolean; | ||
negate: boolean; | ||
}; | ||
query: { | ||
bool: { | ||
should: { | ||
bool: { | ||
filter: { | ||
range: { | ||
[x: string]: { | ||
gte: string; | ||
lte: string; | ||
}; | ||
}; | ||
}[]; | ||
}; | ||
}[]; | ||
minimum_should_match: number; | ||
}; | ||
}; | ||
}[]` | ||
|
15 changes: 15 additions & 0 deletions
15
...ata/public/kibana-plugin-plugins-data-public.aggconfigs.gettimeshiftinterval.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [getTimeShiftInterval](./kibana-plugin-plugins-data-public.aggconfigs.gettimeshiftinterval.md) | ||
|
||
## AggConfigs.getTimeShiftInterval() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
getTimeShiftInterval(): moment.Duration | undefined; | ||
``` | ||
<b>Returns:</b> | ||
|
||
`moment.Duration | undefined` | ||
|
15 changes: 15 additions & 0 deletions
15
...ugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.gettimeshifts.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [getTimeShifts](./kibana-plugin-plugins-data-public.aggconfigs.gettimeshifts.md) | ||
|
||
## AggConfigs.getTimeShifts() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
getTimeShifts(): Record<string, moment.Duration>; | ||
``` | ||
<b>Returns:</b> | ||
|
||
`Record<string, moment.Duration>` | ||
|
15 changes: 15 additions & 0 deletions
15
...ugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.hastimeshifts.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [hasTimeShifts](./kibana-plugin-plugins-data-public.aggconfigs.hastimeshifts.md) | ||
|
||
## AggConfigs.hasTimeShifts() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
hasTimeShifts(): boolean; | ||
``` | ||
<b>Returns:</b> | ||
|
||
`boolean` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...data/public/kibana-plugin-plugins-data-public.aggconfigs.postflighttransform.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [postFlightTransform](./kibana-plugin-plugins-data-public.aggconfigs.postflighttransform.md) | ||
|
||
## AggConfigs.postFlightTransform() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
postFlightTransform(response: IEsSearchResponse<any>): IEsSearchResponse<any>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| response | <code>IEsSearchResponse<any></code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`IEsSearchResponse<any>` | ||
|
22 changes: 22 additions & 0 deletions
22
...plugins/data/public/kibana-plugin-plugins-data-public.aggconfigs.setforcenow.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [kibana-plugin-plugins-data-public](./kibana-plugin-plugins-data-public.md) > [AggConfigs](./kibana-plugin-plugins-data-public.aggconfigs.md) > [setForceNow](./kibana-plugin-plugins-data-public.aggconfigs.setforcenow.md) | ||
|
||
## AggConfigs.setForceNow() method | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
setForceNow(now: Date | undefined): void; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| now | <code>Date | undefined</code> | | | ||
|
||
<b>Returns:</b> | ||
|
||
`void` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Something in this logic seems to be taking the absolute value of the time shift, so negative values are ignored. For example
-60m
is the same as1h
based on what I was seeing. I like this behavior- makes it impossible to make a mistake- but it was a little surprising. Can you add a test for this?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.
This happened on accident - what do you think about treating this as an invalid interval?