forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace spy panels by Inspector (elastic#16387)
* Add Inspector feature * So long, and thanks for all the fish, spy panel * Fix several functional tests * Fix unit tests * Fix spy panel button tests * Replace old spy panel documentation * Disable test temporarily until we have dashboard triggers * Enter edit mode for dark theme test * Fix some more functional tests * Fix more functional tests * More test fixing * Fix more functional tests * Allow opening the inspector via loader handler * Refactor InspectorViewChooser, remove unused CSS * Remove dead code * Fix data download button style * Remove redundant code * Load inspectorViews for dashboard_viewer * Extract inspector views to custom core_plugin * Switch API to TypeScript 🎉 * Design changes * Remove icons from views * Design changes * Improve typings of API * Add typing to all adapters * Show loading spinner in request selector * Rewrite InspectorView to TypeScript * Fix help text for data view * Remove deprecated React lifecycle methods * Embed inspector into dashboard panel actions * Remove temporary inspector trigger * Remove old CSS * Fix dashboard trigger for new panel action * Add tests for InspectorPanel and DataAdapter * Produce a hierarchical table if the vis is hierarchical * Remove allowJs option again * Add missing Apache license headers * Close inspector on dashboard when navigating away * Use proper title for dashboard panels * Fix functional tests * Skip broken test for now * Flush view chooser button * Add request adapter tests * Skip more tests, broken due to typescript * Add Request Time description * Add description for courier request * Fix tests * Replace icon by new (not yet released) icon * Finalize design of inspector * Remove discover test, that relied on spy panels * Change API to be properly mockable in tests * Add aria-live region for request status * Replace old method in functional tests * Replace abitrary magic number * Use object destructuring in vis * Fix issue with crashing requests view * Add request time tooltip * Get request body of correct search source * Make filter buttons properly keyboard accessible * Follow Dave's design suggestions * Remove redundant request from name * Remove unneeded comments * WIP raw-formatted values * Fix filtering issue * Fix tests and more license headers * Add data view tests * Remove search from table * Fix typos * Implement review suggestion * Remove artificial delays for testing * Fix new panel action structure * Minor design adjustments * Fix failing functional test * Update failing snapshot test * Implement final wording * Apply new EUI styling * Fix closing inspector in tests * Fix sorting of table * Align punctuation between tooltips
- Loading branch information
Showing
125 changed files
with
4,214 additions
and
1,450 deletions.
There are no files selected for viewing
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
Binary file not shown.
Binary file not shown.
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
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,17 @@ | ||
[[vis-inspector]] | ||
== Inspector | ||
|
||
Many visualizations have an Inspector that can help you gain insight to the data | ||
behind the visualization. | ||
|
||
To open the Inspector use the Inspector button while in the editor or select Inspector | ||
from the Dashboard panel menu. | ||
|
||
From the Inspector, you can download the visualization data as a comma separated | ||
values (CSV) file in Formatted or Raw format. Formatted downloads the data in table format. | ||
Raw downloads the data as provided -- dates are timestamps, numbers don’t have | ||
thousand separators, and so on. | ||
|
||
To view the requests that collected the data, select Requests from the View menu in the upper right. | ||
|
||
Which views are available depends on the inspected visualization. |
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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,4 @@ | ||
{ | ||
"name": "inspector_views", | ||
"version": "kibana" | ||
} |
200 changes: 200 additions & 0 deletions
200
src/core_plugins/inspector_views/public/data/__snapshots__/data_view.test.js.snap
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,200 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Inspector Data View component should render empty state 1`] = ` | ||
<DataViewComponent | ||
adapters={ | ||
Object { | ||
"data": DataAdapter { | ||
"_events": Object { | ||
"change": [Function], | ||
}, | ||
"_eventsCount": 1, | ||
"_maxListeners": undefined, | ||
"domain": null, | ||
"tabular": [Function], | ||
"tabularOptions": Object {}, | ||
}, | ||
} | ||
} | ||
title="Test Data" | ||
> | ||
<InspectorView | ||
useFlex={true} | ||
> | ||
<EuiFlyoutBody | ||
className="inspector-view__flex" | ||
> | ||
<div | ||
className="euiFlyoutBody inspector-view__flex" | ||
> | ||
<EuiEmptyPrompt | ||
body={ | ||
<UNDEFINED> | ||
<p> | ||
The element did not provide any data. | ||
</p> | ||
</UNDEFINED> | ||
} | ||
iconColor="subdued" | ||
title={ | ||
<h2> | ||
No data available | ||
</h2> | ||
} | ||
> | ||
<div | ||
className="euiEmptyPrompt" | ||
> | ||
<EuiTextColor | ||
color="subdued" | ||
> | ||
<span | ||
className="euiTextColor euiTextColor--subdued" | ||
> | ||
<EuiTitle | ||
size="m" | ||
> | ||
<h2 | ||
className="euiTitle euiTitle--medium" | ||
> | ||
No data available | ||
</h2> | ||
</EuiTitle> | ||
<EuiSpacer | ||
size="m" | ||
> | ||
<div | ||
className="euiSpacer euiSpacer--m" | ||
/> | ||
</EuiSpacer> | ||
<EuiText | ||
grow={true} | ||
> | ||
<div | ||
className="euiText" | ||
> | ||
<p> | ||
The element did not provide any data. | ||
</p> | ||
</div> | ||
</EuiText> | ||
<EuiSpacer | ||
size="l" | ||
> | ||
<div | ||
className="euiSpacer euiSpacer--l" | ||
/> | ||
</EuiSpacer> | ||
</span> | ||
</EuiTextColor> | ||
</div> | ||
</EuiEmptyPrompt> | ||
</div> | ||
</EuiFlyoutBody> | ||
</InspectorView> | ||
</DataViewComponent> | ||
`; | ||
|
||
exports[`Inspector Data View component should render loading state 1`] = ` | ||
<DataViewComponent | ||
adapters={ | ||
Object { | ||
"data": DataAdapter { | ||
"_events": Object { | ||
"change": [Function], | ||
}, | ||
"_eventsCount": 1, | ||
"_maxListeners": undefined, | ||
"domain": null, | ||
}, | ||
} | ||
} | ||
title="Test Data" | ||
> | ||
<InspectorView | ||
useFlex={true} | ||
> | ||
<EuiFlyoutBody | ||
className="inspector-view__flex" | ||
> | ||
<div | ||
className="euiFlyoutBody inspector-view__flex" | ||
> | ||
<EuiFlexGroup | ||
alignItems="center" | ||
component="div" | ||
direction="row" | ||
gutterSize="l" | ||
justifyContent="center" | ||
responsive={true} | ||
wrap={false} | ||
> | ||
<div | ||
className="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--alignItemsCenter euiFlexGroup--justifyContentCenter euiFlexGroup--directionRow euiFlexGroup--responsive" | ||
> | ||
<EuiFlexItem | ||
component="div" | ||
grow={false} | ||
> | ||
<div | ||
className="euiFlexItem euiFlexItem--flexGrowZero" | ||
> | ||
<EuiPanel | ||
className="eui-textCenter" | ||
grow={true} | ||
hasShadow={false} | ||
paddingSize="m" | ||
> | ||
<div | ||
className="euiPanel euiPanel--paddingMedium eui-textCenter" | ||
> | ||
<EuiLoadingChart | ||
mono={false} | ||
size="m" | ||
> | ||
<div | ||
className="euiLoadingChart euiLoadingChart--medium" | ||
> | ||
<div | ||
className="euiLoadingChart__bar" | ||
/> | ||
<div | ||
className="euiLoadingChart__bar" | ||
/> | ||
<div | ||
className="euiLoadingChart__bar" | ||
/> | ||
<div | ||
className="euiLoadingChart__bar" | ||
/> | ||
</div> | ||
</EuiLoadingChart> | ||
<EuiSpacer | ||
size="s" | ||
> | ||
<div | ||
className="euiSpacer euiSpacer--s" | ||
/> | ||
</EuiSpacer> | ||
<EuiText | ||
grow={true} | ||
> | ||
<div | ||
className="euiText" | ||
> | ||
<p> | ||
Gathering data | ||
</p> | ||
</div> | ||
</EuiText> | ||
</div> | ||
</EuiPanel> | ||
</div> | ||
</EuiFlexItem> | ||
</div> | ||
</EuiFlexGroup> | ||
</div> | ||
</EuiFlyoutBody> | ||
</InspectorView> | ||
</DataViewComponent> | ||
`; |
Oops, something went wrong.