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.
Migrate save top nav in Discover and Visualize to EUI (elastic#23190) (…
…elastic#23380) * extract reusable save component from DashboardSaveModal * update discover search to use SavedObjectSaveModal * create generic show_save_model that works for both discover and dashboard * fix last bits of discover save * remove old save functionallity * migrate visualize save to EUI * fix functional tests * disable save button if title is empty * mark title input as invalid when title is not provided * fix funtional tests
- Loading branch information
Showing
12 changed files
with
449 additions
and
422 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
133 changes: 37 additions & 96 deletions
133
src/core_plugins/kibana/public/dashboard/top_nav/__snapshots__/save_modal.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 |
---|---|---|
@@ -1,102 +1,43 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`renders DashboardSaveModal 1`] = ` | ||
<EuiOverlayMask> | ||
<EuiModal | ||
className="dshSaveModal" | ||
data-test-subj="dashboardSaveModal" | ||
maxWidth={true} | ||
onClose={[Function]} | ||
> | ||
<EuiModalHeader> | ||
<EuiModalHeaderTitle> | ||
Save Dashboard | ||
</EuiModalHeaderTitle> | ||
</EuiModalHeader> | ||
<EuiModalBody> | ||
<EuiForm> | ||
<EuiFormRow | ||
describedByIds={Array []} | ||
fullWidth={false} | ||
hasEmptyLabelSpace={false} | ||
label="Save as a new dashboard" | ||
> | ||
<EuiSwitch | ||
checked={false} | ||
data-test-subj="saveAsNewCheckbox" | ||
onChange={[Function]} | ||
/> | ||
</EuiFormRow> | ||
<EuiFormRow | ||
describedByIds={Array []} | ||
fullWidth={false} | ||
hasEmptyLabelSpace={false} | ||
label="Title" | ||
> | ||
<EuiFieldText | ||
autoFocus={true} | ||
compressed={false} | ||
data-test-subj="dashboardTitle" | ||
fullWidth={false} | ||
isInvalid={false} | ||
isLoading={false} | ||
onChange={[Function]} | ||
value="dash title" | ||
/> | ||
</EuiFormRow> | ||
<EuiFormRow | ||
describedByIds={Array []} | ||
fullWidth={false} | ||
hasEmptyLabelSpace={false} | ||
label="Description" | ||
> | ||
<EuiTextArea | ||
compressed={true} | ||
data-test-subj="dashboardDescription" | ||
fullWidth={false} | ||
onChange={[Function]} | ||
resize="vertical" | ||
value="dash description" | ||
/> | ||
</EuiFormRow> | ||
<EuiFormRow | ||
describedByIds={Array []} | ||
fullWidth={false} | ||
hasEmptyLabelSpace={false} | ||
helpText="This changes the time filter to the currently selected time each time this dashboard is loaded." | ||
label="Store time with dashboard" | ||
> | ||
<EuiSwitch | ||
checked={true} | ||
data-test-subj="storeTimeWithDashboard" | ||
onChange={[Function]} | ||
/> | ||
</EuiFormRow> | ||
</EuiForm> | ||
</EuiModalBody> | ||
<EuiModalFooter> | ||
<EuiButton | ||
color="primary" | ||
data-test-subj="saveCancelButton" | ||
fill={false} | ||
iconSide="left" | ||
onClick={[Function]} | ||
type="button" | ||
<SavedObjectSaveModal | ||
objectType="dashboard" | ||
onClose={[Function]} | ||
onSave={[Function]} | ||
options={ | ||
<React.Fragment> | ||
<EuiFormRow | ||
describedByIds={Array []} | ||
fullWidth={false} | ||
hasEmptyLabelSpace={false} | ||
label="Description" | ||
> | ||
Cancel | ||
</EuiButton> | ||
<EuiButton | ||
color="primary" | ||
data-test-subj="confirmSaveDashboardButton" | ||
fill={true} | ||
iconSide="left" | ||
isLoading={false} | ||
onClick={[Function]} | ||
type="button" | ||
<EuiTextArea | ||
compressed={true} | ||
data-test-subj="dashboardDescription" | ||
fullWidth={false} | ||
onChange={[Function]} | ||
resize="vertical" | ||
value="dash description" | ||
/> | ||
</EuiFormRow> | ||
<EuiFormRow | ||
describedByIds={Array []} | ||
fullWidth={false} | ||
hasEmptyLabelSpace={false} | ||
helpText="This changes the time filter to the currently selected time each time this dashboard is loaded." | ||
label="Store time with dashboard" | ||
> | ||
Confirm Save | ||
</EuiButton> | ||
</EuiModalFooter> | ||
</EuiModal> | ||
</EuiOverlayMask> | ||
<EuiSwitch | ||
checked={true} | ||
data-test-subj="storeTimeWithDashboard" | ||
onChange={[Function]} | ||
/> | ||
</EuiFormRow> | ||
</React.Fragment> | ||
} | ||
showCopyOnSave={true} | ||
title="dash title" | ||
/> | ||
`; |
Oops, something went wrong.